New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libusb is not working with Android 7.1 #233
Comments
Please refer to this one as well. #188 |
You may want to try Pull Request #242. |
#242 can solve the problem. The naming of the function is confusing though. The function libusb_wrap_fd is escentially opening the usb by file descriptor. Also, it will not add the usb device the to device list in libusb, so mind that some libraries depend on libusb may need to be modified to make it working. |
I will close this for now. But the comment is good. I will add this link to the #242 . |
On Android, the platform API should be used to scan for and open devices and pass file descriptors to libusb. Newer devices (Android 5+) even prohibit listening for hotplug events, resulting in libusb failing to initialize without this patch. Note that this patch effectively renders libusb useless on older devices that do not have USB support in the platform API (anything before Android 5). Closes #242 Signed-off-by: Vianney le Clément de Saint-Marcq <code@quartic.eu> Signed-off-by: Nathan Hjelm <hjelmn@me.com>
To start with, it is not a problem of libusb itself but more to the Android system but I am looking if any one have an idea on how to fix this problem.
The library is working perfectly up to Android 6.0 (haven't tested with 6.1 and 7.0 yet).
The problem is happening in the function "sysfs_get_device_list" in the file "linux_usbfs.c". I am getting an errno code of 13 which is permission denied. It seems that Android has changed the permission of accessing the directory /sys/bus/usb/devices. USB Permission has been asked and granted through the USB Manager beforehand (needed for previous Android versions as well) and I tried to request access for READ_EXTERNAL_STORAGE too but this has no effect on it.
So I wonder if any one can come with a workaround for this?
The text was updated successfully, but these errors were encountered: