How to enable ADB to support Udev rule configuration for Android devices under Linux

Source: Internet
Author: User
Tags chmod ini

1.Connect andriod Device to your Linux * * * *.

2.Use "Lsusb".

Use LSUSB to check the Android device ID into USB subsystem, like below (Does not care "$"):

$ lsusb

Bus 001 Device 002:id 0fce:6156 Sony Ericsson Mobile

Number "0FCE" is the Andriod device ID of use subsystem.

3.Update adb tool.

Turn to Android SDK folder "Tools", Typein below words:

$./android adb update

It ' s neccesary step to create ~/.android/adb_usb.ini.

4. Edit Adb_usb.ini.

Edit ~/.android/adb_usb.ini. ADD USB subsystem ID to Adb_usb.ini, like below:

0x0fec

5.Create udev rule file.

Create a new file named "Sony-android.rules" In/etc/udev/rules.d folder.

ADD below content to "Sony-android.rules"

subsystem== "USB", sysfs{idvendor}== "0fec", mode= "0666"

Idvendor USB Vendor IDs, reference:http://developer.android.com/tools/device.html

chmod rule file:

sudo chmod a+rx/etc/udev/rules.d/sony-android.rules

6.Restart Udev Service.

Do as below to restart Udev service:

$ sudo service udev restart

7.Restart ADB service.

Do as below to restart ADB service.

$ adb kill-server

$ adb start-server

8.Try "adb devices".

Plug out adnroid device, then, Plug-again, use the "ADB devices" to check your andriod.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/extra/

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.