8

I have downloaded .img file for TWRP recovery. How I should use it with Heimdall? It seems that Heimdall accepts .gz files (or .pit files in older versions), not .img!

I've tried opening an .img file and Heimdall complained

Tar header contained an invalid file size

Opening a .tar file led to

firmware.xml is missing from the package

  • 1
    where do i fine that recovery.img file? Link please – Nabin May 24 '16 at 14:04
  • Where we can download reliable image or any other firmare for sansung galaxy S3? – Peter Krauss Jan 25 at 11:07
5

If you use Linux - download heimdall-frontend so you can use GUI. It is much easier.

To flash using Heimdall you first need to specify .pit file.

.pit stands for Partitions Information Tables, so Heimdall knows where it need to flash it.


To flash TWRP using Heimdall follow this steps:

  1. Open Heimdall frontend.
  2. Go to Utilities tab.
  3. You will see Download PIT. Go Save As and save it on some location.
  4. Go to Flash tab.
  5. In PIT category, click Browse and select PIT file you downloaded from device in step 3.
  6. Click Add button.
  7. For partition name select where you want to flash it. BE CAREFUL! If you flash it on wrong partition you can perma-brick device. On my device for recovery it is Kernel2.
  8. Go Browse for file and select .img file.
  9. In Session let everything unchecked.
  10. Click Start.

Note1 : REPARTITION MUST STAY UNCHECKED!!!
Note2: This can brick device, be careful, here on site, we do NOT hold responsibility for your device.
Note3: If you're on Windows, just use Odin...

  • where do i fine that recovery.img file? Link please – Nabin May 24 '16 at 14:04
  • @NabinKhadka for example, inside a .tar file one can download (also called pda files). each of the contained files needs to be mapped to the exact parition name. – Blauhirn Aug 2 '17 at 21:45
12

Newer versions of Heimdall will accept a .img file for the --RECOVERY parameter and automatically download a PIT from the device to add the img contents to.

$ heimdall flash --RECOVERY recovery.img 
Heimdall v1.4.1

[trimmed some output here]

Session begun.

Downloading device's PIT file...
PIT file download successful.

Uploading RECOVERY
100%
RECOVERY upload successful

Ending session...
Rebooting device...
Releasing device interface...
Re-attaching kernel driver...
  • where do i fine that recovery.img file? Link please – Nabin May 24 '16 at 14:03
  • 1
    @NabinKhadka, you must find the right .img based on your phone. Try searching on XDA-Developers or google for the recovery image for your phone. – Matt May 25 '16 at 2:38
  • @Sparr Where did you get v.1.4.1 of Heimdall, please? V1.4.0 doesn't support flash --RECOVERY and there is no later version on bitbucket.org/benjamin_dobell/heimdall/downloads, except for Mac (which I don't have). – Mark Smith Oct 1 '16 at 11:50
  • I'm on Mac. And I don't remember, sorry. – Sparr Oct 1 '16 at 20:38
1

A image file does not really need heimdall. Most devices that update via a .img file allow you to just put it on internal storage and rebpot to update. An alternative is to move it to your device, and install it via TWRP by loading the File in it.

  • 1
    What if you don't have the TWRP? – Anwar Aug 20 '16 at 8:00
  • 1
    @Anwar Then you can use heimdall's device tab (or the fourth tab) and download the .pit from your phone, and build your .IMG around it. – Dan Brown Aug 20 '16 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.