Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Headaches with Android SDK again!

I know how to set up the Android SDK. I have done this multiple times over the years. And I had to do some patching of the driver for the ADB every single time! I have done it so many times routinely, I can do it blindfolded!

Why is it such a problem for Google to include a working USB driver with the Android SDK?

This is the INF file for the USB driver provided by Google.

;
; Android WinUsb driver installation.
;
[Version]
Signature           = "$Windows NT$"
Class               = AndroidUsbDeviceClass
ClassGuid           = {3F966BD9-FA04-4ec5-991C-D326973B5128}
Provider            = %ProviderName%
DriverVer           = 08/27/2012,7.0.0000.00001
CatalogFile.NTx86   = androidwinusb86.cat
CatalogFile.NTamd64 = androidwinusba64.cat

[ClassInstall32]
Addreg = AndroidWinUsbClassReg

[AndroidWinUsbClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-1


[Manufacturer]
%ProviderName% = Google, NTx86, NTamd64


[Google.NTx86]

;Google Nexus One
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_0D02&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E12&MI_01

;Google Nexus S
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E21
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E22&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E23
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E24&MI_01

;Google Nexus 7
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4E40
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E41
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E42
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E42&MI_01
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E44&MI_01

;Google Nexus Q
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_2C10
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_2C11

;Google Nexus (generic)
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4EE0
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4EE1
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4EE2
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4EE2&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4EE3
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4EE4&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4EE5
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4EE6&MI_01


[Google.NTamd64]

;Google Nexus One
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_0D02&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E12&MI_01

;Google Nexus S
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E21
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E22&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E23
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E24&MI_01

;Google Nexus 7
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4E40
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E41
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E42
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E42&MI_01
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E44&MI_01

;Google Nexus Q
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_2C10
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_2C11

;Google Nexus (generic)
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4EE0
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4EE1
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4EE2
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4EE2&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4EE3
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4EE4&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4EE5
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4EE6&MI_01

[USB_Install]
Include = winusb.inf
Needs   = WINUSB.NT

[USB_Install.Services]
Include     = winusb.inf
AddService  = WinUSB,0x00000002,WinUSB_ServiceInstall

[WinUSB_ServiceInstall]
DisplayName     = %WinUSB_SvcDesc%
ServiceType     = 1
StartType       = 3
ErrorControl    = 1
ServiceBinary   = %12%\WinUSB.sys

[USB_Install.Wdf]
KmdfService = WINUSB, WinUSB_Install

[WinUSB_Install]
KmdfLibraryVersion  = 1.9

[USB_Install.HW]
AddReg  = Dev_AddReg

[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{F72FE0D4-CBCB-407d-8814-9ED673D0DD6B}"

[USB_Install.CoInstallers]
AddReg    = CoInstallers_AddReg
CopyFiles = CoInstallers_CopyFiles

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"

[CoInstallers_CopyFiles]
WinUSBCoInstaller2.dll
WdfCoInstaller01009.dll

[DestinationDirs]
CoInstallers_CopyFiles=11

[SourceDisksNames]
1 = %DISK_NAME%,,,\i386
2 = %DISK_NAME%,,,\amd64

[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll  = 1
WdfCoInstaller01009.dll = 1

[SourceDisksFiles.amd64]
WinUSBCoInstaller2.dll  = 2
WdfCoInstaller01009.dll = 2

[Strings]
ProviderName                = "Google, Inc."
SingleAdbInterface          = "Android ADB Interface"
CompositeAdbInterface       = "Android Composite ADB Interface"
SingleBootLoaderInterface   = "Android Bootloader Interface"
WinUSB_SvcDesc              = "Android USB Driver"
DISK_NAME                   = "Android WinUsb installation disk"
ClassName                   = "Android Device"

This driver can be obtained through the SDK Manager and that's how I got it. It sits in the installation directory Android\android-sdk\extras\google\usb_driver.

Why are there no entries for HTC or Samsung phones?

Now this is the INF file for the driver I used in the past (but for the same phone).

;
; Android WinUsb driver installation.
;
[Version]
Signature           = "$Windows NT$"
Class               = AndroidUsbDeviceClass
ClassGuid           = {3F966BD9-FA04-4ec5-991C-D326973B5128}
Provider            = %ProviderName%
DriverVer           = 08/11/2009,2.0.0010.00002
CatalogFile.NTx86   = androidwinusb86.cat
CatalogFile.NTamd64 = androidwinusba64.cat

;
; This section seems to be required for WinUsb driver installation.
; If this section is removed the installer will report an error
; "Required section not found in INF file".
;
[ClassInstall32]
Addreg = AndroidWinUsbClassReg

[AndroidWinUsbClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-1

[Manufacturer]
%ProviderName% = Google, NTx86, NTamd64

[Google.NTx86]
; HTC Dream
%SingleAdbInterface%        = USB_Install, USB\VID_0BB4&PID_0C01
%CompositeAdbInterface%     = USB_Install, USB\VID_0BB4&PID_0C02&MI_01
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0FFF
; HTC Magic
%CompositeAdbInterface%     = USB_Install, USB\VID_0BB4&PID_0C03&MI_01
; HTC Desire
%CompositeAdbInterface% = USB_Install, USB\VID_0bb4&Pid_0c94
;
;Moto Sholes
%SingleAdbInterface%        = USB_Install, USB\VID_22B8&PID_41DB
%CompositeAdbInterface%     = USB_Install, USB\VID_22B8&PID_41DB&MI_01
;
;Google NexusOne
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_0D02&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E12&MI_01

[Google.NTamd64]
; HTC Dream
%SingleAdbInterface%        = USB_Install, USB\VID_0BB4&PID_0C01
%CompositeAdbInterface%     = USB_Install, USB\VID_0BB4&PID_0C02&MI_01
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0FFF
; HTC Magic
%CompositeAdbInterface%     = USB_Install, USB\VID_0BB4&PID_0C03&MI_01
; HTC Desire
%CompositeAdbInterface% = USB_Install, USB\VID_0bb4&Pid_0c94
;
;Moto Sholes
%SingleAdbInterface%        = USB_Install, USB\VID_22B8&PID_41DB
%CompositeAdbInterface%     = USB_Install, USB\VID_22B8&PID_41DB&MI_01
;
;Google NexusOne
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_0D02&MI_01
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E12&MI_01

[USB_Install]
Include = winusb.inf
Needs   = WINUSB.NT

[USB_Install.Services]
Include     = winusb.inf
AddService  = WinUSB,0x00000002,WinUSB_ServiceInstall

[WinUSB_ServiceInstall]
DisplayName     = %WinUSB_SvcDesc%
ServiceType     = 1
StartType       = 3
ErrorControl    = 1
ServiceBinary   = %12%\WinUSB.sys

[USB_Install.Wdf]
KmdfService = WINUSB, WinUSB_Install

[WinUSB_Install]
KmdfLibraryVersion  = 1.7

[USB_Install.HW]
AddReg  = Dev_AddReg

[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{F72FE0D4-CBCB-407d-8814-9ED673D0DD6B}"

[USB_Install.CoInstallers]
AddReg    = CoInstallers_AddReg
CopyFiles = CoInstallers_CopyFiles

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01007.dll,WdfCoInstaller","WinUSBCoInstaller.dll"

[CoInstallers_CopyFiles]
WinUSBCoInstaller.dll
WdfCoInstaller01007.dll

[DestinationDirs]
CoInstallers_CopyFiles=11

[SourceDisksNames]
1 = %DISK_NAME%,,,\i386
2 = %DISK_NAME%,,,\amd64

[SourceDisksFiles.x86]
WinUSBCoInstaller.dll  = 1
WdfCoInstaller01007.dll = 1

[SourceDisksFiles.amd64]
WinUSBCoInstaller.dll  = 2
WdfCoInstaller01007.dll = 2

[Strings]
ProviderName                = "Google, Inc."
SingleAdbInterface          = "Android ADB Interface"
CompositeAdbInterface       = "Android Composite ADB Interface"
SingleBootLoaderInterface   = "Android Bootloader Interface"
WinUSB_SvcDesc              = "Android USB Driver"
DISK_NAME                   = "Android WinUsb installation disk"
ClassName                   = "Android Phone"
; HTC Desire
%SingleAdbInterface% = USB_Install, USB\VID_0bb4&Pid_0c94&Rev_0100
%CompositeAdbInterface% = USB_Install, USB\VID_0bb4&Pid_0c94
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&Pid_0c94

This driver was downloaded from XDA Developers forum, from this thread. I have revisited this thread every time I had to install Android SDK. The trick that the author uses is to simply replace the hardware IDs in the INF file to those that actually correspond to the actual hardware device that's being connected.

If I am not mistaken I had the same ID as the author describes in the thread, that is USB\VID_0bb4&Pid_0c94. But now when I check it I have a different one.

driver properties

I recently flashed the phone. But I used the RUU original image, with the same build number as the one that was already on the phone. The RUU was the HTC original ROM Update Utility that was used to flash it. I had to do this to enable the use of Unrevoked to root and then Alpha Rev to set S-OFF. Could it be that, in some way, this changed the hardware ID? I thought hardware IDs were supposed to be permanent and fixed to the hardware?...

Using the second driver, with unedited INF file, and trying to update the ADB device in Device Manager, this is what it says.

driver update

driver update

It just simply fails to install it, because the IDs don't match. Now, these are the lines that I used in the edited version of the INF file. These now include the actual IDs of my phone.

[Google.NTx86]
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C87&MI_01

[Google.NTamd64]
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C87&MI_01

[Strings]
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C87&REV_0226
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C87
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0C87

So now when I try to update the driver again I get to the warning message, you know the usual Windows warning about installing software of unknown source.

driver update

So I click to install it anyway.

driver update And it tries to install it but then halts and says that installation failed and something about ADB Composite.

So why does it fail to install? And why was my hardware ID changed in the first place?

Is there no "normal" way of installing this stupid driver? You know, without having to hack the damn thing or play tricks with it?...

I know that some users suggest that one should obtain the latest sync software from the manufacturer because with that also come some USB drivers that are necessary to have. But I don't want any of the HTC bloatware. And I don't have any problems transferring files between the phone and the computer when in "Disk drive" mode. So I don't need anything else. And isn't this the driver for using the ADB (Android Debug Bridge) which is part of Android SDK? I mean shouldn't Google be the one that provides a working driver then?...

Just for the record, the phone in question is HTC Desire, the original one. You know, the first one, not any of its' many siblings that followed.

Please have a look at this, and let me know what you think this could be. And also let me know if you know of any alternative ways of doing this, just for future use. I am sick and tiered of having to this every single time I want to install the Android SDK. I normally only do that when I need to reinstall Windows, but once installed and set up I usually don't touch it, but I do reinstall Windows at least two times a year.

share|improve this question

migrated from superuser.com Mar 27 '13 at 22:50

This question came from our site for computer enthusiasts and power users.

1  
I think the solution is that @Sammy just needs to install drivers from HTC because I don't think they are included with the SDK. I have to do this for my Note. –  Nathan Adams Mar 27 '13 at 19:45
    
How do you obtain the drivers without installing anything else on the computer? And do these drivers work for the ADB or only for HTC Sync and such? –  sammyg Mar 28 '13 at 9:14
    
You might have better luck using the SDK on Linux. At least, I never had to install LG drivers for my device. –  NoBugs Apr 6 '13 at 18:27

1 Answer 1

up vote 0 down vote accepted

I had to change the last part of the INF file.

[Strings]
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C87&REV_0226&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C87&MI_01
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0C87&MI_01

It worked perfectly after this change.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.