[Tutorial] Heimdall for Mac (Like Odin)

Search This thread
Dec 27, 2012
32
28
I decided to write a tutorial using the Heimdall command line version for mac because some of you, like me, might not have access to a Windows machine 24/7. Note to reader: This tutorial is based on the command line version of Heimdall because not only the Heimdall-frontend app(the GUI version) is straight forward, but in my opinion lacks features. Read entire post.

First off you are going to download Heimdall. Here is the link. After it downloads, install it and restart when you are notified.

Now for the fun part. After it installs, you will have to open Terminal to use Heimdall since we are doing the command line version. Terminal is located under
Code:
Applications/Utilities/

After Terminal loads, the command for using Heimdall is straight forward, here it is:
Code:
heimdall <action> <action arguments> <common arguments>

Here are the Actions/Arguments:

Common Arguments:
[--verbose] [--no-reboot] [--stdout-errors] [--delay <ms>]


Action: flash
Arguments:
--repartition --pit <filename> [--factoryfs <filename>]
[--cache <filename>] [--dbdata <filename>] [--primary-boot <filename>]
[--secondary-boot <filename>] [--param <filename>] [--kernel <filename>]
[--modem <filename>] [--normal-boot <filename>] [--system <filename>]
[--user-data <filename>] [--fota <filename>] [--hidden <filename>]
[--movinand <filename>] [--data <filename>] [--ums <filename>]
[--emmc <filename>] [--<partition identifier> <filename>]
or:
[--factoryfs <filename>] [--cache <filename>] [--dbdata <filename>]
[--primary-boot <filename>] [--secondary-boot <filename>]
[--secondary-boot-backup <filename>] [--param <filename>]
[--kernel <filename>] [--recovery <filename>] [--efs <filename>]
[--modem <filename>] [--normal-boot <filename>] [--system <filename>]
[--user-data <filename>] [--fota <filename>] [--hidden <filename>]
[--movinand <filename>] [--data <filename>] [--ums <filename>]
[--emmc <filename>] [--<partition identifier> <filename>]
Description: Flashes firmware files to your phone.
WARNING: If you're repartitioning it's strongly recommended you specify
all files at your disposal, including bootloaders.

Action: close-pc-screen
Description: Attempts to get rid off the "connect phone to PC" screen.

Action: download-pit
Arguments: --output <filename>
Description: Downloads the connected device's PIT file to the specified
output file.

Action: detect
Description: Indicates whether or not a download mode device can be detected.

Action: dump
Arguments: --chip-type <NAND | RAM> --chip-id <integer> --output <filename>
Description: Attempts to dump data from the phone corresponding to the
specified chip type and chip ID.
NOTE: Galaxy S phones don't appear to properly support this functionality.

Action: print-pit
Description: Dumps the PIT file from the connected device and prints it in
a human readable format.

Action: version
Description: Displays the version number of this binary.

Action: help
Description: Displays this dialogue.

---------------------------------------------------------------

You can reach the actions/arguments in Terminal by simply typing:
Code:
heimdall

Here is an example of using this:
You want to install CWM recovery: How to ROOT Galaxy Note 10.1.

1) You are going to download the zip named RootGalaxyNote10.1 from his website.

2) After you downloaded it, unzip it.

3) In the folder, there will a file called "HighOnAndroidCWMRecoveryGTN8000.tar", untar it.

4) After it finishes, it will give you a file named "recovery.img".

5) Restart your device in download mode and plug it in your computer.

6) In Terminal, type
Code:
heidall detect
If all goes well, the Terminal will return “Device detected”.

7) Then type
Code:
heimdall flash --recovery <path to the recovery.img>
Here is an example
Code:
heimdall flash --recovery /Users/rag/Desktop/recovery.img

8) After it finishes, your recovery should be the CWM recovery. Follow the rest of his tutorial for installing root.

Note: If this does NOT work AND you have Samsung Kies installed, type these three lines into Terminal:
Code:
sudo kextunload -b com.devguru.driver.SamsungComposite

sudo kextunload -b com.devguru.driver.SamsungACMData

sudo kextunload -b com.devguru.driver.SamsungACMControl
The kexts interfere with Heimdall, it explains why at: Scott Wallace's blog

Side Note: There is also Heimdall for Linux and Windows.

