我有一台便宜的安卓平板电脑,我需要用它来测试上面的应用程序。我正在使用 Ubuntu,所以我首先必须将设备添加到 udev
列表。
我连接了平板电脑,但是 adb
没有看到它
$ adb devices
List of devices attached
$
我尝试使用 lsusb
,但 Ubuntu 无法识别该设备(已选中 USB 调试!在平板电脑的属性中)
$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 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 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 046d:0928 Logitech, Inc. QuickCam Express
Bus 005 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 001 Device 004: ID 2207:0000
如果我连接我的手机,我会看到它是通过最后一个 channel 连接的。因此,我假设此平板电脑被标识为 ID 2207:0000
,因此 ID Vendor 为“2207”。我编辑了 udev 文件 51-android.rules
看起来像这样
SUBSYSTEM=="usb", ATTR{idVendor}=="2207", MODE="0666", GROUP="plugdev"
重新启动电脑,将 USB 数据线重新连接到平板电脑,平板电脑再次无法识别。
有什么建议我应该怎么做?如何使此平板电脑对 adb
可见?
编辑
2207:0000 这个供应商 ID 看起来很奇怪吗?尤其是那四个零?
最佳答案
我遇到了和你一样的问题,我做了什么: 将供应商 ID 添加到 ~/.android/adb_usb.ini
echo "0x2207" >>~/.android/adb_usb.ini
向/etc/udev/rules.d/51-android.rules 添加了以下行:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ENV{PRODUCT}=="207/*", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="207", MODE="0666"
完成上述修改后,重启adb
服务器,再次检查设备。
adb kill-server // kill the adb server if it is running
adb start-server // Restarts the adb server
adb devices // It will list all connected devices
现在我的中文平板电脑 Archos c906 在 ./adb 设备上被识别为:
List of devices attached
0123456789ABCDEF device
关于android - 如何将此平板电脑注册到 Ubuntu udev 列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12111005/