[GUIDE] Flashing with Heimdall

Search This thread

_sui

New member
Feb 4, 2011
4
2
Hi, thanks for this great little howto. It helped me a lot and I was able to flash Darkys Rom on my SGS without using a Windows Box.

I have two additions to this tutorial for Linux user. You have to create
Code:
/etc/udev/rules.d/50-android.rules
Code:
SUBSYSTEM=="usb_device", SYSFS{Vendor-ID}=="04e8",MODE="0666"
Replace "04e8" with the Vendor ID of your Phone. On a Galaxy S I9000 it should be 04e8.
If you are on a Kernel which uses recovery <3e> go to this thread and get a new Kernel
Unzip and untar the file you get there and enter all files like described in the first post.

After that download clockwork rom manager from the market, download a new ROM and flash your phone.
That's all. No need to root your phone again or to do anything else.

HTH, sui
 
Last edited:

roboroz

Member
Sep 19, 2010
8
0
i have a macbook and i am trying to flash the last official firmware using heimdall.
my samsung galaxy s is the uk unbranded version and come natively with froyo 2.2.
why,while launching the flash procedure i get the "failed to detect compatible device" msg?
heimdall front-end seems to work fine,i've installed also the QT libraries.May be a heimdall.kext issue?
i tried,in the terminal, to install it using the command sudo ./install-kext.sh, but i got "sudo: unable to execute ./install-kext.sh: No such file or directory"
then i opened install-kext.sh with texedit and copied every line of the file inside the terminal,but is not working anyway :(
 

Benjamin Dobell

Inactive Recognized Developer
Jul 1, 2010
843
600
Melbourne
www.glassechidna.com.au
i have a macbook and i am trying to flash the last official firmware using heimdall.
my samsung galaxy s is the uk unbranded version and come natively with froyo 2.2.
why,while launching the flash procedure i get the "failed to detect compatible device" msg?
heimdall front-end seems to work fine,i've installed also the QT libraries.May be a heimdall.kext issue?
i tried,in the terminal, to install it using the command sudo ./install-kext.sh, but i got "sudo: unable to execute ./install-kext.sh: No such file or directory"
then i opened install-kext.sh with texedit and copied every line of the file inside the terminal,but is not working anyway :(
Did you install the OS X release from DMG or did you compile yourself?

If you used the DMG then the kext should already be installed. It's likely that the problem is your device is running a broken secondary bootloader. Please see this thread for details.
 

Moudii

Senior Member
Aug 11, 2010
199
42
When I try to flash using heimdall on macbook, I get an error: "dyld: unknown required load command 0x80000022"

Does this mean my bootloader is wrong?
 

Stevewmn

Member
Nov 27, 2010
16
0
I'm a little confused with the original directions on page 1. It says hold down the up, down volume and power buttons at the same time to get to download mode, and "you'll know it when you see it". On my Captivate this just blinks the "AT&T World Phone" splash screen repeatedly, but if I release the buttons it'll boot me into recovery mode, where I can reboot the phone, clear all user data or load updates from a zip file.

Download mode is entirely different, and I can get to it my holding the up and down volume keys while plugging a usb cable in. This mode has a black screen with yellow lettering and a big yellow triangle and explicitly says download.

So which mode am I supposed to be in, recovery or download? Or is the fact that I get to recovery mode through the three button power up a sign that my bootloader needs updating?


I say this because I'd like to update my Captivate with something better than Eclair but Kies mini has failed me on the only Windows box I have admin rights on. Meanwhile I have Linux and Mac systems to work with.

Also, does Heimdall have a "Factory Reset" capability like Odin? This seems to be a necessary step in some ROM flashing guides and looks like it might make Kies mini work for me also.
 

lordmalice

Member
Sep 27, 2010
29
0
powell
Samsung_Galaxy_S_Black_Screen_of_Death.jpg


This isn't a "my device is bricked" screen, just that you ****ed up the firmware. Just follow the instructions again, put it in download mode and try again.[/COLOR]

If, after having seen the above screen, you can't get your phone into download mode, then you're toast.


that screen does not mean death on most vibrants that have had the ji6 or kies froyo update that is actually usable as a form of download mode but there is a fix for the phone ! pc error and if all else fails jig is always a nice fall back but when you have no reaction on the phone no backlights no charging icons nothing then bootloader is dead there fore phone is toast
 

jorgeol

Member
Nov 15, 2009
19
0
Rome
Hi guys,

i'm on a MacBook Pro. I installed Heimdall Suite 1.1.1, and everything went fine. But when I try to open the frontend, I get this crash report:

Process: heimdall-frontend [222]
Path: /Applications/heimdall-frontend.app/Contents/MacOS/heimdall-frontend
Identifier: com.yourcompany.heimdall-frontend
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: launchd [118]

Date/Time: 2011-03-21 17:27:39.218 +0100
OS Version: Mac OS X 10.6.6 (10J567)
Report Version: 6

Interval Since Last Report: 2152961 sec
Crashes Since Last Report: 1245
Per-App Crashes Since Last Report: 5
Anonymous UUID: 7EA705A9-F38E-487A-A996-2BDAB3CFCCE7

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0

Dyld Error Message:
Library not loaded: QtGui.framework/Versions/4/QtGui
Referenced from: /Applications/heimdall-frontend.app/Contents/MacOS/heimdall-frontend
Reason: image not found

Binary Images:
0x8fe00000 - 0x8fe4162b dyld 132.1 (???) <A4F6ADCC-6448-37B4-ED6C-ABB2CD06F448> /usr/lib/dyld

Model: MacBookPro7,1, BootROM MBP71.0039.B0B, 2 processors, Intel Core 2 Duo, 2.4 GHz, 4 GB, SMC 1.62f6
Graphics: NVIDIA GeForce 320M, NVIDIA GeForce 320M, PCI, 256 MB
Memory Module: global_name
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.10.131.36.1)
Bluetooth: Version 2.3.8f7, 2 service, 19 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en1
Serial ATA Device: Hitachi HTS545025B9SA02, 232.89 GB
Serial ATA Device: MATSHITADVD-R UJ-898
USB Device: Built-in iSight, 0x05ac (Apple Inc.), 0x8507, 0x24600000
USB Device: USB 2.0 Hub [MTT], 0x1a40 (TERMINUS TECHNOLOGY INC.), 0x0201, 0x26400000
USB Device: HP LaserJet M1120 MFP, 0x03f0 (Hewlett Packard), 0x5617, 0x26450000
USB Device: Internal Memory Card Reader, 0x05ac (Apple Inc.), 0x8403, 0x26100000
USB Device: BRCM2046 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0x06600000
USB Device: Bluetooth USB Host Controller, 0x05ac (Apple Inc.), 0x8213, 0x06610000
USB Device: IR Receiver, 0x05ac (Apple Inc.), 0x8242, 0x06500000
USB Device: Apple Internal Keyboard / Trackpad, 0x05ac (Apple Inc.), 0x0236, 0x06300000

Any clues? Thnx.
 

Benjamin Dobell

Inactive Recognized Developer
Jul 1, 2010
843
600
Melbourne
www.glassechidna.com.au
Hi guys,

i'm on a MacBook Pro. I installed Heimdall Suite 1.1.1, and everything went fine. But when I try to open the frontend, I get this crash report:

Process: heimdall-frontend [222]
Path: /Applications/heimdall-frontend.app/Contents/MacOS/heimdall-frontend
Identifier: com.yourcompany.heimdall-frontend
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: launchd [118]

Date/Time: 2011-03-21 17:27:39.218 +0100
OS Version: Mac OS X 10.6.6 (10J567)
Report Version: 6

Interval Since Last Report: 2152961 sec
Crashes Since Last Report: 1245
Per-App Crashes Since Last Report: 5
Anonymous UUID: 7EA705A9-F38E-487A-A996-2BDAB3CFCCE7

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0

Dyld Error Message:
Library not loaded: QtGui.framework/Versions/4/QtGui
Referenced from: /Applications/heimdall-frontend.app/Contents/MacOS/heimdall-frontend
Reason: image not found

Binary Images:
0x8fe00000 - 0x8fe4162b dyld 132.1 (???) <A4F6ADCC-6448-37B4-ED6C-ABB2CD06F448> /usr/lib/dyld

Model: MacBookPro7,1, BootROM MBP71.0039.B0B, 2 processors, Intel Core 2 Duo, 2.4 GHz, 4 GB, SMC 1.62f6
Graphics: NVIDIA GeForce 320M, NVIDIA GeForce 320M, PCI, 256 MB
Memory Module: global_name
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.10.131.36.1)
Bluetooth: Version 2.3.8f7, 2 service, 19 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en1
Serial ATA Device: Hitachi HTS545025B9SA02, 232.89 GB
Serial ATA Device: MATSHITADVD-R UJ-898
USB Device: Built-in iSight, 0x05ac (Apple Inc.), 0x8507, 0x24600000
USB Device: USB 2.0 Hub [MTT], 0x1a40 (TERMINUS TECHNOLOGY INC.), 0x0201, 0x26400000
USB Device: HP LaserJet M1120 MFP, 0x03f0 (Hewlett Packard), 0x5617, 0x26450000
USB Device: Internal Memory Card Reader, 0x05ac (Apple Inc.), 0x8403, 0x26100000
USB Device: BRCM2046 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0x06600000
USB Device: Bluetooth USB Host Controller, 0x05ac (Apple Inc.), 0x8213, 0x06610000
USB Device: IR Receiver, 0x05ac (Apple Inc.), 0x8242, 0x06500000
USB Device: Apple Internal Keyboard / Trackpad, 0x05ac (Apple Inc.), 0x0236, 0x06300000

