1
) 在终端运行 lsusb
会发现结果有会有如下类似记录:
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 046d:c077 Logitech, Inc.
Bus 003 Device 003: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 003 Device 005: ID 14cd:125d Super Top
Bus 003 Device 024: ID 0bb4:0f91 HTC (High Tech Computer Corp.)
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
这时键入
sudo gedit /etc/udev/rules.d/
51
-android.rules
在打开的文件中增加以下文本:
SUBSYSTEM==
"usb"
, ATTR{idVendor}==
"0bb4"
,
ATTR{idProduct}==
"0f91"
,
MODE="0666"
2
) 运行以下命令:
sudo chmod a+rx /etc/udev/rules.d/
51
-android.rules
sudo /etc/init.d/udev restart
3
) 在 android sdk 的 tools 目录下运行 (这一步很重要,必须要sudo,否则没效果)
sudo ./adb kill-server
sudo ./adb devices
done
如果连接不上,把线拔了再连