2. What is it?
● USB protocol that allows communication between Android devices and accessories in
accessory mode
● AOAv1 - supported since API 12, with lib since API 10, supports basic communication
● AOAv2 - supported since API 16, adds audio streaming and HID capabilities
● Device is USB host and accessory is USB client
3. How does it work? Android app
● App declares itself to handle an accessory or accessory family
● App handles specific intents
● UsbAccessory object is attached to that intent in a Bundle
● Once it is obtained, transfer of data between USB device and Android device is possible
4. How does it work? Accessory
● Accessory sends series of specific USB control commands:
○ Get AOA version - device returns integer, currently 0 for not supported, 1 or 2 if supported
○ Accessory identifies itself by sending its vendor, model, manufacturer URI and serial number, which
should match what Android application declared as supported devices
○ If Android device returns valid status on all of those, it sends “go to AOA mode” command
● Android device disconnects from USB and reconnects in AOA mode with static PID and VID
● At this stage, if everything went well, Android OS sends the intent to the application with
UsbAccessory object which is describing the accessory
5. Declaring support for AOA
res/accessory_filter.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<usb-accessory manufacturer="Tikal" model="Shaul haGadol" version="1.0"/>
</resources>