[GUIDE] Heimdall - Installation, (stock) ROM flashing, PIT extraction from linux OS


Senior Member
Mar 9, 2016
You always wanted to change your OS from bloated Windows to something different or you're tired of maintaining your virtual machine to flash your device freely. I know that pain!
Now, you could stop cursing your powerlessness. Here comes the solution to all problems.

The answer is called Heimdall. This is a multiplatform tool for flashing our phones (not only ours) like Odin (Odin is available only for Windows). It's created by Glass Echidna, I've just compile binaries of most recent version to make it "multi-distribution". I don't want put you to sleep so, let's get started!

Be aware! Heimdall isn't longer maintained and have some debility. When something will be not working do this steps below:
  1. Restart the program
  2. Connect device to other USB port
  3. Restart the computer (in extreme cases)
I use a Xubuntu for my main OS so all installation commands and etc. are for debian based distribution
Installation method:
[U][COLOR="green"]For more info look at the Video tutorial section of this post[/COLOR][/U]
[*]Download ROM you want to flash and extract it to the one folder
[*]Download the attachment and extract the binaries to /usr/local/bin/
[*]Install the prerequisites: sudo apt-get install build-essential cmake zlib1g-dev qt5-default libusb-1.0-0-dev libgl1-mesa-glx libgl1-mesa-dev
[*]Open terminal window and type: sudo heimdall-frontend
[*]Change tab to Flash and load the pit file
[*]Click on Add to add partition to flash and corresponding files to them [COLOR="Red"](!! MBR,GPT partition is use to repartition  our device, so you have to put a .pit.md5 file to it when you want repartition your device !!)[/COLOR]
[*]Put your phone into Download mode and connect it to the PC using USB cable
[*]In Heimdall Frontend click Start and wait
[*]Enjoy :)
Pit extraction:
[*]In Heimdall frontend click Utilities tab
[*]Click under Print Pit - Device
[*]Click under Download pit - Save as
[*]Choose the name and destination
[*]Click Download and wait
[*]Enjoy ;)
Video tutorial

Google drive


Last edited:


Senior Member
Jul 26, 2018
Hi, I was glad to find your guide; unfortunately it does not work for me (LM 19.2)- my old beloved ace (cooper) runs a unofficial LOS 10.1, and heimdall (neither your zip nor a 1.4.2-version) could not download a PIT - so it seems that I cannot flash TWRP (I am using CWM Recovery on this phone. I would like to test PostmarketOS, and I am not sure if CWM will help.
DO you still work with the ace? Any idea to flash? THank you