Hope this helps someone. If it does, press the thumbs up :).

Disclaimer: I nor the XDA-Developers are responsible for the bricking/ruining of your device/computer. By following this tutorial, you are taking full responsibility for your device/computer.
 
Last edited:

asdfuogh

Senior Member
Jun 22, 2011
573
66
I think Heimdall also exists for Linux, but I couldn't work it out very well (I was frustrated, sleepy, and needed my phone as an alarm for class the next day, so I couldn't read into the instructions well at that time :p). Thanks for doing this (although now I just use mobile odin or swap to my windows partition for odin).
 

kcrudup

Senior Member
Mar 27, 2007
1,517
749
San Francisco Bay Area
Is there any way to stop heimdall from rebooting the device after install of recovery?
Code:
Usage: heimdall <action> <action arguments>
...
Action: flash
Arguments:
...
    [--factoryfs <filename>] [--cache <filename>] [--dbdata <filename>]
    [--primary-boot <filename>] [--secondary-boot <filename>]
    [--secondary-boot-backup <filename>] [--param <filename>]
    [--kernel <filename>] [--recovery <filename>] [--efs <filename>]
    [--modem <filename>] [--radio <filename>] [--normal-boot <filename>]
    [--system <filename>] [--user-data <filename>] [--fota <filename>]
    [--hidden <filename>] [--movinand <filename>] [--data <filename>]
    [--ums <filename>] [--emmc <filename>] [--pit <filename>]
    [--<partition identifier> <filename>]
    [--<partition name> <filename>]
    [--verbose] [b][color=red][--no-reboot][/color][/b] [--stdout-errors] [--delay <ms>]
 
  • Like
Reactions: NM

beeznhoney

Senior Member
May 24, 2013
55
7
How would install stock firmware on my rooted Samsung device using this method?
Sent from my SGH-I337 using xda premium
 

DeezNotes

Senior Member
Apr 14, 2010
1,015
232
Baltimore
Just wanted to send a thanks! I've been trying to use Heimdall for a LONG time with no success. Finally got it to work on my S4.

The only issue I ran into was when attempting to flash a new recovery using the "--recovery" flag, I got an error that the "recovery" partition didn't exist in my PIT. I went back into Download mode, ran "heimdall --print-pit" and found that the recovery partition was in all caps. setting the flag to "--RECOVERY" worked like a charm.

:good:
 
  • Like
Reactions: NM and f.us

JT1022

New member
Aug 25, 2013
1
0
Just a quick couple questions

Just wanted to send a thanks! I've been trying to use Heimdall for a LONG time with no success. Finally got it to work on my S4.

The only issue I ran into was when attempting to flash a new recovery using the "--recovery" flag, I got an error that the "recovery" partition didn't exist in my PIT. I went back into Download mode, ran "heimdall --print-pit" and found that the recovery partition was in all caps. setting the flag to "--RECOVERY" worked like a charm.

:good:

What CWM recovery zip did you use for your S4? Also, did you use this exact method RandomAwesomeGuy explains here? If not, could you possibly help me out with a some instructions?

Thanks!
 

jok3n

New member
Aug 17, 2010
3
1
Great guide

It was really helpful for me (for my sgs3).
Great job and thanx for the tuto
 
  • Like
Reactions: NM

sarmenhb

New member
Sep 9, 2013
3
0
this didnt work for me i got this:

Checking if protocol is initialised...
Protocol is not initialised.
Initialising protocol...
ERROR: Failed to initialise protocol!
devbox:~ developer$


I have a Samsung Galaxy Express -i437
 

jonneymendoza

Senior Member
Mar 10, 2008
561
16
london
Hi. the follow command diddnt work on my mac

heimdall flash --recovery /Users/rag/Desktop/recovery.img

output:

heimdall flash --recovery openrecovery-twrp-2.6.3.0-jgedlte.img
Heimdall v1.3.1, 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/

Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...

Checking if protocol is initialised...
Protocol is not initialised.
Initialising protocol...
ERROR: Failed to initialise protocol!
 
  • Like
Reactions: dukedusty

gameriot

Member
May 23, 2013
44
5
Fremont
Stuck at 100%

It all works up to the point where it's uploading recovery. Then at 100% it freezes, and doesn't go any further. Help please?
 

Official_Noob

