linux_usbfs: Disable hotplug events and scanning on Android
authorVianney le Clément de Saint-Marcq <code@quartic.eu>
Tue, 13 Dec 2016 14:04:11 +0000 (15:04 +0100)
committerNathan Hjelm <hjelmn@me.com>
Wed, 9 Jan 2019 01:21:00 +0000 (18:21 -0700)
commit2f3bc98b0d0f4766496df53c855685a5f0e5e7cf
treef43b86b551cdd6bc23e77afe7f6dc109147e425c
parentad075f6ecffd10c29d84e2f86f662f63d6bebde1
linux_usbfs: Disable hotplug events and scanning on Android

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>
libusb/os/linux_usbfs.c
libusb/version_nano.h