I'm working with the latest freescale android version 4.2.2 on a custom board with i.MX6DL. Every time I tried to connect the Arduino 2 board through USB OTG port android detect it as media device. Debugging the kernel code I found that enable debug messages inside the file arcotg_udc.c cause android to detect Arduino as USB accessory as shoud correctly be. It seem the debug messages introduce some delay that allow the device to be detected correctly. To be more specific the problem is the indetification string (manufacturer, model, description and so on) sent from arduino device are not received correctly and I can see this error in the terminal:
acc_complete_set_string, err -108
Since android can not know the type of device assign media device as default. Currently I'm not able to figure out the problem yet.
Someone have a suggestion for this issue?