Running your own program on a non-embedded Android device

I managed to create my own executable file for Android after reading How to create a native executable (command line) to run on Android? but I can’t execute it on my disconnected phone, it gives

/ system / bin / sh: / storage / sdcard0 / Download / hello_world: unable to execute: Permission denied

because the SD card is mounted using noexecand I can no longer write.

+4
source share
1 answer

I found a solution that works for me - it seems /data/local/tmpto be writable and it is not in the section noexec.

adb. USB, USB- .

, :

adb push C:\Workspace\hello_world\libs\armeabi\hello_world /data/local/tmp/hello_wo
rld

adb:

adb shell

:

chmod 755 /data/local/tmp/hello_world
/data/local/tmp/hello_world
+5

Source: https://habr.com/ru/post/1524651/


All Articles