Troubleshooting ADB to Glass connection

Running Windows 7 and connecting Google Glass (GG) via the Application Developer's Bridge (ADB). This is necessary for side-loading and debugging your Anroid app on your GG. There are lots of helpful tutorials and I used these:

  1. How To Install and Use ADB, the Android Debug Bridge Utility - showing necessary set up to connect to an Android device, here a Nexus 7, via ADB
  2. Google Glass Driver Install - Windows - showing necessary steps to update drivers for your GG so that it is recognized as an Android Composite ADB Interface

After following all of the steps outlined in these very helpful tutorials my GG drivers still failed to update. I had to follow these additional steps provided by @akiko009 in answer to this SO question. This is exactly what I did to get the drivers to update:

  1. Plug in your GG via provided USB cable
  2. Open Device Manager.
  3. Note Glass 1 listed under other devices
  4. Right click and select Update Driver Software
  5. Select the manual Browse my computer ... option
  6. Select the Browse button and browse to your Google USB driver directory. For me this was at C:\Users\Adam\AppData\Local\Android\sdk\extras\google\usb_driver. If you are missing this open the Android SDK Manager and look for Google USB Driver under extras and install it
  7. Click OK, ensure the Include subfolders option is selected and click Next
  8. At this point driver installation failed for me. This is where the SO article came in handy. I modified \Android\sdk\extras\google\usb_driver\android_winusb.inf as follows
  9. In Device Manager go back to your Glass 1 device, right click on it and click on Properties
  10. Click on the Details tab and select the Hardware Ids property from the drop down
  11. I had the following two values: USB\VID_18D1&PID_9002&REV_0100 and USB\VID_18D1&PID_9001&MI_00. In the .inf file, under two separate sections, there are GG drivers listed under the ;Google Glass comment. Under both of these I added the line %CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&MI_00
  12. Save, and go through the driver install process again and it works! Your Glass 1 device will disappear from the list of devices in Device Manager and wou will see Android Composite ADB Interface listed under an Android Device. That's your GG!

After doing all that leave your GG connected and turn it off. Turn it on in Recovery Mode. Look in Device Manager and notice that your GG is back to Glass 1 under Other Devices. Follow the same steps: the GG has different hardware Ids when in Recovery Mode. This time I added:

%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_9002
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_9002&REV_0100

under both of my ;Google Glass sections. Go through the driver installation process again and it works. Now, start your GG normally, or in Recovery Mode, either way it is recognized as an Android Device.

Connecting

Open a command prompt and cd to the directory where adb lives. For me this is:

C:\Users\Adam\AppData\Local\Android\sdk\platform-tools

Type adb devices and you'll see your GG listed. If you do not it's because you need to turn on debug mode on your GG. This SO article tells you how.

I can't do this yet because my GG suffers from the infinite 'stopped unexpectedly' problem. More on that later.