Heimdall: libusb: error [get_usbfs_fd] libusb couldn't open USB device /dev/bus/005/020, errno=5
I’m attempting to root an SM-P600 Galaxy 10.1 2014 tablet. I’m able to detect a device via heimdall-frontend -> utilities -> detect.
If I attempt to download or print the PIT file in the CLI, I get the following output. I get a similar output to the one below, less the line with the “###”.
[def@tower bin]$ sudo ./heimdall print-pit --no-reboot
Heimdall v1.4.2
Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/
This software is provided free of charge. Copying and redistribution is
encouraged.
If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
libusb: error [get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/005/020, errno=5 ###
ERROR: Failed to access device. libusb error: -1
I’ve searched this and the libusb-git repos and haven’t been found a solution. Any tips?
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 22
Back with news from the linux-usb mailing list. As we knew already, the implementation of the USB stack in download mode is crappy. In this case, the kernel sends a GET_STATUS control message to the device after resume to make sure the device is still there (as required by section 10.5.4.5 of the USB standard). The device should respond with two bytes of status in the data stage, but the Samsung download mode sends a zero-length data packet instead (i.e. no data).
Since this behaviour is hard-coded in the kernel resume logic, there is no way to resume from suspend without a disconnect and reconnect. That’s why autosuspend cannot be disabled on that device when it is already suspended. OTOH udev might be fast enough to disable power control before the device is suspended.
In short, I propose to change the corresponding line in
60-heimdall.rules
to:This fixes the issue for me.
Had the same issue on Manjaro with Heimdall 1.4.2
Added the proposed fix
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="685d", MODE="0666", ATTR{power/control}="on"
to
/lib/udev/rules.d/60-heimdall.rules
Success
That all looks normal. Not really sure what issue is here, but doesn’t really seem to be a heimdall issue. Libusb fails to open the device, maybe there is some issue with libusb, or maybe with some hardware (usb cable, usb port, …)
If you have the possibility you could try from another distro, or from another computer and see if it works in that case