As the title states, I am having troubles enumerating a specific USB device on a USB capable Android phone using UsbManager.getDeviceList(). I've had no trouble enumerating and communicating with other USB devices on this and other phones, but this specific USB device cannot be found. It also cannot be enumerated with 3rd party apps such as USB Device Info.
Below are the USB properties enumerated properly on a PC. I've communicated with the device manufacturer who has confirmed that an outside firm certified the device followed the USB 2.0 spec. Originally, my suspicion was that the device was rejected by Android because it omitted the following fields: iManufacturer, iProduct, and iSerialNumber, which were included by other compliant devices. However, it seems these fields aren't necessary after reviewing this excerpt from Section 9.5 of the USB 2.0 Spec:
Where appropriate, descriptors contain references to string descriptors that provide displayable information describing a descriptor in human-readable form. The inclusion of string descriptors is optional. However, the reference fields within descriptors are mandatory. If a device does not support string descriptors, string reference fields must be reset to zero to indicate no string descriptor is available.
My question, then, is what is causing the UsbManager to reject enumeration of this USB device? And, more importantly, is there anything I can do about it to force Android to enumerate this device? Ideally, I am most interested in a solution that does not require root access, but it is not necessarily a deal-breaker.
EDIT: Some sample code.
UsbManager usbManager = (UsbManager) getSystemService(Context.USB_SERVICE);
HashMap<String, UsbDevice> deviceList = usbManager.getDeviceList();
// When I plug in this USB device, deviceList is empty.
// Other devices are discoverable, however.
EDIT 2: I've tested with some more phones. I have successfully enumerated the USB device with the following phones:
- Note 2
- LG-V400
The following devices could not enumerate the device:
- Nexus 5
- Galaxy S4, S5, S6
- LG G2, 4G LTE
EDIT 3: Here are the logs from calling adb shell dmesg
on a Nexus 5 after plugging in the USB device. You can clearly see on lines 4-16 that the phone fails to enumerate the device.