Senior Member
Oct 25, 2013
61
20
Sin City, Las Vegas, NV
Hey, Random...
In Step 6 did you mean to type "heimdall" instead of heidall?
Max makes the same typo in his instructions below the you tube vid.
If people are copying and pasting instructions, that could conceivably put them up against a brick wall.



I decided to write a tutorial using the Heimdall command line version for mac because some of you, like me, might not have access to a Windows machine 24/7. Note to reader: This tutorial is based on the command line version of Heimdall because not only the Heimdall-frontend app(the GUI version) is straight forward, but in my opinion lacks features. Read entire post.

First off you are going to download Heimdall. Here is the link. After it downloads, install it and restart when you are notified.

Now for the fun part. After it installs, you will have to open Terminal to use Heimdall since we are doing the command line version. Terminal is located under
Code:
Applications/Utilities/

After Terminal loads, the command for using Heimdall is straight forward, here it is:
Code:
heimdall <action> <action arguments> <common arguments>

Here are the Actions/Arguments:

Common Arguments:
[--verbose] [--no-reboot] [--stdout-errors] [--delay <ms>]


Action: flash
Arguments:
--repartition --pit <filename> [--factoryfs <filename>]
[--cache <filename>] [--dbdata <filename>] [--primary-boot <filename>]
[--secondary-boot <filename>] [--param <filename>] [--kernel <filename>]
[--modem <filename>] [--normal-boot <filename>] [--system <filename>]
[--user-data <filename>] [--fota <filename>] [--hidden <filename>]
[--movinand <filename>] [--data <filename>] [--ums <filename>]
[--emmc <filename>] [--<partition identifier> <filename>]
or:
[--factoryfs <filename>] [--cache <filename>] [--dbdata <filename>]
[--primary-boot <filename>] [--secondary-boot <filename>]
[--secondary-boot-backup <filename>] [--param <filename>]
[--kernel <filename>] [--recovery <filename>] [--efs <filename>]
[--modem <filename>] [--normal-boot <filename>] [--system <filename>]
[--user-data <filename>] [--fota <filename>] [--hidden <filename>]
[--movinand <filename>] [--data <filename>] [--ums <filename>]
[--emmc <filename>] [--<partition identifier> <filename>]
Description: Flashes firmware files to your phone.
WARNING: If you're repartitioning it's strongly recommended you specify
all files at your disposal, including bootloaders.

Action: close-pc-screen
Description: Attempts to get rid off the "connect phone to PC" screen.

Action: download-pit
Arguments: --output <filename>
Description: Downloads the connected device's PIT file to the specified
output file.

Action: detect
Description: Indicates whether or not a download mode device can be detected.

Action: dump
Arguments: --chip-type <NAND | RAM> --chip-id <integer> --output <filename>
Description: Attempts to dump data from the phone corresponding to the
specified chip type and chip ID.
NOTE: Galaxy S phones don't appear to properly support this functionality.

Action: print-pit
Description: Dumps the PIT file from the connected device and prints it in
a human readable format.

Action: version
Description: Displays the version number of this binary.

Action: help
Description: Displays this dialogue.

---------------------------------------------------------------

You can reach the actions/arguments in Terminal by simply typing:
Code:
heimdall

Here is an example of using this:
You want to install CWM recovery: How to ROOT Galaxy Note 10.1.

1) You are going to download the zip named RootGalaxyNote10.1 from his website.

2) After you downloaded it, unzip it.

3) In the folder, there will a file called "HighOnAndroidCWMRecoveryGTN8000.tar", untar it.

4) After it finishes, it will give you a file named "recovery.img".

5) Restart your device in download mode and plug it in your computer.

6) In Terminal, type
Code:
heidall detect
If all goes well, the Terminal will return “Device detected”.

7) Then type
Code:
heimdall flash --recovery <path to the recovery.img>
Here is an example
Code:
heimdall flash --recovery /Users/rag/Desktop/recovery.img

8) After it finishes, your recovery should be the CWM recovery. Follow the rest of his tutorial for installing root.

Note: If this does NOT work AND you have Samsung Kies installed, type these three lines into Terminal:
Code:
sudo kextunload -b com.devguru.driver.SamsungComposite

sudo kextunload -b com.devguru.driver.SamsungACMData

