Always run adb as root on the root device

So, I have built-in SGS3 working with the latest CyanogenMod. I am trying to use DDMS during development, but have encountered a problem. I have root access on my phone (obviously, when I use the adb shell and use the su command), however, DDMS does not use adb in root mode, forcing me to manually change file permissions using the adb shell before copying them. Is there a way to get ddms to constantly use root? I thought it should be somewhere, but I can not find it.

Any help is appreciated.

+4
source share
1 answer

You can try this method, but be careful, as this allows any application to get root, you can say: "Security Hole!"

Make your binary unsafe protection by typing the following commands.

adb shell su mount -o remount,rw /system # or: adb remount ls -la /system/bin/sh lrwxr-xr-x root shell 2012-11-10 15:20 sh -> mksh chmod 4755 /system/bin/sh ls -la /system/bin/mksh -rwsr-xr-x root shell 157520 2012-11-10 09:54 mksh # notice the suid bit is set ^D adb shell 
+8
source

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


All Articles