adb device错误信息
$ adb devices
List of devices attached
* no permissions (missing udev rules? user is in the plugdev group); see [http://developer.android.com/tools/device.html]
解决方法
查看设备供应商 ID 和产品 ID
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 413c:301b Dell Computer Corp. Universal Bluetooth Receiver
Bus 001 Device 002: ID 1a2c:20c0 China Resource Semico Co., Ltd USB Keyboard
Bus 001 Device 007: ID 18d1:4ee7 Google Inc. Nexus/Pixel Device (charging + debug)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
新建规则
sudo vim /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee7", MODE="0666", GROUP="plugdev"
重新加载规则
sudo udevadm control --reload-rules
插拔usb线