Saturday, April 30, 2011

Starting Android Development with Motorola Xoom

I was excited to finally purchase Motorola Xoom tablet, and even more excited at the thought of starting android development for the tablet. So, as soon as I reached home, I connected the xoom to my PC, and was eager to push an existing app from eclipse workspace to the tablet… things are never easy… are they… there is always a roadblock… and, later, once you solve it, the sheer joy!..

The Problem

Eclipse/ADB was not ready to push the APK file into the device. When looking at the list of devices, it does come up, but it shows as “unknown” target, and offline, as shown in screen shot below:

image

 

Cause

There are 2 primary reasons for the above problem

1) Xoom Driver
2) Google has not included Xoom in their driver ini files (yet).

At the time of writing this BLOG, you can download driver files from following location:

http://www.motorola.com/Support/US-EN/Support-Homepage/Software_and_Drivers/USB-and-PC-Charging-Drivers

Solution

First, download and install the driver from above URL, and make sure your OS recognizes  Xoom. Now comes the part where we are going to tell ADB to use debug drivers provided by Google to debug apps in your new Xoom tablet. To do this, follow these steps:

  1. Go to your SDK installation folder, and find a folder named “google-usb_driver”.
  2. In the folder, you will see a file named “android_winusb.inf”
  3. Open the file in notepad or another text editor
  4. Paste the following at the end of sections labelled “[Google.NTx86]” and “[Google.NTamd64]”

;
;Xoom
%SingleAdbInterface%        = USB_Install, USB\VID_22B8&PID_70A9
%CompositeAdbInterface%     = USB_Install, USB\VID_22B8&PID_70A9&MI_01

 

Restart your ADB and make sure you have debug mode turned on in your device by going to your device application settings (Standard Android app development stuff)…. but if you dont know what I am talking about, please head over to : http://developer.android.com/resources/faq/commontasks.html#neweclipseandroidproject

Once done, your device listing should look like the following:

image

 

References

http://community.developer.motorola.com/t5/Android-App-Development-for/Getting-USB-Debugging-ADB-working-with-Xoom/td-p/12060