List of devices attached
???????????? no permissions
1. 查看还没有占有的文件名,这一步可以不做。
udevadm test /class/usb
2. lsusb
以下是我的输出(当前连的是ZTE R750)
Bus 002 Device 007: ID 19d2:1354 ONDA Communication S.p.A.
Bus 002 Device 005: ID 0c45:6421 Microdia
Bus 002 Device 003: ID 046d:c52f Logitech, Inc.
Bus 002 Device 002: ID 8087:0020
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 007: ID 413c:8160 Dell Computer Corp.
Bus 001 Device 006: ID 413c:8162 Dell Computer Corp.
Bus 001 Device 005: ID 413c:8161 Dell Computer Corp.
Bus 001 Device 004: ID 138a:0008 DigitalPersona, Inc
Bus 001 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 001 Device 002: ID 8087:0020
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
3. 注意上面输出的第一行:
Bus 002 Device 007: ID 19d2:1354 ONDA Communication S.p.A.
根据google的device 编号表
Manufacturer USB Vendor ID
Acer 0502
Dell 413c
Foxconn 0489
HTC 0bb4
Huawei 12d1
Motorola 22b8
Samsung 04e8
ZTE 19D2
19d2就是 ZTE R75,虽然后面的说明是ONDA
4. 创建rules文件
sudo vi /etc/udev/rules.d/51-android.rules
文件内容:
SUBSYSTEM=="usb", ATTRS{idVendor}=="19d2", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
5. sudo /etc/init.d/udev restart 或者 sudo restart udev