Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,736,513 Members 51,683 Now Online
XDA Developers Android and Mobile Development Forum

[Tutorial] Heimdall for Mac (Like Odin)

Tip us?
 
RandomAwesomeGuy
Old
(Last edited by RandomAwesomeGuy; 26th January 2013 at 07:56 AM.)
#1  
Member - OP
Thanks Meter 21
Posts: 32
Join Date: Dec 2012
Info 2 [Tutorial] Heimdall for Mac (Like Odin)

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.
The Following 11 Users Say Thank You to RandomAwesomeGuy For This Useful Post: [ Click to Expand ]
 
asdfuogh
Old
#2  
Senior Member
Thanks Meter 66
Posts: 573
Join Date: Jun 2011
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).
Current Devices: Samsung Galaxy SII (i777), Samsung Galaxy Note 10.1 (N8013)
Retired Devices: Asus Transformer (TF101)
 
kcrudup
Old
#3  
Senior Member
Thanks Meter 709
Posts: 1,452
Join Date: Mar 2007
Location: San Francisco Bay Area
Quote:
Originally Posted by asdfuogh View Post
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.
Samsung Galaxy Note 10.1 3G (GT-N8000) on AT&T
Samsung Galaxy Note 10.1 2014 LTE (SM-P607T) on AT&T (and T-Mo/VZW)
HTC First on Net10/AT&T
(Save your "Thanks"; couldn't care less)
 
nothing0
Old
#4  
Junior Member
Thanks Meter 0
Posts: 23
Join Date: Apr 2010
Is there any way to stop heimdall from rebooting the device after install of recovery?
 
kcrudup
Old
#5  
Senior Member
Thanks Meter 709
Posts: 1,452
Join Date: Mar 2007
Location: San Francisco Bay Area
Quote:
Originally Posted by nothing0 View Post
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] [--no-reboot] [--stdout-errors] [--delay <ms>]
Samsung Galaxy Note 10.1 3G (GT-N8000) on AT&T
Samsung Galaxy Note 10.1 2014 LTE (SM-P607T) on AT&T (and T-Mo/VZW)
HTC First on Net10/AT&T
(Save your "Thanks"; couldn't care less)
 
beeznhoney
Old
#6  
beeznhoney's Avatar
Member
Thanks Meter 7
Posts: 54
Join Date: May 2013
How would install stock firmware on my rooted Samsung device using this method?
Sent from my SGH-I337 using xda premium
 
xxxTy3uKxxx
Old
#7  
xxxTy3uKxxx's Avatar
Member
Thanks Meter 55
Posts: 45
Join Date: Feb 2013
Location: Rostov-on-Don
Thanks, long searched for stuff like this.
 
Kgirl
Old
#8  
Kgirl's Avatar
Senior Member
Thanks Meter 143
Posts: 140
Join Date: Aug 2010
Quote:
Originally Posted by xxxTy3uKxxx View Post
Thanks, long searched for stuff like this.

How did this work out for you?
Soon to be Infamous S4


 
DeezNotes
Old
#9  
Senior Member
Thanks Meter 175
Posts: 912
Join Date: Apr 2010
Location: 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.

 
JT1022
Old
#10  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Aug 2013
Default Just a quick couple questions

Quote:
Originally Posted by DeezNotes View Post
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.

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!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes