全部博文(610)
分类:
2012-05-02 14:52:24
原文地址:linux下真机调试android 程序 作者:thomaslwq
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.
Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.
When plugged in over USB, can verify that your device is connected by executing adb devices from your SDK platform-tools/ directory. If connected, you'll see the device name listed as a "device."
大致意思是说,要在linux下真机调试android程序。
首先,要在新建一个文件:/etc/udev/rules.d/51-android.rules.,即是51-android.rules
文件的示例内容为
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
其中,venderId 是代表不同设备商,mode 指的是该设备的读写权限,group 代表这个设备属于那个组
保存文件后,执行
chmod a+r /etc/udev/rules.d/51-android.rules
(注意,以上的操作都是要在root下进行)
然后从新跑一下你的android程序,就可以发现eclipse可以识别你的机子并把它安装到真机上了。。
下面是不同厂商对应的venderId,我的机子是中兴的(ZTE),对应是“19d2”
USB Vendor IDs
This table provides a reference to the vendor IDs needed in order to add USB device support on Linux. The USB Vendor ID is the value given to the ATTR{idVendor}property in the rules file, as described above.
Company | USB Vendor ID |
---|---|
Acer | 0502 |
ASUS | 0b05 |
Dell | 413c |
Foxconn | 0489 |
Fujitsu | 04c5 |
Fujitsu Toshiba | 04c5 |
Garmin-Asus | 091e |
18d1 | |
Hisense | 109b |
HTC | 0bb4 |
Huawei | 12d1 |
K-Touch | 24e3 |
KT Tech | 2116 |
Kyocera | 0482 |
Lenovo | 17ef |
LG | 1004 |
Motorola | 22b8 |
NEC | 0409 |
Nook | 2080 |
Nvidia | 0955 |
OTGV | 2257 |
Pantech | 10a9 |
Pegatron | 1d4d |
Philips | 0471 |
PMC-Sierra | 04da |
Qualcomm | 05c6 |
SK Telesys | 1f53 |
Samsung | 04e8 |
Sharp | 04dd |
Sony | 054c |
Sony Ericsson | 0fce |
Teleepoch | 2340 |
Toshiba | 0930 |
ZTE | 19d2 |