I have cross-compiled a binary on Linux using the arm toochain. I uploaded the binary to a non-rooted andnroid phone.
What do I need to do in order to run this binary on the non-rooted phone ?
EDIT: I tried to run via terminal emulator, but I get the following error.
$ pwd
/mnt/sdcard/external_sd
$ ls -l hello
-rwxrwxr-x system sdcard_rw 8420 2013-12-31 22:12 hello
$ ./hello
./hello: permission denied
$
./binaryto invoke it. Making sure permissions are properly set, of course. – dotVezz Dec 31 '13 at 18:56ls -l [file]? You won't be able to move anything to/data/because it's owned byroot. – dotVezz Dec 31 '13 at 19:23chmodanything on it. I would try to find a "rw" partition usingmount(e.g./cache) and trying to execute from there. – Chahk Dec 31 '13 at 20:38sh hellowhile in the same directory as your executable. That even works on SDcard. – Izzy Dec 31 '13 at 22:01echo "./hello" > hey && sh heywill do. IOW: first create a shell script that does nothing but execute the binary, and then letshrun that shell script. Sorry, thought that was clear – obviously I was a little cryptic ;) – Izzy Dec 31 '13 at 23:48shcan run the script, doesn't anything it runs in turn still have to have the proper permissions? – dotVezz Jan 01 '14 at 16:31/data/localshould be writable typically, even though other portions of/dataare not. Try moving the binary there, marking it executable withchmod(if needed), and then running it. – eldarerathis Jan 03 '14 at 05:10sh. aseaudi: That error is strange. Can you do als -l /data/local(to see whether the file already exists, but is owned by a different user)? – Izzy Jan 06 '14 at 11:16/data/localis owned bysystem:system, and not world-readable. But unless a similar permission issue exists there as well,ls /data/local/helloshould work. If it does, please also cross-check withidto see whether the user matches. – Izzy Jan 07 '14 at 08:00