先检查下终端的用户是否是root用户,如果不是就 执行下 命令 su ,然后输入root用户的密码
这个时候再执行adb kill-server
然后再执行adb shell
正常情况下这个时候手机上会提示那个 授权的 对话框,勾选后点确定OK了。
//////////////////////////////////////////////////////////////////////////////
diao@diao-All-Series:~$ su
密码:
root@diao-All-Series:/home/diao# adb shell
error: insufficient permissions for device
root@diao-All-Series:/home/diao# adb shell
error: insufficient permissions for device
root@diao-All-Series:/home/diao# sudo -s
root@diao-All-Series:/home/diao# adb kill-server
root@diao-All-Series:/home/diao# adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
710KPJ××××××××396 offline
root@diao-All-Series:/home/diao# adb shell
error: device offline
root@diao-All-Series:/home/diao# adb shell
taimen:/ $
搞定