Any clues? Thnx.
Sorry I've been meaning to fix that for a LONG time now. I planned to wait until I released the 1.2.0 update however I haven't had much time to finish off the release. However here is a temporary work around.
 

bzztom

New member
Apr 13, 2011
1
0
heeelp

hey all, great post and very informative, right my problem is ive flashed my i5800 to froyo and rooted, i just cant seem to flash darkys res edition using the heimdall or odin method, with the heimdall method ive worked round the device errors, now all it says is failed! not really sure what else to do, any help would be great as ive spent too long in front of the computer :p was so much easier on my last android phone =\ anyways cheers in advance (Y)
 

andytof46

Member
Sep 25, 2008
20
0
trying to dump first

Hi guys, Love the fact I don't need a vm or windows to flash my tab gr8 work.

SO I was trying to do a dump and kick my usb cable out half way through.... BRICKED it
Black screen of Death!

But I ran the command again and it dumped (still got black screen tho but the file is new and communication is still working - go figure)...... Can I use the .img file directly to reflash???

what would be the command?


cheers
 

hlaube

Senior Member
Feb 20, 2011
139
22
Just learned, you have to be a priviliged user on your Mac. As normal user it won't work.

Up till now I only managed to flash using command line. Still need to figure out how to run frontend priviliged.

