Benjamin-Dobell/Heimdall

[SM-G9700] S10e - can't flash recovery

lannic opened this issue · 23 comments

Archlinux - Heimdall v1.4.2 - libusb-1.0.24-2

I can't upload the recovery lineageos image to the phone.
I got these errors in the end of the process :

ERROR: Failed to unpack received packet.
ERROR: Failed to receive session end confirmation!

I attach PIT file and recovery trace
recovery.txt
pit.txt

amo13 commented
  1. What file did you try to send?
  2. What command did you execute?
  3. Have you tried a heimdall binary compiled with a few crucial fixes?

What file did you try to send?
this one : https://mirrorbits.lineageos.org/recovery/beyond0lte/20211216/lineage-18.1-20211216-recovery-beyond0lte.img

What command did you execute?
heimdall-linux flash --RECOVERY lineage-18.1-20211216-recovery-beyond0lte.img --no-reboot

Have you tried a heimdall binary compiled with a few crucial fixes?
Yes same problem

amo13 commented

OK, then I'd also like to know why it is not working

amo13 commented

Have you found the similar issue on this repo with the following hint?

I had the same errors, the only known fix for me (as of the USB3 port problem) was to reboot the device into Download Mode after each time I did another heimdall command. I know, it's totally annoying, but that way I could flash the recovery partition with TWRP and use sideload later.

For upload the recovery image, i shutdown totally the phone and boot in the Download mode.
Then, in this mode, i execute the command for flash the recovery partition

It says

RECOVERY upload successful

And then seem to just fail to exit. Are you sure it hasn't been flashed?

Yes, it hasn't been flashed because i don't have the lineageos picture but the samsung menu in the recovery mode

What OS are you on, and have you tried without the --no-reboot flag?

I'm on Archlinux with a fresh update
Same problem without the --no-reboot flag

Where does your heimdall-linux come from? Neither the heimdall package nor the heimdall-git aur package installs heimdall as heimdall-linux. scratch that, I guess you used the one from @amo13's repo.

Could you try this heimdall as well? If that doesn't work either then we probably need captured usb-traffic logs from wireshark of when odin flashes stock android (or at least recovery), to see if the protocol has changed in some way for this device.

(I haven't had any similar problems on galaxy s8 on archlinux, don't have any newer devices to test on)

Device also needs to be OEM unlocked for it to accept custom recovery/roms

Device also needs to be OEM unlocked for it to accept custom recovery/roms

For sure

Could you try this heimdall as well?

The end of return is a little bit different :
Uploading RECOVERY
100%
RECOVERY upload successful

Ending session...
ERROR: Failed to receive session end confirmation!
Releasing device interface...

If that doesn't work either then we probably need captured usb-traffic logs from wireshark

Here the link for the usb capture :
https://numeriquement.fr/nextcloud/index.php/s/J88aQwZJ2Bbf9Lr

@lannic thanks, that's the log of failed recovery flash with heimdall, right?
We probably need logs of successful flash with Odin to be able to determine what heimdall does differently compared to odin for this device.
To create an Odin-compatible tar of recovery.img that you can flash (as an AP file in odin) you can do:

tar cf recovery.img.tar recovery.img
cat recovery.img.tar <(md5sum recovery.img.tar) > recovery.img.tar.md5

that's the log of failed recovery flash with heimdall, right?

Yes

Here a link of the 7z recovery.img.tar.md5
https://numeriquement.fr/nextcloud/index.php/s/SAfr2HAnbyawLH3

Do you have the possibility to flash it with odin on windows and capture logs?

No. I don't have any windows

Alright, then we'll have to wait and see if anyone else has the same problem and the possibility to capture logs

Any updates? I've got the same phone and wonder if it'd be safe to flash with Heimdall.

You can try maybe it's OK now ?

Wouldn't that entail a risk of bricking the phone?

No. No problem.
Because when you restart the phone, you cannot install the linageos rom.
See this part of installation : https://wiki.lineageos.org/devices/beyond0lte/install#installing-lineageos-from-recovery

Ok, great, thanks!

I have the same problem with an Samsung A40.