Adb root runs Runtime.GetRuntime (). Exec ("su"); not

I am running android 7.1.1 on a user device with AOSP compiled from the source code in the "userdebug" configuration, which gives root access and debugging.

I can connect to the device using the bridge of the Android device.

adb root
adb shell
device_name:/ # su

All of these commands work fine, and I can make changes as root. The problem I encountered is that in the application

the same su command is executed
Java.Lang.Process suProcess = Runtime.GetRuntime().Exec("su");

The error I get is:

Java.IO.IOException: Cannot start program "su": error = 13, Permission denied

Is there any difference between the adb root / shell su commands and the commands launched from the application?

+1
source
1

, Linux, DAC, SE-Android su.

, , , SE-Android . , , :

adb root

adb shell setenfoerce 0

SE-Android 'su'.

, DAC, su root. :

adb shell ps

. ( ) uid. , root.

, Android-. .

+1

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


All Articles