I'd like to use libusb in my Android app (java GUI + native(C++) core). I have already compiled libusb and tried calling its functions, but libusb_open return LIBUSB_ERROR_ACCESS. I suppose there is a problem with USB access permissions, but I don't know how to resolve the issue. So, 2 questions here: 1) How to get libusb running on a rooted Android 3.1 device? 2) Is it possible to use libusb on an unrooted, factory-default device?
Thanks in advance.
P. S. As for question 1, I've tried chmod 666 for /dev/bus/usb, but it says "permission denied" (note that my device IS rooted).
P.P.S. mount usbfs none /proc/bus/usb -o devmode=0666 doesn't even execute, as if I have misspeled something (but I didn't).
I know for sure it's possible to get libusb working on a rooted Android device with USB host, but I never managed it, so I had to restrict the app to Android 3.1+ and use USB APIs.
sudo chmod 666
for /dev/bus/usb? – Dipterallibusb
and just utilized standard Android USB API, which is the right way to go anyway. – Lujan