Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Path of OTG in Android device

I am developing an Android application in which I have to get details of USB device connected to Tablet via OTG .

when I use sys/bus/usb0/devices then I am getting list of all devices of Tablet while I want to only fetch device name attached via OTG port .

Is there ant way to get which device is in built and which device is connected to Tablet.

When I used path /storage/usb0/ and /storage/usbdisk0/ , then I didnt get any device whicle device is attached via OTG port.

Please can anyone tell me how can I get the USB details attached via OTG port to Tablet

like image 619
Neha Shukla Avatar asked Nov 01 '22 12:11

Neha Shukla


1 Answers

Below example link provides data like :

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

see github example

like image 71
Mukesh Parmar Avatar answered Nov 12 '22 16:11

Mukesh Parmar