Recognize Android mobile phones and detect drivers

Source: Internet
Author: User

This is a journal, but it only describes how to identify Android phones. It may not be the best method, but it is feasible.

 

Enumerate the USB controller to obtain information about each USB device, mainly obtaining the information about the vendor, product, and serialnumber.

In fact, the function of USB view is implemented. You can refer to the source code of USB view.

Http://download.csdn.net/detail/nightrainljh/3717068

The program of this resource may not run, but it doesn't matter, just look at the source code.

The software in is RW-everything, which allows you to view the hardware information of the local machine, which is very convenient.



Traverse the mobile phone descriptor to find out the ADB interface device. How can I determine that the interface is ADB? The method here is to check the classification code. If it is 0xff 0x42 0x01 and the device has a serial number

It is regarded as an Android device (I am currently using a method to identify errors)

I have moved to an article about the meaning of the classification code. For more information, see

Http://blog.csdn.net/aqtata/article/details/8285253

Sort out the ideas, get the USB device, get the vid and PID, some vids have not been used for Android phones, you can filter them together
Then find out the ADB interface description (the classification code is 0xff 0x42 0x01 and there is a serial number), and the basic judgment is that it is an Android device!

 

Of course, the best way to precisely determine whether an Android device is used is to use vid and PID. However, since PID is defined by various manufacturers
Therefore, we cannot have this PID data. We can only detect it through the above stupid method!

 

Next, check whether the ADB driver is installed.
The ADB device interface GUID is {F72FE0D4-CBCB-407d-8814-9ED673D0DD6B} according to the ADB driver File}
You only need to use the setupdixxx series API to enumerate devices and check whether there are ADB devices.

 

If the mobile phone device is filtered out from the USB device, but the ADB device is not found, you can basically make sure that the ADB driver is not installed on the local device.

Then you can find the ADB device from "unknown device. How to match? Find its "parent "!

 

 

We can see that the "parent" matches the vid, PID, and serialnumber with the USB device information found previously! Then it is determined that it is an ADB device! The rest is to install the appropriate driver ......

 

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.