SexScripts : Android Image Path - https://ss.deviatenow.com:443/viewtopic.php?f=6&t=769 Page 1 of 1

Android Image Path

ptdw [ Fri Jun 15, 2018 6:53 pm ]

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!

Re: Android Image Path

cgut2001 [ Sat Jun 16, 2018 9:23 am ]

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

Re: Android Image Path

doti [ Sat Jun 16, 2018 5:23 pm ]

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.

Re: Android Image Path

ptdw [ Sun Jun 17, 2018 12:19 am ]

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...

Re: Android Image Path

doti [ Sun Jun 17, 2018 9:25 am ]

Possibly, there's SELinux
In a shell, you can try
Code:
setenforce 0

Re: Android Image Path

ptdw [ Sun Jun 17, 2018 8:25 pm ]

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.

Re: Android Image Path

ptdw [ Sun Jun 17, 2018 10:27 pm ]

@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...

Re: Android Image Path

doti [ Tue Jun 19, 2018 12:01 pm ]

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.

Re: Android Image Path

ptdw [ Tue Jun 19, 2018 3:43 pm ]

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!

Page 1 of 1 All times are UTC + 1 hour [ DST ]
https://ss.deviatenow.com:443/
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010, 2011