Tuesday, November 1, 2011

T-Mobile G2 with Android Debug Bridge (ADB) and Flash Builder 4.5 on Windows 7 64 bit


I recently developed an application for the Android market and was excited to test it out on an actual Android device. I plugged in my T-Mobile G2 phone, set the USB Debugging and the Unknown Sources options (found in Settings -> Applications [USB Debugging is in the section Development]). Windows 7 said it found a new device but was unable to install drivers specifically for the G2.

First Attempted Solution - FAILED:

After reading many blogs and forums on how to fix this issue, I decided on one method and started downloading software (HTC Sync) and following the poor instructions given by the blogger. Once all was said and done, it didn't end up working right. ddm found a device but it was always offline.

Final Solution - SUCCESS:

 So I back tracked everything uninstalling software and uninstalling drivers for the device. I decided to follow some direction given in forums I was reading through and did the following. I went to where Flash Builder was installed, for me that is C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\utilities\drivers\android. As the path shows continue to navigate to the android directory. In that directory you will see an android_winusb.inf. This file is a driver for many android devices (except the G2). Next, I added the two lines of code below into the android_winusb.inf file. One under under the sections [Google.NTx86] and [Google.NTamd64]. Then I used the Device Manager on my computer to find the Android Phone and then locate this file as the driver for that device.

Add the lines below to sections [Google.NTx86] and [Google.NTamd64] in the file:
C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\utilities\drivers\android\android_winusb.inf

;T-Mobile G2 - Start of code
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C91
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C91&MI_01
;End of Code

Good luck devs.

* The forum that assisted in helping me solve this problem is xda-developers.com.