Arduino ADK Board with any 2.3.4+ Android smartphone

Simple question: does Arduino ADK board work with all Android 2.3.4+ smartphones?
On Android Developer site we find this: "Device manufacturer (of smartphones with 2.3.4+ version ) can or cannot support adk ", while with 3.x version hasn't problems
So can I connect via USB any 2.3.4+ smartphne to Arduino ADK board without trouble or not?

I'm working on this with slow progress. I found if you have android version 2.3.4 or higher it may be possible but I do not have an answer yet. I have DemoKit running on my Samsung Epic 4G and asking "Please Connect a DemoKit board" but nothing happens when I plug it in. In order to get this far, the key is the files I am including in the attachment.

The android.hardware.usb.accessory.xml file goes in the "/etc/permissions/" folder and the com.android.future.usb.accessory.jar goes in the "/system/framework/" folder.

Both have to have "rw-r--r--" attributes.

Now the trick is that you must have root access in order to pull this off with a simple file explorer utility and if you are real good you can use adb to push the files on to your phone. I chose the rooted way since I already had, and kept moving forward.

FYI both of these files are taken from a version of gapps that belongs to a Nexus S. So what we are doing is trying to add the USB accessory feature of a Nexus S to our much less expensive, not professional software development intended, android devices.

If anyone can help with the board to android communication issue I'm working on, he he... this thread will definitely get a lot of hits.

I suspect accessory mode is still not quite running on my device although the missing shared library issue no longer keeps the program from installing and trying to run. I can post a LogCat log if it will help....

com.android.future.usb.accessory.zip (3.45 KB)

I've gone over the Nexus source and still no missing files to add. I do not have any solid informaiton on wether or not the Samsung Epic 4G will support Accessory mode.

It would be really helpful if there were a way to verify the second USB port works correctly with the Android SDK code.

A workaround which uses android adb instead of Accessory mode can be found at this link:

MicroBridge
http://romfont.com/2011/05/15/microbridge-adb-support-for-arduino/

I will try to keep updates going..

Update

I finally have a response from my board.

I was beginning to think the board was damaged. I would load DemoKit following the instructions and see the word setup on the Serial Monitor. My phone does not support Accessory mode yet but I thought I was supposed to see the board try to connect.

I tried the USB shield sketch available at Circuits @ Home and started getting Error: OSCOKIRQ failed to assert which can be explained as having a bad oscillator. I didn't understand why it would respond with setup using one sketch and show an error with another.

I found so much more information on the Arduino web site. At the top of the screen, select Labs and you will find an alternative way to develop Android/Arduino ADK applications, the Arduino version that the development team is using and examples as well as a better tutorial.

I followed the tutorial and loaded the adk_digital_write app to my phone using Processing and adk_digital_write sketch to my board using Arduino 1.0 Beta and finally see the following using serial monitor.

Device addressed... Requesting device descriptor.
found possible device. swithcing to serial mode
Data packet error: 5could not read device protocol version

Device addressed... Requesting device descriptor.
found possible device. swithcing to serial mode
Data packet error: 5could not read device protocol version

Device addressed... Requesting device descriptor.
Setup packet error: D
Device descriptor cannot be retrieved. Trying again

Device addressed... Requesting device descriptor.
Setup packet error: D
Device descriptor cannot be retrieved. Trying again

I'm so happy my ADK board is not bad and can talk to a device that supports Accessory mode. Using Processing is more the way I want to develop with android. I understand why the Arduino development team has chosen to use it. Eclipse is harder to learn and closer to xml / Java while Processing feels more like C/C++. I'm sure you will still have to work a little with xml but I personally really like what the Arduino development team has chosen and feel better knowing the ADK is alive and moving forward. I was afraid there would be no support for this board or it would stop but that's not the case.

Best of all the Arduino development team has examples using Android Adb so I will be able to use my phone even though it does not support Accessory mode...