[PROGRAM] Heimdall - Open-Source Cross-Platform Flashing Suite (1.3.2 Now Available)

Search This thread

Benjamin Dobell

Inactive Recognized Developer
Jul 1, 2010
843
600
Melbourne
www.glassechidna.com.au
Original Thread:

What is Heimdall?
Heimdall is a cross-platform open-source tool suite used to flash ROMs onto Samsung Galaxy S devices.

How does it work?
Heimdall uses the same protocol as Odin to interact with a device in download mode. USB communication in Heimdall is handled by the popular open-source USB library, libusb-1.0.

Why “Heimdall”?
The flashing software Odin is named after the king of gods in Norse mythology. Loke, the software component on the Galaxy S that provides functionality to flash, may also to be named after an important character in Norse mythology, often translated as Loki. As such I have named my flashing software Heimdall, after the Norse god, and guardian of the Bifrost Bridge.

What platforms does Heimdall run on?
Linux, OS X and Windows (XP, Vista, 7 etc.)

Why use Heimdall when we can use Odin?
Odin is generally unreliable and only runs on Windows systems. Furthermore, Odin is leaked Samsung software that is not freely available or well understood by the community.

Is Heimdall safe?
No matter what method you chose, flashing firmware onto your phone has a lot of potential for disaster. We have tested Heimdall with a variety of phones flashing several different firmware versions resulting in a 100% success rate. As such we believe that Heimdall is generally reliable. However keep in mind, just like any flashing software, Heimdall has the potential to brick your phone if not used correctly.

How do Galaxy S phones get bricked when flashing?
Besides the inherent risks like power outs, accidental removal of the USB cable etc. The Galaxy S appears to be running extremely unreliable USB control software.

A failure to flash does not automatically equate to a bricked phone. However if you're extremely unlucky and the flash fails whilst transferring the primary boot-loader, secondary boot-loader or params.lfs (all quite small) than you've got yourself a paper weight that you're hoping Samsung will replace.

Please be extremely careful mixing files from different firmware releases. Don't do so unless you're certain it will work!

What Galaxy S variants has Heimdall been tested with?
We’ve tested Heimdall with a Galaxy S GT-I9000 (8 GB) from the United Kingdom and Galaxy S GT-I9000 (16 GB) from Australia. We don’t personally have access to any other devices to test with, however users have confirmed Heimdall functions correctly with the AT&T Captivate, Bell Vibrant, Telstra GT-I9000T, Epic 4G and the Galaxy Tab.

Enough talk, where can we get it?
The latest release is available here. Please read the instructions and README files included in the archives.

I love you, man. Will you have my baby?
No, but I will very gladly accept donations. If you appreciate my work and would like to support future development you can make a donation here. If you think you have something else to offer, then feel free to shoot me a PM or contact me via the contact form on the Glass Echidna website.
 
Last edited:

PoTi_96

Senior Member
Aug 3, 2010
732
36
Wels
Gr8 news! :D

Hope this won't increase the flash counter in download mode when it's finished

Swyped from my overclocked GT-I9100 using XDA Premium App
 
  • Like
Reactions: djenis

Xero Xenith

Senior Member
Sep 4, 2010
111
26
Excellent! Though I may not be the first to try it, I'll probably be using this (tomorrow?) to flash my first custom ROM if all goes well :D
 

4iedemon

Member
Jul 18, 2008
28
2
Melbourne
Hey Ben,

Do you think its possible to make backups of firmware using this tool? I think it'd be good for those who wants to have carrier-branded ROMS backed up for warranty purposes.
 
  • Like
Reactions: jakobvoss

Benjamin Dobell

Inactive Recognized Developer
Jul 1, 2010
843
600
Melbourne
www.glassechidna.com.au
Hey Ben,

Do you think its possible to make backups of firmware using this tool? I think it'd be good for those who wants to have carrier-branded ROMS backed up for warranty purposes.
Sorry, I missed this post.

Heimdall has theoretically supported dumping of firmware for quite some time. However all the devices I've ever tested it with mostly send back junk data and eventually stop responding altogether (requiring a manual reboot). As far as I can tell this is simply a result of the secondary bootloaders on devices just not supporting the functionality, however it's possible that the functionality has been finished/fixed for the SGS2.

