Linux users use ADB to connect to Android phones

Source: Internet
Author: User
Due to Linux security settings and other reasons, non-root users are limited to use external devices or some hardware interfaces. The sdks officially provided by Google do not work directly. For example, if you cannot find a device or display a bunch of question marks and PermissionDenied. Remember to read the solutions officially provided by Google before, and grant the specified USB device read and write permissions to common users. & Nb

Due to Linux security settings and other reasons, non-root users are limited to use external devices or some hardware interfaces. The sdks officially provided by Google do not work directly. For example, if you cannot find a device or display a bunch of question marks and Permission Denied.

Remember to read the solutions officially provided by Google before, and grant the specified USB device read and write permissions to common users.

First use lsusbCommandView the usb Device connected to the computer and find the vendor ID and product ID of the Android mobile phone, for example, Bus 001 Device 004: ID 0133: 0001, then 0th and 0001 correspond to the vendor ID and product ID respectively. Tip: Check the lsusb result before connecting to the mobile phone, connect the mobile phone, and find the new line of records in lsusb. The vendor ID of some small Chinese stocks may be set to Google or HTC. In fact, it doesn't matter if the vendor ID is set to anything. It's just a sign.

Step 2: edit the/etc/udev/rules. d/70-android.rules file. Write the following content (tested in Ubuntu ):

 

SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="0001",MODE="0666"

Replace 0 and 0001 with the corresponding vendor ID and product ID.

Step 3: grant read and execution permissions: chmod a + rx/etc/udev/rules. d/70-android.rules

Finally, unplug the phone, restart adb, and insert it back to the phone: adb kill-server

View the device list to verify successful adb devices

In fact, it is much easier for Linux to connect to Android phones than Windows. At least we don't need to find drivers in the world.

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.