Path of OTG in Android device

╄→尐↘猪︶ㄣ 提交于 2019-12-01 03:31:48

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/27601157/path-of-otg-in-android-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!