Every time I plug my Nexus 7 into my laptop to do development, I cringe knowing that I most almost certainly have 45 minutes of driver and cable wrestling ahead of me.
And so it was this morning. I plugged in my Nexus 7 and didn't hear the right set of chirps. When I ran adb.exe devices I saw that no devices were found.
I didn't panic. Being a good little Windows user, I opened up Control Panel » Device Manager and was greeted by the Yellow Exclamation Mark of the Death:
Still, I didn't panic. For the 100th time, I went ahead and installed the Google USB Driver. The process has gotten quite a bit simpler. You can download just the driver here, rather than downloading all of Eclipse and an SDK Manager, just so you can then install the driver.
Regardless, all was going smoothly. I unpacked the driver and using Device Manager was able to browse to the correct directory to update the driver. That's where things went South. Rather than installing the driver I just downloaded and hearing the sweet sound of Angels Singing (aka: the USB chirps associated with a known device) I was shown this screen:
What the heck? This screen popped up immediately, it's like Windows wasn't even trying to install the drivers.
I then tried all the usual things: rebooted my laptop, rebooted the tablet, uninstalled and re-installed the Nexus 7 device from Device Manager. I even downloaded all of Eclipse and grabbed the USB driver using that mechanism. I Googled for everything I could think of. Nothing.
Yet, within android_winsub.inf there's the following block:
[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 %CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E42&MI_01 %CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E44&MI_01
No wonder the driver wasn't being recognized, the device was reporting itself with PID D002 and the closest device on file was PID 0D02.
A typo perhaps?
I mucked a bit with the inf file, which actually got Windows to attempt to install the driver. But then it complained about a hash value being off, which makes sense as my edits were almost certainly not Kosher.
Finally, I went back to the device and fiddled around further. After navigating the menus for the 900th time, I noticed that under Settings » Storage there was an additional menu option at the top of the page (that skinny little menu handle that Google is loving, and me not so much). I clicked it, and then selectd USB computer connection.
I then realized that both MTP and PTP were unselected.
For the heck of it, I clicked "connect as" Media Device (MTP).
Doing so caused one of those sweet USB chirps to occur. I switched back to the Device Manager and my unknown Nexus 7 device was gone, instead I had a new section for Android Device:
And that did, all my problems were solved.
I can't even begin to describe how unimpressed I am by this. But, I'm glad it's fixed. And I'm sure next time I plug in the device, I'll have a whole new challenge to deal with.