Make ADB To Support Android Devices(如何使ADB在Linux下支持Android设备的udev规则配置)

/*********************************************************************
 * Author  : Samson
 * Date    : 02/26/2014
 * Test platform:
 *              Linux ubuntu 3.2.0-58-generic-pae
 *              GNU bash, version 4.2.39
 * *******************************************************************/

1.Connect Andriod device to your Linux ***.

2.Use "lsusb".
Use lsusb to check the Android device ID in usb subsystem, like below (do not care "$"):
   $ lsusb
   Bus 001 Device 002: ID 0fce:6156 Sony Ericsson Mobile
Number "0fce" is the Andriod device ID in 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 in again,  use "adb devices" to check your Andriod device.

Make ADB To Support Android Devices(如何使ADB在Linux下支持Android设备的udev规则配置),,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。