-
-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timeout when calling libusb libusb_set_interface_alt_setting with some devices #497
Comments
Hi @gentooza, heimdall seem to be working well without Could you at some point try flashing with this heimdall (built from this branch). It will print the actual error code from libusb, and we can then, hopefully, tell heimdall to ignore that particular error code and carry on. |
Hi @Grimler91 Ok, already cloned I'll test it and tell you cheers |
@gentooza thanks! (Note that there are two branches in the repo, the master branch and the alt_setting-error branch. alt_setting-error contains the commit with prints the libusb error code) |
Hi @Grimler91, I paste what I get:
Sorry, I've Spanish locale set in my GNU/Linux, the last commands are git orders simply to show I'm working in origin/alt_setting-error branch. with libusb folks we were already trying to debug this and finally thought it's the flaky bootloader in the device. ps: error -99 seems to be LIBUSB_ERROR_OTHER (https://libusb.sourceforge.io/api-1.0/group__libusb__misc.html) |
Yeah, -99 wasn't very helpful. I've added a commit here to just skip libusb_set_interface_alt_setting if alt_setting is 0, I think that is what tormodvolden meant in the libusb discussion. |
For future reference: the same issue was reported here: https://gitlab.com/BenjaminDobell/Heimdall/-/issues/517, and a similar fix (don't run libusb_set_interface_alt_setting if alt_setting is 0) was suggested. |
the related merge request seems promising! cheers! |
I have created a fork and merged a few crucial pull requests. Feel free to create further pull requests there if need be. |
Original repository is not maintained anymore. Main fixes/features in fork compared to original repo consists of: * A check so that partition is not smaller than file size has been added, to make it a bit harder to overwrite things on the emmc by accident [1] (devices from 2014 or newer seem to have a safety check for this built-in) * The information is the PIT header has been described more fully [2] * libusb_reset_device patch that was contained in this repo has been merged (though it seems the patch is only needed on ubuntu) [3] * Skip running libusb_set_interface_alt_setting if altsetting is 0 [4]. It does not do anything in this case, and causes issues on some older devices [5] * Support for flashing images larger than 3.5 GB [6] * Some compilation issues that should only be relevant for other distros (BSD, android, mac) has been fixed, and various things cleaned up Also switch aports maintainer to myself while we are at it. [1] https://git.sr.ht/~grimler/Heimdall/commit/60ab9bbaffe3 [2] https://git.sr.ht/~grimler/Heimdall/commit/e51c9119f1ff [3] https://git.sr.ht/~grimler/Heimdall/commit/07a14d4aa8ad [4] https://git.sr.ht/~grimler/Heimdall/commit/2ecc98020c60 [5] Benjamin-Dobell/Heimdall#497 [6] https://git.sr.ht/~grimler/Heimdall/commit/c87f5bf210b0
Hi,
I've been suffering this error with my samsung mini plus (GT-S5570i)
https://wiki.postmarketos.org/wiki/Samsung_Galaxy_Pop_Plus_(samsung-s5570i)
The only solution is to comment out the call to libusb_set_al_interface function, as said here #340 by @joshgav.
As it seems not possible to detect phone's flaky bootloaders, because linux kernel driver seems to be samsung generic (no device specific), a possible solution could be to set a command line parameter to bypass this function call. So if we execute heimdall and crash here, heimdall can hint to try out again with this bypass command.
The feedback and tests I've got from libusb hackers are here:
libusb/libusb#1024
I hope to be useful :-)
cheers!
The text was updated successfully, but these errors were encountered: