Search This Blog

Thursday, 28 July 2011

Getting a Nexus S to connect to a PC running Windows XP

In an effort to prevent anyone else going through the misery and frustration I've just experienced, I will now document the steps I had to go through to get my Nexus S to talk to my PC.

Obviously I'm not talking about seeing the phone's file system as an external drive; I mean having the phone show up in the Device Manager so that you can try your hand at developing on it. Sparing you all the false starts and dead ends that I went through, and assuming you've already installed the Android SDK and have a USB cable that fits into the phone, proceed as follows:
  1. Start up the Android SDK Manager.
  2. See if 'Google USB Driver Package' is listed under Installed Packages.
  3. If it isn't, it should be under Available Packages. Select it and click the Install Selected button
  4. Enable debugging on the phone in Settings/Applications/Development.
  5. Disconnect the phone's USB cable, then reconnect it.
  6. The PC should report having found a new device, and bring up a wizard to ask you whether you want to install a driver. Cancel out of this wizard.
  7. Go into Device Manager (right click My Computer and select Manage), and find the phone under 'Unknown devices'. Right click on it and select Properties/Details. Note the two four-digit numbers after VID_ and PID_.
  8. Open the file C:\Program Files\Android\android-sdk\extras\google\usb_driver\android_winusb.inf for editing.
  9. Add in an entry for the Nexus S, using the VID and PID revealed from the device manager. It should look like this:
    ; Google Nexus S
    %SingleAdbInterface% = USB_Install, USB\VID_XXXX&PID_YYYY
    %CompositeAdbInterface% = USB_Install, USB\VID_XXXX&PID_YYYY&MI_01
The values of XXXX and YYYY you should have noted down above in step 7.

Now use the Device Manager to Update Driver for the phone, telling the wizard to search in the C:\Program Files\Android\android-sdk\extras\google\usb_driver folder.

In the Device Manager, the Nexus S should now move from 'Unknown devices' to 'Android Phone'.

Of course, for you any one of these steps might go wrong. However, even then I hope this blogpost might give you the clues you need to get to your goal.