List of devices attached
???????????? no permissions
解决办法:
1. 查看还没有占有的文件名,这一步可以不做。
udevadm test /class/usb
2. lsusb
以下是我的输出(当前连的是ASUS Eee Pad)
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 192f:0416 Avago Technologies, Pte.
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 006: ID 0b05:4e1f ASUSTek Computer, Inc.
Bus 001 Device 003: ID 054c:038c Sony Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
3. 注意上面输出的蓝色一行:
Bus 001 Device 006: ID 0b05:4e1f ASUSTek Computer, Inc.
根据google的device 编号表
Manufacturer USB Vendor ID
Acer 0502
Asus 0b05
Dell 413c
Foxconn 0489
HTC 0bb4
Huawei 12d1
Motorola 22b8
Samsung 04e8
ZTE 19D2
4. 创建rules文件
sudo vi /etc/udev/rules.d/51-android.rules
文件内容:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
第一行是Asus,第二行是HTC. 有人说要做mode= 写成 mode:=,可以试下。
5.保存后给予权限:
sudo chmod a+rx /etc/udev/rules.d/51-android.rules
6. sudo /etc/init.d/udev restart 或者 sudo restart udev7. sudo ./adb kill-server
8. sudo ./adb start-server
9. sudo ./adb devices