Tuesday, October 23, 2018

Flashing Android Device With Heimdall

Here I'll explain how to flash image files to an android device using Mac Os X console. This should apply to linux console too. (in this case a GT-I8190 whith a broken screen)

First download and install heimdall:

http://wiki.cyanogenmod.org/w/Install_and_compile_Heimdall

Get into download mode (Odin Mode)

VOLUME_DOWN+MENU+POWER -> VOLUME_UP

Connect USB cable and check if your device is detected:

$heimdall detect --usb-log-level error
Device detected

Change log level to debug if you need more info

Then download the pit information:

heimdall print-pit > print-pit

From now on you only need to find the partition names and flash your images with that name:

for example first find the name of recovery.img partition

$ grep -B1 recovery.img print-pit
Partition Name: Kernel2
Flash Filename: recovery.img

then flash recovery img (here i choose not to reboot because I will flash more than one image then reboot)

heimdall flash --no-reboot --Kernel2 recovery.img