sudo kextunload -b com.devguru.driver.SamsungACMControl
The kexts interfere with Heimdall, it explains why at: Scott Wallace's blog

Side Note: There is also Heimdall for Linux and Windows.

Hope this helps someone. If it does, press the thumbs up :).

Disclaimer: I nor the XDA-Developers are responsible for the bricking/ruining of your device/computer. By following this tutorial, you are taking full responsibility for your device/computer.
 
Dec 27, 2012
32
28
Hey, Random...
In Step 6 did you mean to type "heimdall" instead of heidall?
Max makes the same typo in his instructions below the you tube vid.
If people are copying and pasting instructions, that could conceivably put them up against a brick wall.

Thank you so much Official_Noob. This tutorial is ORIGINAL CONTENT. I cannot believe that people are taking and using my tutorial without asking or giving me credit. I will look into this. Thank you again for bringing this to my attention.
 

dale_cooper

Senior Member
Apr 5, 2010
191
42
I cannot get heimdall to work whatsoever.....

It detects my note 10.1 2014 no problem, but anytime i try a heimdall command, either int he GUI or from terminal, I get the following

Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...

Initialising protocol...
ERROR: Failed to send data!Releasing device interface...


I've tried to type sudo before the command, NOTHING is working. I've searched all over and don't see anyone with this problem???? I'm on osx 10.9.1, I'm running the latest version of heimdall, and I manually installed libusbx.
 

Official_Noob

Senior Member
Oct 25, 2013
61
20
Sin City, Las Vegas, NV
Thank you so much Official_Noob. This tutorial is ORIGINAL CONTENT. I cannot believe that people are taking and using my tutorial without asking or giving me credit. I will look into this. Thank you again for bringing this to my attention.

