Ticket #119 (closed enhancement: fixed)
[PATCH] Enable support for Linux systems without either usbfs or udev (e.g. Android)
|Reported by:||jhanko||Owned by:||jhanko|
|Milestone:||Component:||libusb-1.0 Linux backend|
|Keywords:||android usbfs udev usbdev||Cc:|
Usbfs (which will name USB device special files as "/proc/bus/usb/<bus>/<device>") has been deprecated due to security problems. Instead, most modern Linux systems use the udev subsystem to name the files "/dev/bus/usb/<bus>/<device>". Libusb will currently find the device files in either place.
However, many embedded Linux systems, including Android, do not include the udev subsystem. Additionally, usbfs is typically not included due to its deprecated status. Instead, they name the USB device special files as "/dev/usbdev<bus>.<device>" via the CONFIG_USB_DEVICE_CLASS option (see: drivers/usb/core/devio.c).
This is a request to enhance libusb-1.x to be able to find the USB device special files by name in the /dev directory.
Attached is a patch to libusb-1.0.8/libusb/os/linux_usbfs.c which will find the /dev/usbdev* files if the normal places fail. Support is enabled by defining CONFIG_WO_BUS_DIRS.
Changed 3 years ago by jhanko
Changed 2 years ago by jhanko
comment:4 Changed 2 years ago by stuge
- Component changed from libusb-1.0 to libusb-1.0 Linux backend