Install Android phone adb driver under Linux

Source: Internet
Author: User

This article is your own study notes, welcome reprint, but please specify the source:http://blog.csdn.net/jesson20121020

In Linux under the development of Android, you need to use the real machine for debugging, testing, so first to ensure that Linux can drive your phone, the driver installation steps are as follows:

Installation steps:

1. Check if your Linux can drive your phone

If you have already downloaded the SDK but not the environment variables, you can find the ADB under the Platform-tools folder in the SDK directory, for example, my adb directory is/home/jesson/develop/ adt-bundle-linux-x86-20131030/sdk/platform-tools/, this time in the terminal input:

sudo./ADB devices
If you can identify your phone correctly, a prompt similar to the following will appear:

If you enter the above command after the prompt appears, then congratulations, you do not have to look at the following configuration, you can directly use the real machine to develop Android.

Of course, this is the ideal situation, presumably most friends of the phone can not be properly driven by the following tips:


2. Check your phone's identification code

If, if a???????????? is present in the No permissions hint, then you have to manually add the phone driver profile in your system, first check your phone's ID, in the terminal input:

Lsusb

As you can see, my phone information is displayed on the last line, where the 12D1 is the ID of the phone, and each brand's phone will be different.

3. Manually join the ADB driver for Android phones

Enter the/etc/udev/rules.d/directory and create a new file named 51-android.rules

Cd/etc/udev/rules.d/sudo VI 51-android.rules
Add the following configuration to the file,

subsystem== "USB", attr{idvendor}== "12d1", mode= "0666", group= "Plugdev"
according to the second step find the ID, write in the corresponding location, save exit.

4. Add Read Execute permission

sudo chmod a+rx 51-android.rule

5. Restart the Udev service

Sudo/etc/init.d/udev restart

6. Restart the ADB service

CD ~/develop/adt-bundle-linux-x86-20131030/sdk/platform-tools/sudo./adb kill-serversudo./ADB devices
at this point, in general, you can drive your phone correctly.

The following can be used in the Elipse mobile phone to test the development of Android, such as:


Note:

If you have added ADB to the system environment variable, you do not need to enter the appropriate directory for the SDK to enter the ADB-related commands directly at the terminal.








Install Android phone adb driver under Linux

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.