This article aims to explain a solution for libusb error has happened in time to trying mobile access using Heimdall (Open Source software to mobile connection equivalent to Odin).
About Heimdall
Heimdall is an open source alternative solution for Odin where is possible communication between PC and your mobile device. With Heimdall it is possible to upgrade Recovery and ROM by your mobile's Download Mode. For changes by Recovery Mode applets like ADB and Fastboot are demanded instead Heimdall. Know more about Heimdall bellow:
libusb error
libusb is a C library that gives applications easy access to USB devices on many different operating systems. In this way libusb is an important part of communication process between Heimdall and you mobile device.
Heimdall from most recent
Linux OS is coming with a bug that shows the follow error message in PC & mobile device connection trying:
Failed to access device. libusb error: -12
Next we will see how to solve this issue that is stressing Heimdall users.
Solving the problem
Supposing that your mobile device is USB attached to PC you will need to open the Terminal (command line) and type:
lsusb
Attached USB devices will be showed. Search you device and look for equivalent numbers to "Bus" (greenish) and "Device" (yellowish).
Next it is needed to change device mobile access permission. Fortunately Linux has not disgusting Register (as Windows) since all configurations are located in files. So what we need to do is find the file and change its access permission. To make it we need refering to previously found "Bus" and "Device".
USB devices are located in /dev/bus/usb/ folder. For its location is needed to refer to "Bus". In our case the number is 003.
To know which file refers the USB connected device we need to refering to "Device" number that in our case is 012.
Holding these information is possible to take file access permission typing in terminal:
ls -la /dev/bus/usb//
In our case:
ls -la /dev/bus/usb/003/012
Sistem will feedback:
crw-rw-r-- 1 root root 189, 257 Mar 12 06:46 012
To know more about file permission you can read:
Changing file permission is possible typing in Terminal:
sudo chmod 666 /dev/bus/usb//
In our case:
sudo chmod 666 /dev/bus/usb/003/012
Verifying file permission again:
ls -la /dev/bus/usb//
In our case:
ls -la /dev/bus/usb/003/012
We will obtain:
crwxrwxrwx 1 root root 189, 257 Mar 12 06:46 012
And now communication between Heimdall and your mobile device is supose going to work!