OTG path in Android device

I am developing an application Androidin which I need to get information about USB deviceconnected to a Tablet through OTG.

when I use sys/bus/usb0/devices, then I get a list of all Tablet devices, so far I only want to get the name of the device connected through the OTG port.

Is there an ant way to get which device is embedded and which device is connected to the Tablet.

When I used the path /storage/usb0/and /storage/usbdisk0/, then I did not receive any device connected to the device through the port OTG.

Please tell me how can I get the data USBattached through the port OTGto the Tablet

+4
source share
1 answer

The following is an example link:

1) Device class
2) USB device path
3) Vendor ID (VID) and Product Identifier (PID).
4) A list of all interfaces and their endpoints. etc...

see github example

+2
source

Source: https://habr.com/ru/post/1568605/


All Articles