de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Android Image Path
PostPosted: Fri Jun 15, 2018 6:53 pm 
Offline
Veteran
User avatar
Up until recently, I've only used sexscripts on a computer, but recently had the opportunity to try Android. However, all the scripts I tried (including my own) have a problem downloading images. I get an error message that says "Error /images/received/xxx.jpeg" (No such file or directory).

I saw in an earlier post that doti suggested this syntax for the image path:

Code:
System.getProperty("user.dir")+"/images/


However, I just uploaded a new version of spin-the-bottle that uses that method and I'm still getting the same error. Unfortunately, my device isn't rooted, so I can only upload to the site to test. In order to avoid uploading multiple versions, I'd like to get it right on the next try. Does anyone know what I'm doing wrong or what the correct syntax is to be Android compatible? The device is running Android 7.1.

Thanks!


Top
 Profile Send private message 
 
 Re: Android Image Path
PostPosted: Sat Jun 16, 2018 9:23 am 
Offline
Addict
Hi ptdw,

I don't own an android-phone, so the following is just a wild guess with a short test to check if it could be right.

Judging from the path, your phone might look for 'images' right below '/' which is the root-directory.

I'd suggest you do a test. Create a script containing the following line

Code:
show(System.getProperty("user.dir"))


Check if it shows the right directory.

You may also check, if the output ends with a slash. Then your line would cause a double slash. A path like '/path/to/user/dir//images/' might get interpreted as got to userdir, use '/' there, which is the directory-root, from root continue to 'images/'.

As told in the beginning, it's just a wild guess but it is worth to check it. Either it needs fixing or you can at least rule it out.


Regards

cgut2001


Top
 Profile Send private message 
 
 Re: Android Image Path
PostPosted: Sat Jun 16, 2018 5:23 pm 
Offline
Site Admin
User avatar
It looks in Android System.getProperty("user.dir") doesn't work anymore, we'll have to do an addition in the API, check the update in the documentation here.


Top
 Profile Send private message 
 
 Re: Android Image Path
PostPosted: Sun Jun 17, 2018 12:19 am 
Offline
Veteran
User avatar
doti wrote:
It looks in Android System.getProperty("user.dir") doesn't work anymore, we'll have to do an addition in the API, check the update in the documentation here.


Thanks @doti, that worked. Spin-the-bottle is now Android compatible!

On a side note, I spent *WAY* too much time on this today. I ended up rooting an old Android device, gaining shell and su access, and still failed to run a test script. Any time I changed any of the scripts in the ss.android folder, I got an EACCESS error.

Does anyone know of a way to test scripts on a rooted device? I kind of hate to upload a bunch of test versions to the server just so I can debug...


Top
 Profile Send private message 
 
 Re: Android Image Path
PostPosted: Sun Jun 17, 2018 9:25 am 
Offline
Site Admin
User avatar
Possibly, there's SELinux
In a shell, you can try
Code:
setenforce 0


Top
 Profile Send private message 
 
 Re: Android Image Path
PostPosted: Sun Jun 17, 2018 8:25 pm 
Offline
Veteran
User avatar
doti wrote:
Possibly, there's SELinux
In a shell, you can try
Code:
setenforce 0


That worked, thanks! Without that I never would have figured out the Android bugs. Now I can run scripts locally for testing without using the server.


Top
 Profile Send private message 
 
 Re: Android Image Path
PostPosted: Sun Jun 17, 2018 10:27 pm 
Offline
Veteran
User avatar
@doti, there's still something strange going on with image processing. I wrote a quick image test utility, and tried it on a few Android devices. While I'm not 100% sure, it seems that certain camera resolutions are problematic, while others work fine. I'll PM you an example of an image and key that uploaded successfully but is a zero-length file when downloaded. As soon as I change the camera resolution, everything works fine.

I initially thought it was the file size, but that doesn't seem to be the case. A larger image uploaded with no problems...


Top
 Profile Send private message 
 
 Re: Android Image Path
PostPosted: Tue Jun 19, 2018 12:01 pm 
Offline
Site Admin
User avatar
I studied your picture (with an hex editor), its not a well formed JPEG, as I know, so the server can't handle it.
The problem is at the end of the file, instead of normal ending, it contains some information (EXIF related probably), a "Front_Cam_Selfie_Info", possibly about the orientation of the camera or the length of your arm or whatever.

I will try some cleaning on reception, but it'll be fragile.


Top
 Profile Send private message 
 
 Re: Android Image Path
PostPosted: Tue Jun 19, 2018 3:43 pm 
Offline
Veteran
User avatar
Al, well that explains it. At least we know what's going on. This is good to keep in mind for Android users, as I would guess this kind of metadata is probably pretty common. It would be great if the server could strip EXIF data automatically, as there are several command-line tools to do that.

In the meantime, I think the Android test script I uploaded over the weekend will be good for people to figure out what camera mode is compatible with SexScripts. I had to try a few before I found one that worked.

Thanks again for your help doti!


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.