device unauthorized:
设置->我的设备->全部参数->连续点击MIUI版本,进入开发者模式
设置->更多设置->开发者选项->USB调试
结果如下
更改手机设置:
设置->更多设置->开发者选项->USB调试(安全设置)
OK,问题解决~
记得一定是安全设置,如果选的USB调试则会出现device unauthorized的问题。
PS:本人使用的是红米note4X手机。
adbd cannot run as root in production builds:
adb root,发现如下问题:
解决:
1. 登录小米账号
2. 设置-应用设置-授权管理-root权限管理,开启root权限
然后重新adb root
ok, 完美解决~
insufficient permissions for device
解决办法:
插上手机,终端输入lsusb
Bus 002 Device 002: ID 05e3:0612 Genesys Logic, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 002: ID 03f0:2f4a Hewlett-Packard
Bus 001 Device 044: ID 2717:ff08
Bus 001 Device 004: ID 413c:301a Dell Computer Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
拔掉手机,终端输入lsusb
Bus 002 Device 002: ID 05e3:0612 Genesys Logic, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 002: ID 03f0:2f4a Hewlett-Packard
Bus 001 Device 004: ID 413c:301a Dell Computer Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
记录两段内容对比多出来的Bus 001 Device 044: ID 2717:ff08
终端输入cd /etc/udev/rules.d
终端输入sudo gedit 51-android.rules
文档中写入SUBSYSTEM=="usb", ATTRS{idVendor}=="2717", ATTRS{idProduct}=="ff08",MODE="0666"
保存后终端输入sudo chmod a+x 51-android.rules
终端输入adb kill-server
终端输入adb start-server
此时插上手机即可