Open Azkali opened 2 years ago
Are you on Ubuntu? It fails on the first handshake package, so it is unlikely that it is due to protocol changes (unless Samsung has re-done the protocol from scratch for this device). Seems more likely that the connection needs to be reset before handshake, as in this PR. You can download heimdall with this (and other) fixes here: ubuntu 20.04, archlinux and alpine linux.
Could also be a permission issue, try running heimdall as root, or make sure udev rules are installed
Hi, I am using fedora 35 on a aarch64 SoC. But I was able to use Heimdall with a SGS8 with no problem previously.
The issue also happen as root and I do have the udev rules set and triggered properly. It can only be an issue with a needed reset or in the worst case the protocl has been changed. I am gonna build using the PR you provided and give my feedback after testing.
Apparently odin 3.14.4 works for flashing this device, so seems unlikely that protocol has been fundamentally changed.
However, looking at the PIT is seems that it uses a 6th version of the Odin protocol (first time I see that, I only have devices using 4 or older):
$ heimdall print-pit --file Q2Q_EUR_OPENX.pit
Heimdall v2.0.0
Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
https://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:
https://www.glassechidna.com.au/donate/
--- PIT Header ---
Entry Count: 96
Unknown string: COM_TAR2
CPU/bootloader tag: SM8350
Version(?): 0x0006
[...]
(printed with heimdall from this branch) so maybe something is different, but then again: seems unlikely they would change something as fundamental as the handshake.
Would be interesting to see usb traffic logs (captured with for example wireshark) of when stock android is flashed onto the device with odin. Such logs would be the only way to see if the transfer protocol is different.
You can also try increasing the timeout (third arg to SendBulkTransfer) of the handshake package, and probably the response, to something higher like 6000.
Really seems more likely that issue is that libusb_reset is needed, or some issue with libusb on feodora/arm64, or just that the usb cable is bad, rather than that heimdall does something wrong (since heimdall doesn't even do anything, first packet fails)
You can download heimdall with this (and other) fixes here: ubuntu 20.04, archlinux and alpine linux.
omg thank you i was having the same issue this took me so long to find
Apparently odin 3.14.4 works for flashing this device, so seems unlikely that protocol has been fundamentally changed.
However, looking at the PIT is seems that it uses a 6th version of the Odin protocol (first time I see that, I only have devices using 4 or older):
$ heimdall print-pit --file Q2Q_EUR_OPENX.pit Heimdall v2.0.0 Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna https://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: https://www.glassechidna.com.au/donate/ --- PIT Header --- Entry Count: 96 Unknown string: COM_TAR2 CPU/bootloader tag: SM8350 Version(?): 0x0006 [...]
(printed with heimdall from this branch) so maybe something is different, but then again: seems unlikely they would change something as fundamental as the handshake.
Would be interesting to see usb traffic logs (captured with for example wireshark) of when stock android is flashed onto the device with odin. Such logs would be the only way to see if the transfer protocol is different.
It is not version of some sort. Odin, nor Thor (it's successor) use data after entries count,
Everything after is referenced as Project Name. In the PIT.h
it is referenced as dummy data.
P.S. It seems to be LUN count, of it's an UFS one.
Solved using the PR mentioned in the previous comment
I am in the same situation. Linux Mint 21 (aka Ubuntu 22 LTS) and the heimdall in the standard repo (1.4.1) does not work. "ERROR: Failed to send handshake!ERROR: Protocol initialisation failed! "
With the 2.0.0 of the link below , it works.
I guess I should report this to Mint folks ( or Ubuntu 22).
I am in the same situation. Linux Mint 21 (aka Ubuntu 22 LTS) and the heimdall in the standard repo (1.4.1) does not work. "ERROR: Failed to send handshake!ERROR: Protocol initialisation failed! "
With the 2.0.0 of the link below , it works.
I guess I should report this to Mint folks ( or Ubuntu 22).
No, it is an unofficial fork. Maybe there is a chance they will use it, but who knows.
Duplicate of #413? I just added some help there.
On Manjaro, I managed to get it to work by uninstalling heimdall
from Official Repositories (extra)
and then installing heimdall-git
from AUR
.
In my case, I noticed that when in download mode, you can only flash once. If there is a pending operation, it will remain pending until you restart the device. The --resume
argument does not work on my SM-A546E/DS.
The easiest way I found to deal with this while desperately trying to root the phone as soon as possible is by doing the following:
watch -n .5 adb reboot download
command continuously on the terminal until the phone goes into download mode again.adb
command will work when the phone is booting.watch
command@T-vK heimdall-git
does seem to be more stable when compared to the heimdall
package.
Issue description
Heimdall version: Latest master build from source
During
./heimdall download-pit
handshake is failing. Seems related to changes in download mode on recent model, as hinted by another issue here.Log