I would like to add a little more explanation to @user837048's answer. on my OSX Yosemite and Galaxy S3 which is rooted and using firmware CyanogenMod 11
and KitKat
I have done the below proceedings to Enable
and Disable
root prompt.
Please make ensure below
On your system
Android SDK
and you have set paths to binary files. type which adb
on your shell. It must give you somewhat result.
$ which adb
/Applications/Android Studio.app/sdk/platform-tools/adb
On your Mobile
ON
Apps and ADB
If you don't see Developer Options
in your settings, Goto Settings > About Phone. Scroll down to Build number
and tap there 7 times. I know its crazy. But believe me it works :D
Connect your phone via USB Cable.
type on your computer's
terminal
$ adb shell
you will see a prompt similiar, If any prompt has been shown on your mobile, to trust the connection, tap 'Always Trust' and 'OK'
shell@m0:/ $
now type
shell@m0:/ $ id
uid=2000(shell) gid=2000(shell) groups=1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats) context=u:r:shell:s0
See you are not root
Now exit from shell, which will fall back to computer's prompt
shell@m0:/ $ exit
Now activate root
$adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
root@m0:/ #
Wow.. you are root
root@m0:/ # id
uid=0(root) gid=0(root) context=u:r:shell:s0
I tried many solutions to go back to normal non root prompt
. But didn't worked except @user837048's solution.
root@m0:/ # stop adbd && setprop service.adb.root 0 && start adbd &
[1] 32137
root@m0:/ #
$
This might exit you from Adb prompt
to normal prompt. Now connect again.
$ adb shell
shell@m0:/ $
Well.. You are Non root