Debugging solution for Android devices in Ubuntu

Source: Internet
Author: User

1. Locate the device ID in lsusb

Root @ Ubuntu :~ # 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: 0002 Linux Foundation 2.0 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 004 device 002: Id 03f0: 0862 Hewlett-Packard
Bus 002 device 002: Id 04f2: b2c2 chicony Electronics Co., Ltd
Bus 001 device 005: Id 05c6: 9025 Qualcomm, Inc.

2. Find the ID of the port connected to your mobile phone
Take the last row as an example. The read ID is 05c6.

3. register the udev rules file:

Root @ Ubuntu :~ # Sudo gedit/etc/udev/rules. d/50-android.rules

Enter the ID of step 2 to the open file in the following format:

Subsystem = "USB ",Sysfs {idvendor} ="05c6", Mode = "0666"
You can also enter other phone models into the file, as shown below:

  1. # ACS 0502
  2. Subsystem = "USB", sysfs {idvendor} = "0502", mode = "0666"
  3. # Dell 413c
  4. Subsystem = "USB", sysfs {idvendor} = "413c", mode = "0666"
  5. # Foxconn 0489
  6. Subsystem = "USB", sysfs {idvendor} = "0489", mode = "0666"
  7. # Garmin-Asus 091e
  8. Subsystem = "USB", sysfs {idvendor} = "091e", mode = "0666"
  9. # HTC 0bb4
  10. Subsystem = "USB", sysfs {idvendor} = "0bb4", mode = "0666"
  11. # Huawei 12d1
  12. Subsystem = "USB", sysfs {idvendor} = "12d1", mode = "0666"
  13. # Kyocera 0482
  14. Subsystem = "USB", sysfs {idvendor} = "0482", mode = "0666"
  15. # LG 1004
  16. Subsystem = "USB", sysfs {idvendor} = "1004", mode = "0666"
  17. # Motorola 22b8
  18. Subsystem = "USB", sysfs {idvendor} = "22b8", mode = "0666"
  19. # NVIDIA 0955
  20. Subsystem = "USB", sysfs {idvendor} = "0955", mode = "0666"
  21. # Pantech 10a9
  22. Subsystem = "USB", sysfs {idvendor} = "10a9", mode = "0666"
  23. # Samsung 04e8
  24. Subsystem = "USB", sysfs {idvendor} = "04e8", mode = "0666"
  25. # Sharp 04dd
  26. Subsystem = "USB", sysfs {idvendor} = "04dd", mode = "0666"
  27. # Sony Ericsson 0fce
  28. Subsystem = "USB", sysfs {idvendor} = "0fce", mode = "0666"
  29. # ZTE 19d2
  30. Subsystem = "USB", sysfs {idvendor} = "19d2", mode = "0666"

3. Change the rule File Permission

Root @ Ubuntu :~ # Sudo chmod-r 777/etc/udev/rules. d/50-android.rules

4. Restart

Root @ Ubuntu :~ # Sudo/etc/init. d/udev restart

5. Switch to the platform-tools directory and restart the ADB service.

Root @ Ubuntu:/home/jindegege/Java/Android-SDK-Linux/platform-tools # ADB kill-Server

6. Run the ADB command to open the device.

Root @ Ubuntu:/home/jindegege/Java/Android-SDK-Linux/platform-tools # ADB Devices


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.