I was able to run a console app (compiled with NDK) on a rooted Android phone, but can't run it on a non-rooted phone.
I tried:
adb push MyApp /mnt/sdcard/temp
adb shell
cd /mnt/sdcard/temp
chmod a+x MyApp
but chmod
did not work and the file remained non-executable:
tulip:/mnt/sdcard/temp $ ls -l
total 33904
-rw-rw---- 1 root sdcard_rw 34713488 2023-10-05 19:49 MyApp
EDIT1
The files are uploaded as root
, but the commands are executed as shell
:
adb shell "id"
uid=2000(shell) gid=2000(shell) groups=2000(shell),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:shell:s0...