先用lsusb查看设备地址
Bus 003 Device 010: ID 18d1:0003 Google Inc.
sudo gedit /etc/udev/rules.d/51-android.rules
添加
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1",ATTR{idProduct}=="d002",MODE="0666" GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1",ATTR{idProduct}=="0003",MODE="0666" GROUP="plugdev"
然后
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Don't forget to restart udev after adding the rule:
sudo /etc/init.d/udev restart
sudo adb kill-server
google设备的总线是003
ls -l /dev/bus/usb/003
total 0
crw-rw-r-- 1 root root 189, 256 Dec 23 03:51 001
crw-rw-r-- 1 root root 189, 257 Dec 23 03:51 002
crw-rw-r-- 1 root root 189, 258 Dec 23 03:51 003
crw-rw-rw- 1 root plugdev 189, 265 Dec 23 04:01 010
大家看最后一个,表示成功
然后运行adb shell
如果出现 error: insufficient permissions for device
adb kill-server
sudo adb start-server
阅读(1996) | 评论(0) | 转发(0) |