Upd: I started frontend as privilged user from commandline, that works!!
 
Last edited:

parhelion69

Senior Member
Mar 17, 2010
178
68
La Paz
how do you flash bootloaders with heimdall?
I want to flash gingerbread, and the only tar has plenty of other files than aren't mentioned in this thread :)
 

hlaube

Senior Member
Feb 20, 2011
139
22
Well, from samfirmware I dowloaded the actual GB with three files in it:
CSC_NEE_JV3.tar.md5
PDA_XWJVB_Sbl.tar.md5
PHONE_XXJVK.tar.md5

After untaring (tar -xf filename) them, you will find:
boot.bin (the primary bootloader)
cache.rfs (the cache-file)
dbdata.rfs (the dbdata-file)
factoryfs.rfs (sounds like the filesystem)
modem.bin (the Modem for phone and GPS)
param.lfs (I guess, paramter-file for the FW)
sbl.bin (secondary bootloader)
zImage (the kernel)

The frontend will have fields for all thees. :)
 
Last edited:

hlaube

Senior Member
Feb 20, 2011
139
22
Btw. starting the frontend from commandline has the benefit, you will get errors printed into the command window while the frontend tries to do its job. Helped me to identify accesright problems of files, I wanted to flash.

The command:
$ /Applications/heimdall-frontend.app/Contents/MacOS/heimdall-frontend
 
  • Like
Reactions: urbanomad

hlaube

Senior Member
Feb 20, 2011
139
22
It is my plaesure if I can support. I enjoy the software since I do not need to use bootcamp to start windows to be able to flash my SGS.
 

toansta

Senior Member
Sep 26, 2010
207
4
hi i'm following the steps to fix the bootloader but it says that the kies registry patcher no longer works?

