亚行未在Ubuntu上检测到我的android设备 [英] ADB is not detecting my android device on Ubuntu

查看:168
本文介绍了亚行未在Ubuntu上检测到我的android设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要帮助, adb 无法检测到我的手机,不知道该怎么办;这就是我所做的,如果遇到错误或有什么告诉我。

Need help, "adb" not detect my phone, I do not know what to do; and this was what I did, if I have a mistake or something tell me please.


  1. 我以root用户身份登录并创建

  1. I log in as root and create this file.

/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
    


  • 最后,我测试所做的更改,但不显示我的设备。

  • Finally, I test my changes, but don't display my devices.

    $ adb devices
    List of devices attached
    




  • 其他信息



    问:是否在Android上打开了USB调试功能?
    R:是。

    Additional Information

    Q: Is USB debugging turned on on the Android? R: Yes.

    操作系统: Ubuntu 15.04(64位)

    OS: Ubuntu 15.04 (64 bit)

    $ 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文件更改:

    Update 1

    51-android.rules file changes:

    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 不能检测到我的设备::(

    But, "adb" don't detect my device: :(

    $ adb devices
    List of devices attached
    



    更新2



    这是解决方案

    • Ubuntu Docs Source,
    • Android Docs Source

    推荐答案

    lsusb 输出中,我看到您的设备作为设备005连接到总线004

    from lsusb output I see that your device connected to Bus 004 as a device 005

    这里是
    Bus 004 Device 005:ID 1004:6300 LG Electronics,Inc。

    我看到您没有创建任何gro up。您需要创建一个组(如果权限被拒绝,请在命令后添加 sudo):

    I see that you did not create any group.You need to create a group (if permission denied prepend "sudo" following commands):

    1)添加plugdev组:

    1) add plugdev group:

     groupadd plugdev
    

    2)添加您的插件组的用户名(useradd -G {group-name}用户名):

    2) add your username to plugdev group (useradd -G {group-name} username):

     useradd -G plugdev orvi
    

    3)重新启动udev(您可能需要注销并重新登录以更新用户组):

    3) restart udev (you may need to log off and log back in to update user group):

     sudo service udev restart
    

    4)现在,使用以下命令重新加载规则:

    4) Now reload the rules with the following commands:

     sudo udevadm control --reload-rules
     sudo service udev restart
     sudo udevadm trigger
    

    5)验证设备现在允许plugdev用户组访问

    5) Verify device is now allowing plugdev user group access

    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设备确认权限正确并可以使用!

    6) Run adb devices to confirm permissions are correct and enjoy!

    这篇关于亚行未在Ubuntu上检测到我的android设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