Android USB OTG Read Usb Drive

I am currently working on a project that requires Usb Host mode in Android (using 4.2.2). I need to be able to perform standard file operations, such as listing files and reading from a USB drive. Using the documentation in host mode, I went so far as to be able to detect that the drive is connected, is a USB storage device and finds various endpoints.

Where am I stuck, what to do after that. I guess I don’t understand the difference between control and mass transfers, or in the case of control transfers, what really happens. Unfortunately, my knowledge of the USB interface is somewhat limited, and I heard that the documentation is rather complicated.

Can someone help me help or point me to a working example, what do I need to do to essentially “install” a USB drive? As I said earlier, I just need these file operations with listing files and their reading, not writing. I should also mention that the target phone is Samsung's Galaxy Nexus.

thank

+5
source share
1 answer

The management endpoint (usually) is used to send commands to the USB device.
An endpoint in bulk (usually) is used to transfer data to a USB device.

.
.
8- , (, , , ..). , , /, , , / , . !
, , . usb.:)


usb (pendrives, , ) usb.

, , (: EXT3, FAT...) .

, , / . :

  • ( )
  • , / .
  • api .

, USB Mass storage clas http://www.usb.org/developers/docs/devclass_docs/ probebly

(), . ( )


AFAIK, Android , USB, .


-:
( ) (: NTFS)
() . (: FAT)

0

All Articles