Obtain the vid and PID of the USB device in Android and set the ADB

Source: Internet
Author: User
Tags superuser permission

Address: http://fsysky.blog.163.com/blog/static/11381650920114260420177/

Pid/vid definition file ---- kernel_imx \ drivers \ USB \ storage \ unusual_devs.h

 

 

After the PID vid of the USB driver is modified in the Linux Kernel of the Android device, the ADB tool may not be able to identify the device, and the prompt "device not found" will be printed, especially for windows, the ADB driver cannot be used.

What should I do at this time?

1. First, find out the current PID and vid, for example, AAAA and BBBB (hexadecimal)

For linux such as Ubuntu, insert a device and query the corresponding devices under/sys/bus/USB/, for example, idvender under "1-1.

For Windows, you can obtain it from the properties of the corresponding device.

2. For Windows:

1. Modify the android_winusb.inf file in the ADB driver. You can compare it with other projects.

For example:

; My product
% Compositeadbinterface % = usb_install, USB \ vid_aaaa & pid_bbbb

% Singlebootloaderinterface % = usb_install, USB \ vid_aaaa & pid_bbbb & mi_01

2. Right-click my computer and choose Properties> advanced> environment variable to add the anroid_sdk_home environment variable. If you have an android SDK, set it to the SDK path. If not, it does not matter. Set it to any path that is convenient for you.

3. find the path corresponding to android_sdk_home. android directory. If not, create one. create a new file named adb_usb.ini In the android directory. Remember, the suffix is "ini". Add the obtained vid to adb_usb.ini, for example, 0 xaaaa.

4. Install the ADB driver.

5. Enter dos cmd, and enter ADB kill-server, ADB start-server, and ADB devices respectively. If the list of devices is displayed, the operation is successful.

III. For Linux

1. search for the. Android directory under the user's home directory. If not, create it. Create a new file named
Adb_usb.ini. Remember, the suffix is "ini". Add the obtained vid to adb_usb.ini, for example, 0 xaaaa.

2. In the shell, enter ADB kill-server, ADB start-server, and ADB devices respectively. If you can see the list of devices, the operation is successful.

Here, kill-server is used to kill the daemon of ADB. Otherwise, ADB retains the information of the first vender. Start-server loads the new vender information.


Note: Some users may need the superuser permission to use ADB. In this case, the home directory in step 1 should be/root. If you don't want to bother, add both home directories directly.

 

// ================================================ ========================================================== ==========================================================

USB vendor IDS

Http://developer.android.com/guide/developing/device.html

 

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 toATTR{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
Google 18D1
Hisense 109B
HTC 0BB4


K-touch 24E3
KT tech 2116
Kyocera 0482
Lenevo 17EF
LG 1004
Motorola 22B8
NEC 0409
Nook 2080
NVIDIA 0955
Otgv 2257
Pantech 10A9
Pegatron 1D4D
Philips 0471
PMC-sisierra 04DA
Qualcomm 05C6
SK telesys 1F53
Samsung 04E8
Sharp 04DD
Sony 054C
Sony Ericsson 0FCE
Teleepoch 2340
Toshba 0930
ZTE 19D2

 

 

 

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.