How to Use adb to connect to a mobile phone in Linux

Source: Internet
Author: User

LinuxThe simulator can be directly identified and used.AdbThere are no restrictions,Mobile phoneAfter plugging in the usb, adb does not recognize it and displays a question mark, which is also true in eclipse.

The solution is as follows:

1. input lsusb in bash. We can see that many of the BUS devices are Linux Foundation 1.1 root hub. This is because the port of the usb device is not plugged in, and another string is displayed when the port of the mobile phone is plugged in, for example, I am a High Tech Computer Corp. write down its id: 0bb4: 0c02

2. Create a 51-Android.rules file in the/etc/udev/rules. d directory with the following content:

Java code:

SUBSYSTEM = "usb | usb_device", SYSFS {idVendor }== "0bb4", MODE = "0660", GROUP = "plugdev" SUBSYSTEM = "usb | usb_device ", ATTR {idVendor }== "0bb4", ATTR {idProduct }== "0c02", SYMLINK + = "Android_adb" SUBSYSTEM = "usb | usb_device ", ATTR {idVendor }== "0bb4", ATTR {idProduct }== "0c01", SYMLINK + = "Android_fastboot"

Here idVendor is the id recorded in step 1.

3. Execute the following command:

Java code:

Chmod a + r/etc/udev/rules. d/51-Android.rules sudo adb kill-server sudo adb devices

Then we will find that adb can be used.

Edit recommendations]
 

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.