有没有从Android应用程序中发现完整的USB树的一种方式?目前USB主机 API
只提供所有设备和它们的端点的列表。我需要能够在设备上的USB集线器的特定端口相关联。在Windows中,我可以看到每一个设备是什么端口号。
Is there a way of discovering the full USB tree from within an Android Application? The current USB Host API
only provides a list of all the devices and their endpoints. I need to be able to associate the device with a particular port on the USB hub. In Windows I can see what port number each devices is on.
看来,Android操作系统掩盖了枢纽的视图。
It appears that the Android OS masks the hub from view.
我想过尝试通过JNI访问的Linux,但是,应用程序的评论在: https://github.com/alt236/USB-Device-Info---Android ,表明它不会出现在Linux下做。
I thought about trying to access Linux through JNI, however, the app at the commentary at: https://github.com/alt236/USB-Device-Info---Android, suggests that it doesn't appear in Linux too.
有什么想法?
感谢。
您可以只是走硬件树。举例来说,在我的Nook是/ SYS /设备/平台/ musb_hdrc / USB1。 这里是我的应用程序的屏幕截图。
You can just walk the hardware tree. For instance, on my Nook it's /sys/devices/platform/musb_hdrc/usb1. Here's a screenshot of my app.