Wednesday, August 22, 2012

Installing the USB driver for a Galaxy Nexus on Windows 7

For those who have been through this, you appreciate the wry comment on Using Hardware Devices "If you're developing on Mac OS X, it just works. Skip this step." If you haven't, and you're struggling to get your shiny new Google Galaxy Nexus attached to your PC for development work, read on and perhaps you're having the same problems I had.

I recently bought a Galaxy Nexus phone from Google as a development target for an Android project. Until now, I've been happily developing using the emulator. Recently I got to the point where I really need to begin working with a real device, as my application reads sensors in the device.

The Goal: Attach a Galaxy Nexus to my Windows 7 development machine, and use Eclipse to load my application. Easy! Right? Well, not as easy as it should have been. What follows are the steps I had to go through to get it working.

1. Plug the Galaxy Nexus into the PC using the supplied USB cable.

Result: the phone is recognized as a storage device and I can browse the filesystem using Explorer. Yay!

Not so fast. No premature celebrations.

2. Run my application from Eclipse. This is documented to prefer a real device and as long as there are no emulators running, the app should be pushed to the device and started.

Nope. No sign of the device in Eclipse.

More research. The Setting Up a Device for Development section of Using Hardware Devices discusses the need to install the USB driver on Windows machines.

Hmm. I don't have the documented \extras directory.

Browsing the SDK Manager, I notice that I haven't downloaded the Google USB driver. Excellent! Just download this, install it and we'll be off to the races.

3. Use the SDK Manager to download the Google USB Driver (it's currently in the last section titled Extras).

4. Follow the instructions in OEM USB Drivers to update the driver for the Galaxy Nexus.

Sadness grows. The Device Manager is certain that it can't find the driver for the device. More Googling. Find references to the Samsung CCH-1515 driver distribution. Excellent. *This* has to be the driver.

5. Download and install the Samsung driver from here.

BSOD before the installation finishes. Reboot. Now there is no sign of the Galaxy Nexus at all! Explorer sees no block storage, and Device Manager no longer has the Other Devices node at all.

6. Start Windows Update. Yay! There *is* an update from Samsung for the Mobile USB Composite Device. No sign that it's related to the Galaxy Nexus, but it's a) from Samsung and b) some sort of USB driver update. Download and install it. Wait while Device Manager refreshes its view several times (on each refresh the device configuration changes). After a few refreshes it settles down and displays a new top-level node SAMSUNG Android Phone. Ok, this is not as comforting as Galaxy Nexus, but let's see if we can see what's changed.

7. Run my application from Eclipse. Success. Whew, that was easy.

hth




3 comments:

  1. Thank you for this! Just followed your method and successfully ran my app on my Nexus.

    ReplyDelete
  2. Enjoyed reading your blog. When are you next articles coming? Can’t wait to read them all. Your write-up is an eye-opener on the awesome world of freelancing. I think I do have a unique skill set of collecting posters…it is more of a hobby. When I read your previous blog, I realized that I can make money with my hobby. So, I have begun selling copy prints of all the classic Hollywood posters that I possess through marketplaces such as buy best inphographics online,unique logo design. Thank you!

    ReplyDelete