[Excerpt] debugging configuration for Android mobile phones in Linux

Source: Internet
Author: User
[Excerpted from] http://zwkufo.blog.163.com/blog/static/2588251201126113638144/

In Linux, when debugging Android phones on a real machine, you often encounter insufficient permissions for device errors. In addition, ADB devices may be garbled and you are not authorized to perform any ADB operations. The following configuration method can solve this problem (the environment is UBUNTU ):

 

1. Enter terminal and enter the "lsusb" command to view the USB venderid. The following is displayed on my PC:

 

Bus 007 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 005 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 003 device 001: Id 1d6b: 0001 Linux Foundation 1.1 root Hub
Bus 002 device 014: Id 18d1: deed Google Inc.
Bus 002 device 001: Id 1d6b: 0002 Linux Foundation 2.0 root Hub
Bus 001 device 001: Id 1d6b: 0002 Linux Foundation 2.0 root Hub

The above bus 002 is my connected USB device, and the venderid is 18d1

 

Run the following command to open the text editor. Paste the following text and save it.

Sudo gedit/etc/udev/rules. d/50-android.rulesSubsystem = "USB", sysfs {idvendor} = "18d1", mode = "0666"2. continue executing at Terminal:Sudo chmod A + Rx/etc/udev/rules. d/50-android.rulesSudo/etc/init. d/udev restart3. Go to the tools directory (or platform-tools) in the Android-SDK and execute the following command line:Sudo./ADB kill-ServerSudo./ADB ShellSuExit4. After exiting ADB, try again:Sudo./ADB remountSudo./ADB DevicesThe serial number of the real device indicates that the connection is successful. Go to eclipse, right-click the project to be installed in project Explorer-> Run as-> RUN deployments, and change the running target to manual ). Then run. A message is displayed, indicating that you can select a target and select a real machine. (If no real machine is displayed, try to unplug the USB cable and plug it in)

 

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.