Let's Make Robots!

Android Open Accessory DIY DemoKit

At the Google I/O 2011 the new Android Open Accessory Development Kit (ADK) has been published. This allows to connect Accessorys to your Android phone and communicate between the Accessory and the Android via USB. The Accessory has to implement an USB Host, while the Android acts as a USB client.

Unfortunatey, the Accessory Mode is only supported by the newest Android Software which is v2.3.4 for mobile phones and v3.1 for tablets. So only a few existing Android mobile phones can use this new USB modes. The Nexus One and the Nexus S for example.

Lucky me, I own a Nexus One, but this had a branded Firmware from Vodafone with v2.1. So I decided to void the warranty and root the device, to get away from the branded firmware and swap to the actual Google firmware. 

The ADK page describes, what is needed, to get started with Accessory mode. The DemoKit App has been used without any modification. Instead of the Demo Kit I have build my own DIY DemoKit with an Arduino Uno, a Sparkfun USB Host shield and a selfmade IO shield.

The Sparkfun Host shield will not work with an Ardunio Mega or Mega2560 because of the different SPI pins. You can use the USB host shield from Circuits@home  instead. This will work with all Arduinos buit is more expensive (40$).

The Arduino Firmware has been ported to Arduino Uno / Mega by Romfont alias Inopia, the guy who developed the MicroBridge (Android to Arduino Bridge via ADB). Because he didn't own a Android phone with v2.3.4 he asks for help to test his firmware. The firmware works with some minor modifications and is attached to this blog entry.


Stackable Headerws has been used on the USB Host shield, so the IO shield can be attached above. At the moment a micro servo, a RGB LED, a Red LED (instead of a Relais) and a Sharp GP2D12  distance sensor has been succesfully tested with this DemoKit.  An external power supply is needed to power the


DIY-demokit.zip36.03 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Great post. Time for me to test this with my phone. I'm sure a lot of us have some old android phones lying around that we can start hacking on.

If you have an older phone without actual firmware you can use the ADB instead of ADK. The biggest problem for me is the Java programming for the Android part.

Just saw your post on romfont.com. It's great to know somebody is working with it. We als try to connect the arduino with Android phones for remote controlling hacked flash lights ;-) (turning flash head etc.)

I was just about to order some Microchip USB host chips when I saw the Google I/O presentation... the ADK is exactly what I wanted to do... and more! 

Microchip has announced a Accessory Developer Kit based on a PIC 24F. So this should be another way to go. Wonder why Google didn't support USB OTG.

I just need a phone :P - 

Maybe I can just use the 2.3.4 emulator?

Thanks !

Thank you GroG.

Yes, it should be possible to use the emulator. The DemoKit App has an option to simulate the connected accessory. So you can build and test your App without a phone/accessory.

Thats really good. I've rooted my htc evo to Android 2.3.4 but I'm still missing libraries - I get 


Anyone had any luck? Author, any tips on updating the phone? I may have to buy a new one. Anyone recommend a cheap Android 2.3.4 phone?


Running the DemoKit Android application

The DemoKit Android application runs on your Android-powered device and communicates with the ADK board. The ADK board receives commands such as lighting up the board's LEDs or sends data from the board such as joystick movement and temperature readings.

To install and run the application in Eclipse:

  1. Install the Google APIs API Level 10 add-on library, which includes the Open Accessory library for 2.3.4 devices that support accessory mode. This library is also forward compatible with Android 3.1 or newer devices that support accessory mode. If you only care about Android 3.1 or newer devices, all you need is API Level 12. For more information on deciding which API level to use, see the USB Accessory documentation.
  2. Click File > New > Project..., then select Android > Android Project
  3. In the Project name: field, type DemoKit.
  4. Choose Create project from existing source, click Browse, select the app directory, and click Finish.
  5. For Build Target, select Google APIs (Platform 2.3.3, API Level 10).

    Note: Even though the add-on is labeled as 2.3.3, the newest Google API add-on library for API level 10 adds USB Open Accessory API support for 2.3.4 devices.

  6. Click Finish.


I think point 5. is the answer for your problem.



The app starts ok in the Android emulator - its just that even though my HTC Evo now says its 2.3.4, its not completely 2.3.4! I suspect the library its missing comes from the Google Apps zip. I have tried installing every gapps-xxxxx.zip I can find, but no luck :(

Did you have any trouble updating your Nexus One? Do you have a link to the site you used to update it?