A USB device is recognized as a Mass Storage
device if:
usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_MASS_STORAGE || usbInterface.getInterfaceSubclass() == INTERFACE_SUBCLASS // int 6 || usbInterface.getInterfaceProtocol() == INTERFACE_PROTOCOL // int 80
and
usbInterface.getEndpointCount() == 2
where one of the endpoints must satisfy the following:
endPoint direction == 0 endPoint type = UsbConstants.USB_ENDPOINT_XFER_BULK //int 2
For more information, see these links:
source share