How to determine an Android phone connected to PC

Hello All,

I want to develop a tool that will auto install usb driver for android phones that connected to PC. I just know know android phone uses usb interface. My question is how to determine a usb device is an android phone or other devices?

Another question is is there a setup API that can find out those devices without a suitable driver installed?

Thanks in advance!

On 08-Nov-2015 12:22, xxxxx@gmail.com wrote:

I want to develop a tool that will auto install usb driver for android phones that connected to PC. I just know know android phone uses usb interface. My question is how to determine a usb device is an android phone or other devices?

Do you mean the debugger (adb) driver? or USB storage or camera functions?

Another question is is there a setup API that can find out those devices without a suitable driver installed?

No, Setup API does not provide anything like that, besides of ability to
recognize devices by class (as opposite to vendor & device ID).

– pa

Thank you for your reply, Pavel.

For the first question, Yes, it’s debug (adb) driver.

For the second question, how to aquire the device list that whithout a driver installed? That is what we can observe from device manager.

Thanks in advance!

We have noticed that in the adb mode, Android phones expose a compat id of Class_FF&SubClass_42&Prot_01
or in a few rare cases,Class_FF&SubClass_42&Prot_03. However, note that this is not an official USB class. FF is the vendor defined class. Therefore there is the possibility that some other device might expose the same compat id.
Btw, if you have access to the one of the latest Windows 10 preview builds, you will find that Windows will install Winusb automatically (along with the correct interface GUID for adb) on many of these devices.
Thanks,Vivek

Date: Sun, 8 Nov 2015 21:50:22 -0500
From: xxxxx@gmail.com
To: xxxxx@lists.osr.com
Subject: RE:[ntdev] How to determine an Android phone connected to PC

Thank you for your reply, Pavel.

For the first question, Yes, it’s debug (adb) driver.

For the second question, how to aquire the device list that whithout a driver installed? That is what we can observe from device manager.

Thanks in advance!


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

The CM_Xxx apis are what device manager uses to construct the device tree

Sent from Outlook Mailhttp: for Windows 10 phone

From: xxxxx@gmail.com
Sent: Sunday, November 8, 2015 6:52 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How to determine an Android phone connected to PC

Thank you for your reply, Pavel.

For the first question, Yes, it’s debug (adb) driver.

For the second question, how to aquire the device list that whithout a driver installed? That is what we can observe from device manager.

Thanks in advance!


NTDEV is sponsored by OSR

Visit the list at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.com%2Fshowlists.cfm%3Flist%3Dntdev&data=01|01|Doron.Holan%40microsoft.com|e605267406fd4c34ea1908d2e8b0bf3e|72f988bf86f141af91ab2d7cd011db47|1&sdata=t3qORIk9lRR9hUcRk2oYtQJT3oXmKuvY8l%2FZLU95hWI%3D

OSR is HIRING!! See https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osr.com%2Fcareers&data=01|01|Doron.Holan%40microsoft.com|e605267406fd4c34ea1908d2e8b0bf3e|72f988bf86f141af91ab2d7cd011db47|1&sdata=T8R7DZHBXmPXqdyD4U6FNfmdFONJ9%2BkWoOsRJKigTFI%3D

For our schedule of WDF, WDM, debugging and other seminars visit:
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osr.com%2Fseminars&data=01|01|Doron.Holan%40microsoft.com|e605267406fd4c34ea1908d2e8b0bf3e|72f988bf86f141af91ab2d7cd011db47|1&sdata=dDY5rtnvROagtcB6gR2xDN%2Fi1GYfy5iSMVHiMWJQJJc%3D

To unsubscribe, visit the List Server section of OSR Online at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.com%2Fpage.cfm%3Fname%3DListServer&amp;data=01|01|Doron.Holan%40microsoft.com|e605267406fd4c34ea1908d2e8b0bf3e|72f988bf86f141af91ab2d7cd011db47|1&amp;sdata=SBl3Z%2BN%2FMcAjET87q6qsHCTZzUkn%2BrxcvF%2F%2Bt%2BHVv90%3D</http:>

xxxxx@gmail.com wrote:

I want to develop a tool that will auto install usb driver for android phones that connected to PC. I just know know android phone uses usb interface. My question is how to determine a usb device is an android phone or other devices?

What driver do you expect to install? Are you assuming that every
Android phone can use the same driver? Are you sure?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thank you for your reply.

@Tim Roberts,

It’s would be the best soluton if there is a driver that can adpat every Android phone. If it’s not imporssible, the next best solutions is we can determine an unknown device is android device or not, then we make database of url that contains information where we can get the official driver from OEM.

xxxxx@gmail.com wrote:

It’s would be the best soluton if there is a driver that can adpat every Android phone. If it’s not imporssible, the next best solutions is we can determine an unknown device is android device or not, then we make database of url that contains information where we can get the official driver from OEM.

What do you plan to DO with the device? You seem to be assuming that
every Android phone responds to USB with exactly the same capabilities,
in exactly the same way, with exactly the same set of commands. That’s
simply not the case.

It is not clear to me that you can do much better than having an
enumerated list of the VIDs and PIDs that you know how to handle.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.