Debugging Android programs on real device is easy. You just need to follow guide and everything will work. That is theory at least.
All instructions worked just fine up-to point where USB driver had to be installed. Dreadful “Driver not found” was all I was getting. Problem was obvious. My HTC Desire was just too new to be included in driver pack.
However, I had a hunch. “USB Driver for Windows, Revision 3” that was available to me was one that included support for Nexus One. Since Desire seems pretty close to it, I wanted system to use Nexus drivers anyhow.
First thing to do is right-click on My Computer, select Manage and go to Device Management. There you will see ADB device with yellow question mark. Right-click on that device and select properties. Under tab Details there is one combo box with properties. There we need to see “Hardware Ids”.
In case of HTC Desire hardware IDs in question were “USB\VID_0BB4&PID_0C87&REV_0100&MI_01” and “USB\VID_0BB4&PID_0C87&MI_01”. In “android_winusb.inf” file I just copied two entries for Google Nexus (“%SingleAdbInterface%” and “%CompositeAdbInterface%”) and replaced their hardware IDs with hardware IDs for Desire (with slight trimming). Changes are highlighted:
... ;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 ; ;HTC Desire %SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C87 %CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C87&MI_01 [USB_Install] ...
And voilà, we have our driver ready.
P.S. While I talk about HTC Desire here, there is no reason why same method would not work for any other Android phone, providing that it is compatible (on USB communication level) with Nexus.
[2010-06-17: At least in case of Windows 7 and it’s “No driver found” error, it is enough to add only
%CompositeAdbInterface%. I haven’t tested on other operating systems but I think that
%SingleAdbInterface% is not used at all.]