^^^
Yeah... people should give credit where credit is due.
I haven't been on any of his sites since I made the post to you here... just because of that. That kind of lowered my opinion and expectations from him.
I've really gone beyond the scope of his basic "tutorials" anyway... particularly since whenever I want a question answered and do a goog search, I always look for news first from the XDA site.
Not to say that I'm becoming a "pro" by any stretch of the imagination... some of what I read on this site boggles my mind as to how a few people on here know so much about... well, everything. LOL.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 17
    I decided to write a tutorial using the Heimdall command line version for mac because some of you, like me, might not have access to a Windows machine 24/7. Note to reader: This tutorial is based on the command line version of Heimdall because not only the Heimdall-frontend app(the GUI version) is straight forward, but in my opinion lacks features. Read entire post.

    First off you are going to download Heimdall. Here is the link. After it downloads, install it and restart when you are notified.

    Now for the fun part. After it installs, you will have to open Terminal to use Heimdall since we are doing the command line version. Terminal is located under
    Code:
    Applications/Utilities/

    After Terminal loads, the command for using Heimdall is straight forward, here it is:
    Code:
    heimdall <action> <action arguments> <common arguments>

    Here are the Actions/Arguments:

    Common Arguments:
    [--verbose] [--no-reboot] [--stdout-errors] [--delay <ms>]


    Action: flash
    Arguments:
    --repartition --pit <filename> [--factoryfs <filename>]
    [--cache <filename>] [--dbdata <filename>] [--primary-boot <filename>]
    [--secondary-boot <filename>] [--param <filename>] [--kernel <filename>]
    [--modem <filename>] [--normal-boot <filename>] [--system <filename>]
    [--user-data <filename>] [--fota <filename>] [--hidden <filename>]
    [--movinand <filename>] [--data <filename>] [--ums <filename>]
    [--emmc <filename>] [--<partition identifier> <filename>]
    or:
    [--factoryfs <filename>] [--cache <filename>] [--dbdata <filename>]
    [--primary-boot <filename>] [--secondary-boot <filename>]
    [--secondary-boot-backup <filename>] [--param <filename>]
    [--kernel <filename>] [--recovery <filename>] [--efs <filename>]
    [--modem <filename>] [--normal-boot <filename>] [--system <filename>]
    [--user-data <filename>] [--fota <filename>] [--hidden <filename>]
    [--movinand <filename>] [--data <filename>] [--ums <filename>]
    [--emmc <filename>] [--<partition identifier> <filename>]
    Description: Flashes firmware files to your phone.
    WARNING: If you're repartitioning it's strongly recommended you specify
    all files at your disposal, including bootloaders.

    Action: close-pc-screen
    Description: Attempts to get rid off the "connect phone to PC" screen.

    Action: download-pit
    Arguments: --output <filename>
    Description: Downloads the connected device's PIT file to the specified
    output file.

    Action: detect
    Description: Indicates whether or not a download mode device can be detected.

    Action: dump
    Arguments: --chip-type <NAND | RAM> --chip-id <integer> --output <filename>
    Description: Attempts to dump data from the phone corresponding to the
    specified chip type and chip ID.
    NOTE: Galaxy S phones don't appear to properly support this functionality.

    Action: print-pit
    Description: Dumps the PIT file from the connected device and prints it in
    a human readable format.

    Action: version
    Description: Displays the version number of this binary.

    Action: help
    Description: Displays this dialogue.

    ---------------------------------------------------------------

    You can reach the actions/arguments in Terminal by simply typing:
    Code:
    heimdall

    Here is an example of using this:
    You want to install CWM recovery: How to ROOT Galaxy Note 10.1.

    1) You are going to download the zip named RootGalaxyNote10.1 from his website.

    2) After you downloaded it, unzip it.

    3) In the folder, there will a file called "HighOnAndroidCWMRecoveryGTN8000.tar", untar it.

    4) After it finishes, it will give you a file named "recovery.img".

    5) Restart your device in download mode and plug it in your computer.

    6) In Terminal, type
    Code:
    heidall detect
    If all goes well, the Terminal will return “Device detected”.

    7) Then type
    Code:
    heimdall flash --recovery <path to the recovery.img>
    Here is an example
    Code:
    heimdall flash --recovery /Users/rag/Desktop/recovery.img

    8) After it finishes, your recovery should be the CWM recovery. Follow the rest of his tutorial for installing root.

    Note: If this does NOT work AND you have Samsung Kies installed, type these three lines into Terminal:
    Code:
    sudo kextunload -b com.devguru.driver.SamsungComposite
    
    sudo kextunload -b com.devguru.driver.SamsungACMData
    
    sudo kextunload -b com.devguru.driver.SamsungACMControl
    The kexts interfere with Heimdall, it explains why at: Scott Wallace's blog

    Side Note: There is also Heimdall for Linux and Windows.

    Hope this helps someone. If it does, press the thumbs up :).

    Disclaimer: I nor the XDA-Developers are responsible for the bricking/ruining of your device/computer. By following this tutorial, you are taking full responsibility for your device/computer.
    2
    I think Heimdall also exists for Linux
    It exists, and works well. I'd compiled it from the Git sources, and Heimdall's all I've ever used to flash both of my GNotes. I don't do Windows unless absolutely necessary.
    2
    Just wanted to send a thanks! I've been trying to use Heimdall for a LONG time with no success. Finally got it to work on my S4.

    The only issue I ran into was when attempting to flash a new recovery using the "--recovery" flag, I got an error that the "recovery" partition didn't exist in my PIT. I went back into Download mode, ran "heimdall --print-pit" and found that the recovery partition was in all caps. setting the flag to "--RECOVERY" worked like a charm.

    :good:
    1
    Is there any way to stop heimdall from rebooting the device after install of recovery?
    Code:
    Usage: heimdall <action> <action arguments>
    ...
    Action: flash
    Arguments:
    ...
        [--factoryfs <filename>] [--cache <filename>] [--dbdata <filename>]
        [--primary-boot <filename>] [--secondary-boot <filename>]
        [--secondary-boot-backup <filename>] [--param <filename>]
        [--kernel <filename>] [--recovery <filename>] [--efs <filename>]
        [--modem <filename>] [--radio <filename>] [--normal-boot <filename>]
        [--system <filename>] [--user-data <filename>] [--fota <filename>]
        [--hidden <filename>] [--movinand <filename>] [--data <filename>]
        [--ums <filename>] [--emmc <filename>] [--pit <filename>]
        [--<partition identifier> <filename>]
        [--<partition name> <filename>]
        [--verbose] [b][color=red][--no-reboot][/color][/b] [--stdout-errors] [--delay <ms>]
    1
    Great guide

    It was really helpful for me (for my sgs3).
    Great job and thanx for the tuto