add libusb-specific hid_libusb_wrap_sys_device #280

Merged
Youw merged 2 commits from libusb_wrap_device_master into master 2021-09-18 10:56:56 -05:00
Youw commented 2021-05-20 08:52:32 -05:00 (Migrated from github.com)

Rationale: on Android one must use UsbManager, to access any
USB device. As a result, libraries like libusb can only use file descriptors
that are provided by UsbManager.
libusb has an API to use such file descriptors: hid_libusb_wrap_sys_device.
Having hid_libusb_wrap_sys_device currently is the only way to make hidapi
work on Android without root access and without custom Android builds.

Relevant info: https://github.com/libusb/libusb/pull/830/files

Rationale: on Android one must use UsbManager, to access any USB device. As a result, libraries like libusb can only use file descriptors that are provided by UsbManager. libusb has an API to use such file descriptors: hid_libusb_wrap_sys_device. Having hid_libusb_wrap_sys_device currently is the only way to make hidapi work on Android without root access and without custom Android builds. Relevant info: https://github.com/libusb/libusb/pull/830/files
Youw commented 2021-05-20 08:56:27 -05:00 (Migrated from github.com)

When checking the diff, select "Hide whitespace changes" option on Github - makes the diff smaller and easier to read.

I'd appreciate an input from libusb team, if any.

When checking the diff, select "Hide whitespace changes" option on Github - makes the diff smaller and easier to read. I'd appreciate an input from libusb team, if any.
mcuee commented 2021-06-18 09:06:58 -05:00 (Migrated from github.com)

@Peter-St Maybe you can take a look if you got time. Thanks.

@Peter-St Maybe you can take a look if you got time. Thanks.
Peter-St commented 2021-06-18 13:20:10 -05:00 (Migrated from github.com)

@Peter-St Maybe you can take a look if you got time. Thanks.

Looks propper to me to support the unrooted way on the hid api too.
I haven't test the hid api for now, so I cannot give any further advices.

> @Peter-St Maybe you can take a look if you got time. Thanks. Looks propper to me to support the unrooted way on the hid api too. I haven't test the hid api for now, so I cannot give any further advices.
mcuee (Migrated from github.com) approved these changes 2021-06-25 01:12:18 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!280
No description provided.