Monday, March 25, 2013

Configure Google Nexus 7 to work with Android SDK Tools / ADB.exe

I wanted to deploy my first “hello world” Android application from Eclipse on Windows 8 to my Google Nexus 7 tablet. I plugged the Nexus 7 into my development PC using the USB cable and then I used adb.exe to list the devices, but no devices were found.

The summary of steps I took to get the device to show with ADB:

  1. Enabled the USB debugging setting on the tablet
  2. Changed the USB connection mode to Camera (PTP)
  3. Updated the Google USB Driver in Windows

Initially Adb.exe shows no devices:

01-adb-shows-no-devices

If the Android emulator is running, it shows as the only device:

02-adb-shows-only-emulator

The first step is to enable the Developer options the Nexus 7. Go to Settings –> About tablet. Then tap the “Build number” 7 times!

02-tap-build-number-7-times

Now you will see the “Developer options” setting. Go into Developer options and enable the “USB debugging” setting:

02-enable-usb-debugging

When you get the “USB debugging connected” notification, tap the “Connected as a media device” option.

02-usb-connected

The default USB mode is “Media device (MTP)”, change this to “Camera (PTP)”:

02-select-camera-ptp-mode

Install the Google USB Driver using Eclipse / ADT: Window –> Android SDK Manager. In the Android SDK Manager, select Extras –> Google USB Driver. This installs the driver to your android SDK folder under sdk\extras\google\usb_driver.

Now update the device driver using Device Manager in Windows 8:

03-open-device-manager-win8

Find the “Nexus 7” device in the Device Manager under “Other devices”, then right click and select “Update Driver Software…”:

04-device-manager

Provide the path to the Google USB Driver:

05-select-driver

Select “Always trust software from Google Inc” and install the driver:

06-install-driver

Now the “Android Composite ADB Interface” will show in the Device Manager:

07-android-device-in-device-manager

Run ADB.exe again and confirm the new device is available. It may show as offline:

08-adb-shows-new-device

If the device shows as “offline”, then make sure to confirm on the tablet that you allow USB debugging:

08-allow-usb-debugging

Now the device is online:

09-nexus-online

That’s it!

I’m using Windows 8 64bit, Android Developer Tools (ADT) v21.1.0-569685 and the Nexus 7 is running Android 4.2.2. I used the information on this StackOverflow post to figure everything out.

7 comments:

interest-rates.org.uk said...

I spent days tearing my hair out. You solved it. Many thanks!

interest-rates.org.uk said...
This comment has been removed by the author.
Thomas Woods said...

Thank you!

gaspard said...

Just to say THANK YOU!

Sarnab Podder said...

Thanks!

Michael Daniels said...

Thank goodness for your completeness. It was difficult to find a complete answer to the question at hand in getting this setup. I appreciate you taking time to step through all the steps..

Patrick Wright said...

Thank you good man!