Heimdall: ERROR: Failed to receive file part response!
I was trying to flash twrp recovery on my SM-A310F and this is what i always get `$ sudo heimdall flash --RECOVERY /Users/Daniele/Desktop/recovery.img --no-reboot Heimdall v1.4.1
Copyright © 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… Claiming interface… Setting up interface…
Initialising protocol… Protocol initialisation successful.
Beginning session…
Some devices may take up to 2 minutes to respond. Please be patient!
Session begun.
Downloading device’s PIT file… PIT file download successful.
Uploading RECOVERY 0% ERROR: Failed to receive file part response!
ERROR: Retrying… ERROR: Expected file part index: 0 Received: 1 ERROR: RECOVERY upload failed!
Ending session… ERROR: Failed to receive session end confirmation! Releasing device interface…
`
About this issue
- Original URL
- State: open
- Created 8 years ago
- Reactions: 3
- Comments: 17
Commits related to this issue
- Add hack for header for file part See https://github.com/Benjamin-Dobell/Heimdall/issues/347 — committed to changlinli/Heimdall by changlinli 7 years ago
- Skip first file packet (fix #347) It's more like a hack, but worked for SM-A310F — committed to alexax66/Heimdall by alexax66 3 years ago
Finally I found solution to the problem. It’s more like a hack. Be careful. You have been warned!
I noticed that we get error when trying to receive response from our device that it have received first file packet (BridgeManager.cpp, line 1115). It seems to me that device actually do not send response for the first file packet. If we skip this first response error, then file will be successfully sent to the device.
In BridgeManager.cpp replace code from line 1117 till 1153 by this code:
Hello, i found a solution too. I had exactly the same problem, and even the code replacement didn’t work. To succeed flash, i’ve just changed permission of the file(s) i would flash as executable for heimdall, with the command " chmod +x recovery.img (or anything else)"
Just wanted to report that this hack also worked on a Samsung Galaxy S5 neo (SM-G903F). Standard Heimdall build indeed gave me the
ERROR: Failed to receive file part response!
message. The phone had stock firmware with Android 5.1.1 to begin with (in case it matters). The hack enabled me to upload the latest TWRP as well as the Android 6.0.1 stock ROM and afterwards a crDroid (Android 11) build flashed (via TWRP) cleanly. Due to my laziness I actually compiled the fork with the hack applied in https://github.com/alexax66/Heimdall, thanks @alexax66!Hack worked with my A510F too
I got a Samsung a5 (2016) A510F and heimdall was failling on all uploads with : “ERROR: Failed to receive file part response!” That hack worked for me.