I want to run an executable on a non-rooted android device.
Using the following commands in java
Runtime.getRuntime().exec("/bin/chmod 744 /data/data/com.example.myapp/myBin");
Runtime.getRuntime().exec("/data/data/com.example.myapp/myBin");
results in
Error running exec(). Command: [/data/data/com.example.myapp/myBin]
Working Directory: null Environment: null
I found alot of questions on this but no answer that worked in my case. How can I execute the binary file correctly?
If you are running this from a service (and not a app activity), you will have to set the permissions as 777.