what do you recommend that i do because i don't have odin anymore (no windows) and i can't seem to flash with heimdall (the computer doesn't recognise the phone)

thanks
 

hlaube

Senior Member
Feb 20, 2011
139
22
Have you followed the steps for OS X in the beginning of this thread?

If you did, and Heimdall will not flash, it is porbably, that your account on that Mac is not priviliged. If so, please see posts above.
 

toansta

Senior Member
Sep 26, 2010
207
4
Have you followed the steps for OS X in the beginning of this thread?

If you did, and Heimdall will not flash, it is porbably, that your account on that Mac is not priviliged. If so, please see posts above.

i will try this.... but sorry for asking how do i set privileges?
(i only have the one admin account on my mac btw)

thanks for the help :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 35
    Heimdall is an alternative, cross-platform tool to flash firmwares for the Galaxy S series of devices, including the Tab.

    Heimdall
    Some of you might not have heard but a brilliant guy one day woke up and thought 'damn it Odin' and started working on Heimdall. The guy reverse-engineered the protocol to flash our Galaxy's and turned up a piece of software called Heimdall that can do exactly the same as Odin.

    This tool is open-source and runs on Qt for its GUI and libusb to communicate over USB making this tool completely cross-platform. This basically means flashing your Galaxy is not just limited to Windows anymore.

    This guide will walk you through the steps to work with Heimdall. I'm a Mac user so the screenshots you'll see will be Mac-y. However, since the app and GUI are cross-platform the same apply for both Windows and Linux.

    Disclaimer:

    Flashing your device through anything but Kies can be a dangerous business and can brick your Galaxy S.
    That said, Samsung seems to have engineered the Galaxy S series in a way that makes it relatively difficult to brick even if you **** up.

    Proceed with caution and at your own discretion, both the developers of Heimdall and I can not be held accountable for the possible damage you do to your device by following this guide or using Heimdall.


    Flashing with Heimdal
    Flashing with Heimdall is a little bit different than with Odin. With Odin you usually select a PIT, if necessary, add the PDA.tar.md5, Modem.tar.md5 and CSC.tar.md5 to the locations, put the phone in download mode and hit go.

    Heimdall takes a different approach. In the Heimdall GUI you need to select all components you want to flash. This means extracting the TAR-archives and pointing Heimdall to their respective files. This allow relative fine-grained control over what you flash and doesn't depend on files being named correctly.

    In order to install Heimdall head over to the guy's website and download and install Heimdall.

    Do yourself a favor, even if you're on Linux or Mac, just reboot after the install. On OS X the installation includes a kernel extension and though this can usually be reloaded by logging out and back in again the reboot is safer and can't hurt.

    Mac OS X specific
    For Mac OS X the 1.1.0 version of Heimdall includes some nuked Qt binaries which means the GUI won't start. This can be fixed by afterwards installing Qt from here.

    The above should not apply to the latest Heimdall release anymore according to the release notes. If however you still get errors about Heimdall failed to start, just install the Qt binaries linked above anyway, should take care of the error.

    There is a second problem unfortunately on OS X. Due to a bug in older versions of the bootloader the device doesn't register correctly in download mode. If you then try to flash without having fixed the bootloader you'll nuke the Galaxy S and end up at a "black screen of death". Trust me, I tried, it broke and it scared the crap out of me.

    Don't worry, this isn't the dreadful black screen of death meaning your device is busted, it just means your firmware is. You can just put it into download mode again and flash another firmware over it with Odin (Windows)

    In order to avoid this we need to fix the bootloader first. Everyone who has installed the official Froyo update through Kies will already have a fixed bootloader and so you can ignore the next bit. If however you hocus-pocused around with Kies / Odin to flash Froyo like I did you probably don't have the updated bootloader.

    Unfortunately we're going to need Windows for this and Kies so either get a VM ready, bootcamp into Windows or find a friend who'll lend you his pc for an hour.

    See the second post, "Fixing the bootloader" for instructions.

    Linux specific

    As far as I'm aware there are no Linux specific problems, not even the bootloader issue mentioned above for OS X. However, it might be wise to follow the instructions anyway since an updated bootloader can't hurt.

    Windows specific

    As far as I'm aware there are no Windows specific problems, not even the bootloader issue mentioned above for OS X. However, it might be wise to follow the instructions anyway since an updated bootloader can't hurt.

    Now, time to get busy.

    I'm going to assume that you have downloaded a firmware, for example from samfirmware, and have extracted the .RAR and the .TAR inside and now have a folder with at least the following:
    • factoryfs.rfs (PDA > FactoryFS)
    • param.lfs (PDA > Param.lfs)
    • zImage (PDA > Kernel (zImage))

    Additionally you might have:
    • cache.rfs (CSC > Cache)
    • modem.bin (Other > Modem)

    Be aware, there are other configurations possible. For example, when you're rooting by flashing a rooted kernel there will probably only be a zImage.

    Start Heimdall or Heimdall-frontend, you should get a screen similar to this:
    attachment.php


    Now, unless explicitly stated that you need a .PIT to flash this firmware you can leave this field blank. If you load a PIT, be sure to see if you need to repartition. The general rule is that you won't, unless you flashed with a firmware that had a different PIT than what samfirmware is indicating you need.

    After that, start hitting the browse button for the components you want to flash with Heimdall and add them. Your screen will probably look something like this:
    attachment.php


    Now, it's time to put your phone in download mode. Power off the phone and wait for it to completely have shut down and unplug it from USB / charger. Hold down the Home and Volume Down buttons and then press Power. Keep holding those three buttons until you get into download mode (you'll know when you see it).

    If you can't get into download mode / nothing seems to happen, you probably have a Galaxy with the broken 3-button combo problem, see here for a fix:
    http://xdaforums.com/showthread.php?t=785201

    Now, connect the phone over USB with your computer. If you're on on Mac and Linux you can proceed immediately. If you're on Windows you'll probably need to wait for Windows to install a driver or two.

    Now hit the Start button and watch it go!

    If all goes well you'll see the progress bar on both Heimdall and in your phone filling up (might take a while for one to appear on the Galaxy S). Once it's done it'll probably say everything went OK and the Galaxy will reboot into recovery. Let it do it's thing, it will reboot again and begin booting the new firmware.

    After having installed a new firmware the first boot might take a while. You'll just seem to be stuck at the glowing S, just let it run it will boot eventually.

    If however Heimdall says "Failed" your phone will (probably) reboot or when you try to reboot you'll get stuck at the "black screen of death":

    Samsung_Galaxy_S_Black_Screen_of_Death.jpg


    This isn't a "my device is bricked" screen, just that you ****ed up the firmware. Just follow the instructions again, put it in download mode and try again.


    If, after having seen the above screen, you can't get your phone into download mode, then you're toast.
    9
    Fixing the bootloader

    Fixing the bootloader

    In order to fix the bootloader we need to flash some firmware. There's always the risk of data loss so make a backup first!

    First we need Kies available on Windows, so grab it and install it. See the XDA wiki about this.

    Once Kies is done installing don't launch Kies or exit it first, then connect your Galaxy S. Let Windows purr for a while as it gets busy installing your device drivers. Once it says it's done, you can start Kies.

    Now, it's time to get the Kies registry patcher. We'll use this tool to fool Kies into thinking an older version is running on the Galaxy S so that it presents us with the option to grab the Froyo update.

    Once you've started Kies and Kies has recognised your phone, start the Kies registry patcher. Set the Fake mode to True and select your product code. As I'm Dutch, I selected XEN from the dropdown. There is a list on the XDA wiki to tell you which product code is suited for your country, I suggest you use that one.

    Now hit the "Write registry" button and then inside Kies, select the update firmware button in the bottom right corner (the phone with the arrow). Kies will now probably tell you it has an update for your phone which should be in the JP* series or GJK3, meaning it is the Froyo update.

    Tell Kies to update your phone. Kies will get busy downloading the firmware and flashing it. Your phone will reboot into download mode, once that done you'll see recovery mode and then it will start booting.

    Now that you have installed the official Samsung Froyo Galaxy S update you'll have the fixed bootloader you need in order to be able to use Heimdall on OS X.
    2
    Me also installed Heimdall version 1.3.2 and I do have consequently the same GUI as you.

    I only want to flash the baseband. The screenshot of the older version 1.1 of Heimdall (see post #1) tells me that it is easy to flash the modem and nothing else.
    For me there is not need to flash anything else. ROM and kernel are working ok.

    What I have is a file "baseband_KPO.zip" containing a "baseband.tar" containing a single file called "amss.mbn".
    Linux command "file" tells me that is "ELF 32-bit LSB executable, ARM, version 1", the size (decompressed) is about 20 MB.

    In the old Heimdall I would dare to put this file into the "modem" field.
    In the new Heimdall I seem to need a Heimdall package or a PIT file. But I do not want to flash everything, and I do not want to repartition the device. The device is not bricked, I only want to change to the KPO baseband which could improve "network quality" in my situation.

    Is there someone who can tell how to use Heimdall 1.3.2 for flashing, let's say, a single component the same way as it has been possible with Heimdall 1.1? Before someone asks: I'm on Linux, and so I can't use Odin.

    My device and setup:
    SAMSUNG GALAXY S PLUS GT-i9001
    ROM : ErikMod RC2 -Final-
    Kernel : DiabloKernel 2.6 High Performance

    I'm using 1.3.1 with Ubuntu.

    Although it asks for a PIT for flashing I don't believe it re-partitions as I haven't experienced data loss when doing it.

    Under the "Utilities" tab you can download the PIT from your phone and save it in your Computer. On android 4.1.2 I'm still using my PIT from Gingerbread.

    Then under the "Flash" tab you in "Options" load that PIT but don't check "Re-Partition"

    Next you add your files under "Partitions (Files)" and click "Start" with the phone connected in download mode.

    It works most of the time for me but some roms seem to give it trouble.

    Alternatively if Mobile Odin is available for your phone you could use it. try the Play Store.
    2
    Install ClockWorkMod recovery to your device and install cm9 from that recovery from the sdcard.
    Heimdall it's for stock roms. CM packing is different.

    Sent from my GT-N7000 using xda premium