If someone wants to test out dumping when they test out flashing that would be great. If so I recommend you enable the verbose switch so you have a better idea of what is going on.
 
  • Like
Reactions: jastonas

Benjamin Dobell

Inactive Recognized Developer
Jul 1, 2010
843
600
Melbourne
www.glassechidna.com.au
Nice, thanks! Would this (theoretically) work with the GUI from v1.1?
Yeah, you obviously won't be able to use any functionality that isn't available from the GUI though. Because the SGS2 has a few different partitions that aren't accessible from Heimdall Frontend you won't be able to flash to them, however you can still flash kernels etc. no problems.
 

winst

Member
Feb 25, 2007
30
0
Code:
$ heimdall print-pit

Heimdall v1.0.2b, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Failed to detect compatible device

I installed the latest one in OS X 10.6, restarted, and got the above result. Note that running "adb devices" does show up my SGSII properly.
 

elban

Inactive Recognized Developer
Jul 10, 2009
1,065
745
Venice
www.opbyte.it
Code:
$ heimdall print-pit

Heimdall v1.0.2b, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Failed to detect compatible device

I installed the latest one in OS X 10.6, restarted, and got the above result. Note that running "adb devices" does show up my SGSII properly.

is your phone in download mode?

Sent from my GT-I9100 using XDA App
 

jps1974

Senior Member
Nov 8, 2009
108
47
Vienna
I tried print-pit and dump and ended up with a bunch of "Error -7 whilst receiving packet." print-pit seemed to work fine but was unable to end the session.

Find verbose logs here:
print-pit
dump

For obvious reasons, I'm a little hesitant to try flashing anything ;)
 
  • Like
Reactions: Benjamin Dobell

Benjamin Dobell

Inactive Recognized Developer
Jul 1, 2010
843
600
Melbourne
www.glassechidna.com.au
I tried print-pit and dump and ended up with a bunch of "Error -7 whilst receiving packet." print-pit seemed to work fine but was unable to end the session.

Find verbose logs here:
print-pit
dump
Thanks for the details, much appreciated.

The dump log doesn't really surprise me, it's actually better than how it fails on Galaxy S. The Galaxy S downloads a heap (megabytes) of junk, I guess that it's good that it fails immediately.

For obvious reasons, I'm a little hesitant to try flashing anything ;)
Haha, no worries.

A few questions though:
  • Does your device reboot after the PIT information is displayed?
  • When you reboot does the phone boot normally or is the connect phone to PC screen displayed?
  • Does "heimdall close-pc-screen" also fail to end the session?

If your device boots up fine (no connect to PC screen) then that should mean the end session packet was received (and interpreted) by your phone no problems. If that's the case then it's possible Samsung have just changed the protocol so no response is expected. It never really made sense to me that you've essentially told the phone you're done and then you still send it a reboot packet.

Alternatively the syntax to end a session may have changed slightly. Someone mentioned a flash counter, maybe I'm supposed to send a packet to update the counter (although I'd rather not anyway).

Without a SGS2 I'm unable to investigate this myself but if someone is able to get me a detailed USB log of flashing with Odin or Kies then I could sort it out. I literally need the 1s and 0s sent to/from the phone. If not then donations towards getting me a SGS2 would be immensely helpful. Thanks again to those of you who have donated.

EDIT: Doh, I just realised I spelt "successful" wrong when Heimdall downloads a PIT file :p
 
Last edited:

jps1974

Senior Member
Nov 8, 2009
108
47
Vienna
Well, I grew some balls and tried a full flash - worked just fine ;)

To answer your questions:

Does your device reboot after the PIT information is displayed
Nope
When you reboot does the phone boot normally or is the connect phone to PC screen displayed?
Boots up normally
Does "heimdall close-pc-screen" also fail to end the session?
Yes, see here
Without a SGS2 I'm unable to investigate this myself but if someone is able to get me detailed USB log of flashing with Odin or Kies then I could sort it out, I literally need the 1s and 0s sent to/from the phone. If not then donations towards getting me a SGS2 would be immensely helpful. Thanks again to those of you who have donated.
I made a small donation towards your new device, but I'll be happy to help you out if you give me some instructions :)

