需要帮助,“adb”检测不到我的手机,我不知道该怎么办;这就是我所做的,如果我有错误或有什么地方请告诉我。
我以 root 身份登录并创建此文件。
/etc/udev/rules.d/51-android.rules
这些是我的规则,适用于我的手机 LG L80+Bello D331。
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
我运行此命令并重新启动。
chmod a+r /etc/udev/rules.d/51-android.rules
最后,我测试了我的更改,但不显示我的设备。
$ adb devices List of devices attached
附加信息
问: Android 是否开启了 USB 调试? R:是的。
操作系统: Ubuntu 15.04(64 位)
$ lsusb
Bus 004 Device 003: ID 8086:0189 Intel Corp.
Bus 004 Device 005: ID 1004:6300 LG Electronics, Inc. <<<
Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 004: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
Bus 003 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ ls -l /dev/bus/usb/004/
total 0
crw-rw-r-- 1 root root 189, 384 ago 21 05:21 001
crw-rw-r-- 1 root root 189, 385 ago 21 05:21 002
crw-rw-r-- 1 root root 189, 386 ago 21 05:21 003
crw-rw-rw- 1 root root 189, 388 ago 21 18:15 005
更新 1
51-android.rules 文件改动:
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="plugdev"
命令:
$ lsusb
Bus 004 Device 004: ID 8086:0189 Intel Corp.
Bus 004 Device 003: ID 1004:6300 LG Electronics, Inc. <<<
Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
Bus 003 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ ls -l /dev/bus/usb/004/
total 0
crw-rw-r-- 1 root root 189, 384 ago 21 11:33 001
crw-rw-r-- 1 root root 189, 385 ago 21 11:33 002
crw-rw-rw- 1 root plugdev 189, 386 ago 21 11:33 003 <<<
crw-rw-r-- 1 root root 189, 387 ago 21 11:33 004
但是,“adb” 没有检测到我的设备::(
$ adb devices
List of devices attached
更新2
引用
最佳答案
从 lsusb
输出我看到你的设备作为设备 005 连接到总线 004
在这里 总线 004 设备 005:ID 1004:6300 LG Electronics, Inc.
我看到您没有创建任何组。您需要创建一个组(如果权限被拒绝,请在命令后加上“sudo”):
1) 添加plugdev组:
groupadd plugdev
2) 将您的用户名添加到 plugdev 组(useradd -G {group-name} 用户名):
useradd -G plugdev orvi
3) 重新启动 udev(您可能需要注销并重新登录以更新用户组):
sudo service udev restart
4) 现在使用以下命令重新加载规则:
sudo udevadm control --reload-rules
sudo service udev restart
sudo udevadm trigger
5) 验证设备现在允许 plugdev 用户组访问
ls -l /dev/bus/usb/<bus number from step 4>
它应该给出类似的东西:
crw-rw-rw- 1 root plugdev 189, 329 Jul 3 18:23 074
6) 运行 adb devices
以确认权限正确并享受!
关于android - ADB 没有在 Ubuntu 上检测到我的安卓设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32151114/