android - How to run shell command in unrooted device -


$adb push ./asl-native /data/local/asl-native $adb shell /system/bin/chmod 0777 /data/local/asl-native 

above 2 lines can executed in unrooted android device using runtime.getruntime().exec() command in program.

is there way run below command in unrooted device. (note:this command run correctly in rooted device)

$adb shell "/data/local/asl-native /data/local/asl-native.log" & 

if possible using jni or ndk,please explain steps.

reference: asl(android screenshot library)

you can try this:(01234abc device)

1)    adb -s 01234abc shell  2)    shell@android:/ $ run-as com.nitesh.tiwari 

hope :)


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -