Davide's Blog

How To Flash a Recovery Image Using Heimdall

This is a mobile optimized version of this page, view original page.

Some people have been asking me how to flash the recovery using Heimdall.
I’m going to give you a quick step-by-step guide.

Using the GUI

  1. Download and install Heimdall. It’s open-source and supports Windows, Mac, GNU/Linux (including Ubuntu and Fedora) and a few other operating systems, as opposed to ODIN which is proprietary and supports only Windows.
  2. Reboot your phone in download (or ODIN) mode  (usually by holding volume down, home and power and by following the on-screen directions) and connect it to the computer; on Windows, wait for the device drivers to be loaded.
  3. Run Heimdall as administrator/root ( sudo heimdall-frontend).
  4. If it’s the first time you flash something to your phone using Heimdall, follow the following steps toobtain a PIT file; if you already have a PIT, skip them.
    1. Go to the Utilities tab.
    2. Press Detect to make sure the phone has been recognised.
    3. Click Save as under Download PIT and select a place to store the new file.
    4. Click Download.
    5. When it’s done, take the battery off your phone and put it back. Boot back to download mode.
  5. Go to the Flash tab and Browse for the PIT you just downloaded.
  6. Click Add under Partitions (Files).
  7. In the Partition Name menu select RECOVERY or your phone’s equivalent (names are usually pretty clear: BOOT is usually the kernel (never touch ABOOT though unless you know what you’re doing), SYSTEM is /system, USERDATA is /data, etc.)
  8. Click Browse under File and open the recovery image you downloaded. It should be in “.img” format (looking for a recovery for Samsung Galaxy Express SGH-I437? You can find one here!)
  9. Repeat steps 6 to 8 for any other partitions you need to flash, if any. If you’re done, click Start to start flashing!
  10. Enjoy!

Using the command line (much quicker)

The command lines is quicker, almost always. If you want to save 2 minutes of your life, just run (as root/admin) the following command:

heimdall flash --RECOVERY filename.img 

Replace filename.img with your recovery image file. Writing the command up to –RECOVERY and dragging the file onto the terminal usually works.

You can also replace RECOVERY with any other partition on your phone ( heimdall print-pit may help), or flash multiple partition at a time by adding –PARTITION_NAME filename.img.

I hope you found this useful! If you have any questions, let me know in the comments below! 🙂