[TOOL] Heimdall 1.4 RC1
You might have already seen the flagship Galaxy devices (S, S2, S3) getting support for various new tools. One of these is Heimdall. It is an Open-Source Cross-Platform Flashing Suite originally meant to run on the Galaxy S, but thanks to its popularity, the S2, S3 and other devices also got the support. Literally speaking, it is the Linux and OS X alternative of Odin (It supports Windows as well.). (Read more about Heimdall here
Since our device is a variant to the SGS2, the download mode protocol of the two devices are the same. This enables us to use this tool with our device so we don't have to stick with Windows if we want to reflash a stock rom or install a recovery via download mode.
I have compiled the latest version (1.4 RC1) for Linux if you want to try it out. I'm running a 64-bit Ubuntu 12.10. The tool might work on other distributions, but not on 32-bit systems! (There are precompiled 32-bit versions on the website of the author.)
So what do you need to get it running?
Download my precompiled binary (http://www.mediafire.com/?85nny8d1mpea5hp
) and extract it somewhere. Then install libusb-1.0 which is a prerequisite of running the tool. Finally, give the Heimdall executable execute rights and make sure you run it as root.
First steps to do for making it sure that the tool works and communicates with your device:
- Put your device into download mode by holding down Volume down, Home and Power keys.
- Connect your USB cable.
- Execute: 'heimdall detect' (This will show if the phone cannot be detected.)
- Execute: 'heimdall download-pit --output SGR.pit' (This will download the PIT (Partition Information Table) file of the device.)
- Execute: 'heimdall print-pit --file SGR.pit' (This will give you detailed information about the partition structure of the device and this information can be used to identify partitions which you will flash to.)
The three most important information shown by the PIT file are 'Identifier', 'Partition Name' and 'Flash Filename'. For example if you want to flash a recovery image, you will look for 'recovery.img' as 'Flash Filename'. You can find that the corresponding 'Identifier' is '14' and 'Partition Name' is 'SOS' for our device. You can flash your recovery.img with one of the following commands:
heimdall flash --SOS /path/to/recovery.img
heimdall flash --14 /path/to/recovery.img
Notice the 'Partition Name' and 'Identifier' values highlighted in red.
This was just an example scenario. You can flash full factory images, repartition the device, change the bootloader, or dump a whole partition. There are many opportunities. If you are interested in using this tool, don't neglect taking time for reading about it first as it can seriously brick your device (Even though APX mode gives an enormous help in recovering the device.). I don't recommend that you use this tool for those not having much experience in what they do. However, this tool can help a lot if you use Linux and don't want to reboot to/use Windows if you want to return to a stock rom.
Every custom modification to devices have risks. Use this at your own risk!
Have fun and enjoy!