Heimdall icon indicating copy to clipboard operation
Heimdall copied to clipboard

Samsung S4 (i9500) error

Open andrewtryder opened this issue 10 years ago • 11 comments

Hi, I have an i9500 and am having issues with heimdall communicating with the phone. It detects it but any attempt to write a recovery bootloader in Download mode on the phone never work. I have 1.4.0 installed via Ubuntu (14.04) repos but also tried compiling your latest from git:

» sudo ./heimdall flash --RECOVERY ~/Downloads/recovery-clockwork-6.0.4.7-jflte.img --no-reboot --usb-log-level debug
Heimdall v1.4.1

Copyright (c) 2010-2014 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...


[timestamp] [threadID] facility level [function call] <message>
--------------------------------------------------------------------------------
[ 0.004192] [000046fc] libusbx: debug [libusb_get_device_list] 
[ 0.004236] [000046fc] libusbx: debug [discovered_devs_append] need to increase capacity
[ 0.004252] [000046fc] libusbx: debug [libusb_get_device_descriptor] 
[ 0.004264] [000046fc] libusbx: debug [libusb_open] open 1.29
[ 0.298635] [000046fc] libusbx: error [_get_usbfs_fd] libusbx couldn't open USB device /dev/bus/usb/001/029: Input/output error
[ 0.298674] [000046fc] libusbx: debug [libusb_open] open 1.29 returns -1
ERROR: Failed to access device. libusb error: -1
[ 0.298721] [000046fc] libusbx: debug [libusb_exit] 
[ 0.298731] [000046fc] libusbx: debug [libusb_exit] destroying default context

andrewtryder avatar Nov 17 '14 01:11 andrewtryder

Galaxy S4 (GT-I9500) owner here.

Heimdall 1.4, 1.4.1 and SabuJiro's fork (https://github.com/SaburoJiro/Heimdall) did not work for me. Most of the time message was

    libusbx:error [op_set_interface] setintf failed error -1 errno 71

or very similar.

Tested on both Ubuntu 15.04 and Windows 8.1 Cross-posting because not sure where my comment belongs

hamilyon avatar Sep 16 '15 07:09 hamilyon

With the Galaxy S7 (SM-G930F), I am seeing the input/output error from libusb as well. Subsequently, the device resets:

kernel: [126451.700060] usb 1-2: reset high-speed USB device number 119 using xhci_hcd
kernel: [126451.828925] usb 1-2: USB disconnect, device number 119
kernel: [126451.995908] usb 1-2: new high-speed USB device number 120 using xhci_hcd
systemd-udevd[13569]: failed to execute '/lib/udev/mtp-probe' 'mtp-probe /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2 1 120': No such file or directory
kernel: [126452.124614] usb 1-2: New USB device found, idVendor=04e8, idProduct=685d
kernel: [126452.124618] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
kernel: [126452.124620] usb 1-2: Product: Gadget Serial
kernel: [126452.124621] usb 1-2: Manufacturer: SAMSUNG

Update: I just found out that I get the same I/O error when e.g. trying to forward the USB device to libvirt. So this is probably not a problem with the software, but with the device itself, or the USB connection. Will try another host…

madduck avatar Jun 09 '16 19:06 madduck

I get the same error that @reticulatingspline explained. As a curiosity, each time I issue any failed heimdall command the bus number stays constant but the device number increses by 1. So the first time the phone is on 002:004, then on 002:005, 002:006...

javiertury avatar Jul 29 '16 22:07 javiertury

I get the same error that @javiertury say ;-) it increses by 1 the last number

MartinBlanchard avatar Jul 31 '16 21:07 MartinBlanchard

Any updates on this? I'm getting the same error with SM-T580 (Galaxy Tab A 10.1 Wifi), together with the increasing device numbers that @javiertury reported.

esoeylemez avatar Aug 01 '17 03:08 esoeylemez

@esoeylemez Are you running Heimdall 1.4.2? If not, please compile and try it, and let me know how you go.

Benjamin-Dobell avatar Aug 01 '17 03:08 Benjamin-Dobell

Yes, Heimdall 1.4.2. Here is the full output:

# heimdall print-pit --usb-log-level debug
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...
[timestamp] [threadID] facility level [function call] <message>
--------------------------------------------------------------------------------
[ 0.006418] [0000735f] libusb: debug [libusb_get_device_list] 
[ 0.006435] [0000735f] libusb: debug [discovered_devs_append] need to increase capacity
[ 0.006439] [0000735f] libusb: debug [libusb_get_device_descriptor] 
[ 0.006441] [0000735f] libusb: debug [libusb_get_device_descriptor] 
[ 0.006443] [0000735f] libusb: debug [libusb_get_device_descriptor] 
[ 0.006445] [0000735f] libusb: debug [libusb_get_device_descriptor] 
[ 0.006447] [0000735f] libusb: debug [libusb_get_device_descriptor] 
[ 0.006449] [0000735f] libusb: debug [libusb_get_device_descriptor] 
[ 0.006452] [0000735f] libusb: debug [libusb_open] open 1.50
[ 0.427406] [0000735f] libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/050: Input/output error
[ 0.427473] [0000735f] libusb: debug [libusb_open] open 1.50 returns -1
ERROR: Failed to access device. libusb error: -1
[ 0.427516] [0000735f] libusb: debug [libusb_exit] 
[ 0.427527] [0000735f] libusb: debug [libusb_exit] destroying default context

esoeylemez avatar Aug 01 '17 03:08 esoeylemez

I have tried with libusb 1.0.20 as well as a library called libusb-compat 0.1.5: same error. If it matters, I'm running Linux 4.11.8:

% uname -a
Linux phobos 4.11.8 #1-NixOS SMP Thu Jun 29 11:03:17 UTC 2017 x86_64 GNU/Linux

esoeylemez avatar Aug 01 '17 03:08 esoeylemez

Hmm. it couldn't open /dev/bus/usb/001/050, due to a general IO error, which unfortunately isn't very specific, and is quite odd. It's not a permission issue, because there's a separate error code for that 😕

I did some quick digging through libusb and for this error message to occur POSIX open() is setting errno to EIO, which is unfortunately a general error. However, under normal circumstances, realistically it shouldn't occur, you should get a more specific error. This makes me think that there is a driver bug, or some kind of hardware failure on your system - but it's hard to tell with such a generic error.

Benjamin-Dobell avatar Aug 01 '17 03:08 Benjamin-Dobell

Not to rule this out, but there is no sign of a hardware problem. All my other USB devices work properly. Are there any other options to investigate this further? Or is there another way to get TWRP onto the device (beside installing Windows and Odin)?

esoeylemez avatar Aug 01 '17 04:08 esoeylemez

A solution for me: sudo chmod o+w -R /dev/bus/usb/005 I use Ubuntu 17 and Heimdall v1.4.0

Figured it was just permission issues with udev so I removed the restrictions completely.

peterjaffray avatar Sep 28 '17 03:09 peterjaffray