Basic question on ADB.
adb root
restarts adb as root. But what i want is to restart it back to user after some time.
I tried the following :
adb kill-server adb start-server
doesnt work..
ps -A
-> noted the process number of adb and killed it.. even this did not work. Finally i am restarting my device. Is there any way i can come back from root adb to general adb?
Thank you.
So to enable the adb root command on your otherwise rooted device just add the ro. debuggable=1 line to /system/build. prop file. If you want adb shell to start as root by default - then add ro.
This command reboots your device in normal mode. You'll typically run this command after you've flashed something to your device and need to reboot. adb reboot. This command can also be useful if you're encountering issues with your Android device – for example, if your smartphone suddenly becomes unresponsive.
In some cases, you might need to terminate the adb server process and then restart it to resolve the problem (e.g., if adb does not respond to a command). To stop the adb server, use the adb kill-server command. You can then restart the server by issuing any other adb command.
adb kill-server
and adb start-server
only control the adb
daemon on the PC side. You need to restart adbd
daemon on the device itself after reverting the service.adb.root
property change done by adb root
:
~$ adb shell id uid=2000(shell) gid=2000(shell) ~$ adb root restarting adbd as root ~$ adb shell id uid=0(root) gid=0(root) ~$ adb shell 'setprop service.adb.root 0; setprop ctl.restart adbd' ~$ adb shell id uid=2000(shell) gid=2000(shell)
If you used adb root
, you would have got the following message:
C:\>adb root * daemon not running. starting it now on port 5037 * * daemon started successfully * restarting adbd as root
To get out of the root mode, you can use:
C:\>adb unroot restarting adbd as non root
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With