[Q] Adding Android Open Accessory (AOA) protocol to defy (CM10)

xinrag

Member
Feb 14, 2012
29
14
0
Hi all!

I will try to get the Android Open Accessory (AOA) protocol into our defy/defy+.

Anybody else working on this topic?

Atm I just added the android.hardware.usb.accessory.xml file to /etc/permissions and the com.android.future.usb.accessory.jar to /system/framework (jar taken from the droid sdk API16, my fw is latest quarx CM10).

Right now I can install f.w. the ADK2012 app. So I may on the right way... but I guess that is not all the work... does anybody know if we need to add some kernel modules f.e.?

[Edit] btw... looks like we just need to add a new f_accessory.o to our usb gadget... f.e. see https://www.codeaurora.org/gitweb/q...in;h=5d9d8625e39f815673dedea353f39edccabb1fac
Best regards, Stephan
 
Last edited:

labsin

Senior Member
Apr 17, 2011
667
234
0
Antwerp
Like to know this to. If quarx managed to give us sub host, I might be able to use my duomilanove board...
Aren't there other projects for the ADK that doesn't use the protocols?
 

xinrag

Member
Feb 14, 2012
29
14
0
Ok... I gave it a short try with the patch and quarx's linux-2.6.32 but it failed during the compiliation... but meanwhile I noticed that quarx is working on linux-3.0.8 (see its repo in github). There we have our accessory...
So I would say stay tuned for a while and let's if quarx may got this newer kernel working with our defy...
 
Last edited:

labsin

Senior Member
Apr 17, 2011
667
234
0
Antwerp
You can find all the steps needed to patch it here:
https://github.com/ezterry/manifest-gingerbread-DS/issues/32

They're saying everywere that you need 2.6.35+ kernel (don't know if it really is mandatory, kernel in the link is 2.6.34)

A kernel with the same chipset that has it enabled can be found here:
https://github.com/XDA-Bam/samsung_kernel_latona_GB

Apparently, you need to enable it in the kernel (config), add the libs to the kernel (driver/usb/f_accesory and include/linux/f_.accesory), add the lib in the framework (might be included from CM side already??), hope it will work (or debug why not).

---------- Post added at 01:21 AM ---------- Previous post was at 01:06 AM ----------

It seems that the files are indeed in the 3.0 kernel.
I already ordered a USB-host shield for my arduino a week ago, I'll try and compile a kernel with it ones it comes in the mail.

Edit:
Tried the changes I listed, will build it tomorrow (or so). Maybe then my shield might arrive to (hate waiting, stupid holidays.. :D)
Any place to upload it when it works?
 
Last edited:

labsin

Senior Member
Apr 17, 2011
667
234
0
Antwerp
Got something build, but it didn't include the /system/framework/com.android.future.usb.accessory.jar and got bootloop without (cause I added the /etc/permision/something_with_usb_accesory.something
Pushed the jar with adb from bootmenu (from another CM rom).

Don't have the usb_shield yet, so can't really test. Will try and install an usb_accessory app. Does someone want the build to try?

Ok, the app fails to launch.
 
Last edited:

labsin

Senior Member
Apr 17, 2011
667
234
0
Antwerp
Might it be possible to check the driver?

Edit: Found it.
It seems to many commits need to be merged in. Can't seem to find a kernel that's not based on the nexus line that has it.
 
Last edited:

SlugZero

Member
Sep 11, 2012
38
647
0
If anyone is still interested in this, I managed to make an Arduino Mega ADK board with the DemoKit application work in accessory mode on my Defy:)

Quarx backported the USB gadget driver from 3.0.8 kernel into his 2.6.32 based kernel already a while ago. All that was still missing was the accessory configuration in init.usb.rc and the .jar and .xml files. Quarx has already merged my pull request, so in the next CM10.1 nightly with 2.6.32 kernel, USB accessory mode should work out of the box:)
 
  • Like
Reactions: labsin