我的笔记本电脑上装有 Ubuntu 15.04 和 Android Studio。我可以通过 USB 数据线在 Nexus 5X 手机上工作。最近,我升级到了 Ubuntu 16.04。现在系统无法识别通过 USB 数据线连接的手机。
我有文件 /etc/udev/rules.d/51-android.rules,其中有一行,
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
通过 USB 线连接时,正在充电。但 lsusb 输出未显示手机。
$ lsusb
Bus 001 Device 009: ID 0c45:64ad Microdia
Bus 001 Device 008: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 010: ID 0cf3:0036 Atheros Communications, Inc.
Bus 001 Device 002: ID 8087:8000 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
adb devices 命令也没有显示任何设备。
系统日志有一些信息。
May 29 18:14:49 bagpipe kernel: [ 2201.144735] usb 1-1.4: new full-speed USB device number 19 using ehci-pci
May 29 18:14:49 bagpipe kernel: [ 2201.216705] usb 1-1.4: device descriptor read/64, error -32
May 29 18:14:49 bagpipe kernel: [ 2201.392726] usb 1-1.4: device descriptor read/64, error -32
May 29 18:14:49 bagpipe kernel: [ 2201.568743] usb 1-1.4: new full-speed USB device number 20 using ehci-pci
May 29 18:14:49 bagpipe kernel: [ 2201.640756] usb 1-1.4: device descriptor read/64, error -32
May 29 18:14:49 bagpipe kernel: [ 2201.816754] usb 1-1.4: device descriptor read/64, error -32
May 29 18:14:49 bagpipe kernel: [ 2201.992739] usb 1-1.4: new full-speed USB device number 21 using ehci-pci
May 29 18:14:50 bagpipe kernel: [ 2202.400707] usb 1-1.4: device not accepting address 21, error -32
May 29 18:14:50 bagpipe kernel: [ 2202.472733] usb 1-1.4: new full-speed USB device number 22 using ehci-pci
May 29 18:14:50 bagpipe kernel: [ 2202.880708] usb 1-1.4: device not accepting address 22, error -32
May 29 18:14:50 bagpipe kernel: [ 2202.880793] usb 1-1-port4: unable to enumerate USB device
如何解决这个问题?任何帮助都将不胜感激。
答案1
可能是连接手机和 PC 的电缆有问题。使用另一根电缆和最新的 Ubuntu 16.04 软件,我能够将手机连接到 PC 并从 Android Studio 访问手机。