By the way, I have to use sudo, otherwise I get this:

Code:
Failed to access device. Error: -3

Thanks for all your work!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 40
    Original Thread:

    What is Heimdall?
    Heimdall is a cross-platform open-source tool suite used to flash ROMs onto Samsung Galaxy S devices.

    How does it work?
    Heimdall uses the same protocol as Odin to interact with a device in download mode. USB communication in Heimdall is handled by the popular open-source USB library, libusb-1.0.

    Why “Heimdall”?
    The flashing software Odin is named after the king of gods in Norse mythology. Loke, the software component on the Galaxy S that provides functionality to flash, may also to be named after an important character in Norse mythology, often translated as Loki. As such I have named my flashing software Heimdall, after the Norse god, and guardian of the Bifrost Bridge.

    What platforms does Heimdall run on?
    Linux, OS X and Windows (XP, Vista, 7 etc.)

    Why use Heimdall when we can use Odin?
    Odin is generally unreliable and only runs on Windows systems. Furthermore, Odin is leaked Samsung software that is not freely available or well understood by the community.

    Is Heimdall safe?
    No matter what method you chose, flashing firmware onto your phone has a lot of potential for disaster. We have tested Heimdall with a variety of phones flashing several different firmware versions resulting in a 100% success rate. As such we believe that Heimdall is generally reliable. However keep in mind, just like any flashing software, Heimdall has the potential to brick your phone if not used correctly.

    How do Galaxy S phones get bricked when flashing?
    Besides the inherent risks like power outs, accidental removal of the USB cable etc. The Galaxy S appears to be running extremely unreliable USB control software.

    A failure to flash does not automatically equate to a bricked phone. However if you're extremely unlucky and the flash fails whilst transferring the primary boot-loader, secondary boot-loader or params.lfs (all quite small) than you've got yourself a paper weight that you're hoping Samsung will replace.

    Please be extremely careful mixing files from different firmware releases. Don't do so unless you're certain it will work!

    What Galaxy S variants has Heimdall been tested with?
    We’ve tested Heimdall with a Galaxy S GT-I9000 (8 GB) from the United Kingdom and Galaxy S GT-I9000 (16 GB) from Australia. We don’t personally have access to any other devices to test with, however users have confirmed Heimdall functions correctly with the AT&T Captivate, Bell Vibrant, Telstra GT-I9000T, Epic 4G and the Galaxy Tab.

    Enough talk, where can we get it?
    The latest release is available here. Please read the instructions and README files included in the archives.

    I love you, man. Will you have my baby?
    No, but I will very gladly accept donations. If you appreciate my work and would like to support future development you can make a donation here. If you think you have something else to offer, then feel free to shoot me a PM or contact me via the contact form on the Glass Echidna website.
    4
    Source has been pushed to Github. Let me know how it goes for you Galaxy S II folk.

    If you're appreciative of the updates don't forget to donate so I can get myself a Galaxy S II :)
    3
    Heimdall 1.2.0 command line binaries are now available. Debian 32-bit, Debian 64-bit, Windows and OS X (universal) are all available.
    2
    Heimdall Suite 1.3 (beta 1) binaries are now available from here.

    If you're a developer or in any way interested in the brand new Heimdall Firmware Package format then this thread may also be of interest. Please spread the word about the packaging format. If mass adopted I think it has the potential to save a lot of accidental bricks!

    Oh, and because this is a beta release it's the perfect time for users to report issues. However if you're going to do so please provide as much information as possible and post the issues using the Github issue tracker. Unfortunately just reporting problems isn't always that useful to me. So if you're able to report particular cases in which Heimdall fails but Odin succeeds then that's particularly important. Even better are USB captures of this process taking place!
    2
    How exactly would I flash a PDA file with that? It doesn't have --pda in the help, and I don't really want to guess ;)

    Flo

    You have to extract the .tar file, inside you will find different things like factoryfs.img, modem.bin, zImage (which is the kernel) etc. Which file is for which option is pretty self explanatory - except maybe kernel (zImage) and secondary bootloader (Sbl.bin). If in doubt, ask here or see if you can find the answer over in the original thread for Galaxy S :)

    Sent from my GT-I9100 using Tapatalk