I am trying to communicate between a Linux PC and an Android phone over USB using the AOA protocol.
All of the resources I've been able to find, including the documentation and source code examples like this, seem to expect the VID of a device that supports the Android Open Accessory protocol to be 0x18d1
.
However, I'm trying to test this on a Samsung Galaxy S10e, and the VID is 0x04e8
instead. I already installed a dummy app on this phone that has a USB accessory intent filter, but no luck.
How do I get the Samsung phone to act in USB accessory mode? Is it already enabled, and the VID of 0x18d1
only applies to Google phones? Or do I have to do something to get the VID to change? If the former is the case, then how can I check whether a given USB device is an Android phone?
It seems that the VID of the Android device will change to 0x18d1
only when accessory mode has already been activated. This seems to mean that I have to detect Android phones some other way, attempt to activate accessory mode, and then see if it works.