[Guide/How-To] Install, Use Heimdall, and flash back to stock

Search This thread

echelonMCRhartgrenade

Senior Member
Feb 21, 2011
188
29
Lanai City
I AM NOT RESPONSIBLE FOR ANY DAMAGES!!! ;)

Please please read this guide carefully (from beginning to end), and over and over again before you first start!! This guide is for advanced users!! If you are a newbie then I will try to "tone" it down a bit :). But it is your Kuleana for making sure that you understand and do everything correctly! The installation part is only going to be for Windows as I am running Windows.

Helpful Threads to check out before starting:
http://xdaforums.com/showthread.php?t=1049294

http://xdaforums.com/showthread.php?t=878686

Original Thread: http://xdaforums.com/showthread.php?t=755265

------------------------------------------------
Heimdall can run on:
Microsoft Windows (XP and up)
Mac OS X
Linux (Debian)
32 bit and 64 bit
------------------------------------------------
Prerequisites:
Microsoft Visual 2010 C++ Redistributable (Note! Only for Windows users.)
32 bit - http://www.microsoft.com/downloads/en/details.aspx?familyid=A7B7A05E-6DE6-4D3A-A423-37BF0912DB84
64 bit - http://www.microsoft.com/downloads/en/details.aspx?FamilyID=BD512D9E-43C8-4655-81BF-9350143D5867

WinRAR (or your preferred extracting software. Note must be able to unpack .tar files.) - http://www.win-rar.com/


Downloading and Installing Heimdall (http://www.glassechidna.com.au/products/heimdall/)
Step 1
Download the appropriate Heimdall for your system, please make sure you only download Heimdall Frontend or Suite (Windows, Mac only) as will we only be working with that.

WINDOWS INSTALLATION FROM THIS POINT ON!

Step 2 (refer to Capture1 Photo)
Unzip the .zip file. Now navigate to the location/folder. Make sure you remember where the location is because this is where you’re going to be running Heimdall.

Step 3 (Installing the drivers)
Open up the “Drivers” folder and there should be a program called “zadig”. What this program will do is that it will replace the Samsung USB Composite Device driver (Download mode driver) with a generic driver called WinUSB (libusb 1.0).
Note: This will only replace the driver on one usb port (Port-by-Port basics)! For example if I have three usb ports, the one usb port that you are replacing the driver will only work with heimdall(download mode only) and the other two will continue work with OdinOneClick/Odin3 only.

(Refer to Capture2 Photo)
1. Reboot your phone into download mode

2. Run zadig as administrator, then connect your phone

3. On the menu bar (Device,Options,Help) Click Options --> List All Devices

4. Under USB Device select “Samsung USB Composite Device”

5. Okie Dokie you can now click Install Driver
Note: If you get a popup about not being able to verify the publisher, just click install anyways. The drive installation may take a while.

6. Once zadig finishes installing you can close it and disconnect your phone. Just do a battery pull, and restart normally
If my driver installation instructions are confusing or hard to understand lol just read the “readme” file.


WINDOWS INSTALLATION DONE! :)


Preparing a ROM for use with Heimdall (For an example I will be using JF6 stock)

Step 1 - Downloading the rom and extracting the rom if it is in a compressed form (.rar file, etc).
Go to http://www.samfirmware.com/WEBPROTECT-i897.htm . Please register (its free!! :) ) or login. Under Firmware, download “I897UCJF6” (or whichever version you want). Using WinRar (or your preferred software) extract the .rar file. When it asks for a password, it’s underneath the last file, “I897UCJH7” on the website (in dark black color! Highlight it so you can see it :) ).
Note: OdinOneClick brings the Captivate back to Stock JF6

Step 2 – Extracting the .tar/.md5 file
After extracting the .rar file, it will provide you with a .tar file. Now normally for Odin3 users all we would do is pop that straight into the PDA section and hit start. But that’s not what we’re going to do today lol. Now using WinRar (or again your preferred extracter) extract the UCJF6 .tar file

Step 3 – Just a FYI step ;) (refer to Capture4 Photo)
After extracting the .tar, it will now provide you with multiple files. Now most of these files should look familiar or sound familiar, if not than omg you should not be playing around with these files! Okie Dokie we are now done for this section :rolleyes:
Note: Notice that there is no boot.bin (Primary Bootloader), or sbl.bin (Secondary Bootloader). If you need 2.1/2.2 bootloaders because you flashed Gingerbread bootloaders, I will post them at the end :).


Using Heimdall(I will be flashing stock JF6 as an example)

If you downloaded the Suites package there is two heimdall’s. One is the frontend which uses a user interface, and the other is command line based. I prefer to use frontend because that includes a GUI (user interface) to work with. If you know how to use command line then feel fine to use that instead, but note again that this guide is only for frontend.

Step 1
Run/Execute “heimdall-frontend”

Step 2
When Heimdall opens there will be different slots to put files. Now use your common sense ;) and browse for the files that you extracted out of the .tar files.
Example:
Under FactoryFS click browse and find the FactoryFS.rfs file that you extracted out of the .tar file from the section before. Now finish up the rest ;)! When you’re finish double check that the correct files are in the correct place!! Make sure that you do not checkmark repartition device!
Note: Please be ultra-careful when flashing with bootloaders!! Do not flash only one bootloader, always flash two at a time!!

Step 3 (refer to Capture3 Photo)
Check again that all the necessary files are in the right place and necessary checkboxes are checked. When you’re finish reboot your phone into download mode and connect it to the usb port that you reinstalled the drivers to (Windows and Mac only). Wait for about 5 secs. (to let your OS know you plugged in something) then click Start. Wait for Heimdall to complete uploading everything and yay!! You should get a “flash completed successfully”! Then your phone will now restart.
Note: If you need to do a Master Clear wait for the phone to completely boot up and then type in the phone dialer *2767*3855#. The internal SD card will completely be reformatted (Please remove your external SD card if you have one).

And there we have it! A phone flashed back to stock using Heimdall. You can use this guide if you wanna flash a different rom after :).Make sure you read all of the threads in the first section(especially Mac users!!!) before starting. Again always be carefully with flashing with bootloaders!! Another thing to be careful with is the repartition device checkbox:
The reason is that when you repartition several partitions are being wiped, including the primary and secondary bootloaders. I don't know if the device is smart enough to back-up the bootloaders prior to the wipe and restore them afterwards. However I'm not particularly keen to find out either. If the device doesn't back-up and restore the bootloaders when you repartition then your device will be unable to boot at all i.e. hard bricked.
(From original thread.Post#764 Page#77)

Now after reading that please make sure that when you repartition, to include both bootloaders when you flash!! (unless someone can confirm that our Captivate does backup the bootloaders)
Please send me a PM if anything is incorrect, and I will be glad to change anything :)! If you have any questions, post below or in the original thread! Consider donating to Benjamin Dobell (http://xdaforums.com/donatetome.php?u=2710388) who is a genius and creator of Heimdall! If this guide was helpful please hit my thanks button :D.

Please note that this is only a guide, and I do not take credit for any programs or threads listed above ;)
 

Attachments

  • Capture1.JPG
    Capture1.JPG
    23.7 KB · Views: 12,698
  • Capture2.JPG
    Capture2.JPG
    28.1 KB · Views: 12,104
  • Capture3.jpg
    Capture3.jpg
    64.1 KB · Views: 14,122
  • Capture4.JPG
    Capture4.JPG
    22.7 KB · Views: 17,398

Rhiannon224

Senior Member
Aug 11, 2010
1,840
363
FL
Shouldn't this be stickied in the development section or stickied here in general.

Sent from Gingerbread on a Captivate using XDA Premium App
 

Dlev7

Senior Member
Nov 14, 2010
1,544
661
Perfect timing I have always used Odin on my desktop PC, but now that I have a macbook I figured out how to get Heimdall running on my Mac.

My problem though is after I flash everything works but it goes like this:

1. AT&T Screen
2. 3G Jet across
3. Galaxy "S"
4. Black screen.

Happens everytime and then I have to use Odin to flash back to stock when Heimdall gives me the black screen.

Any idea why.

*Note everytime this happened I tried coming back to stock ROM the same exact method I use on Odin from CM7 then I tried with a JVO ROM. Both gave me the same result.
 

axis01

Senior Member
Oct 5, 2007
531
50
I did this a couple weeks ago with Andro3. I ran into one small problem which I finally figured out. When I ran Zadig, I had no listing for "samsung usb device". I had a device listed as "USB Gadget". Turns out, this was my Captivate. Just thought i'd share that incase any of you run across it. Once I got the proper driver in, everything went fine. Had one small hiccup when I hit start, but hit it a second time and it went through fine. I'm running W7 64bit.
 

Superalpaca

Senior Member
Jan 13, 2011
69
4
San Luis Obispo
Huh, so I gave this a go tonight. It kept having issues with being unable to flash the factoryfs.rfs file, but then after 4 tries it worked just fine, happily flashing to stock JF6 with no kinks or anything. All pre-requisites were met, drivers were loaded properly, nothing was out of place, computer is clean, etc.

Is the program itself somewhat unstable, or could it have just been a funky download?
 

tbrass

Member
Aug 6, 2010
10
1
No apparent changes between 1&4, but in the last attempt it worked?

Weird. You might try the command line instead of the gui ( shouldn't make a difference, but what you described shouldn't happen). I use Heimdall cli with Linux extensively and. never had a hiccup. Not even when my port had a short.
 

TCalt7

New member
Jul 21, 2010
1
0
mac bull****

Oh god why did i switch to mac.....all of this crap for no valid reason!
 

vladvlad12

Senior Member
May 27, 2020
185
35
28
Bucharest
Samsung Galaxy S7
OnePlus 7 Pro
On windows 10 I keep getting error " The application was unable to start corectly" when trying to run heimdall. Installed all microsoft c++ 2010,2012,2015,2017,2019 still same problem. Net framework version 4+ installed. What is the problem here?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    I AM NOT RESPONSIBLE FOR ANY DAMAGES!!! ;)

    Please please read this guide carefully (from beginning to end), and over and over again before you first start!! This guide is for advanced users!! If you are a newbie then I will try to "tone" it down a bit :). But it is your Kuleana for making sure that you understand and do everything correctly! The installation part is only going to be for Windows as I am running Windows.

    Helpful Threads to check out before starting:
    http://xdaforums.com/showthread.php?t=1049294

    http://xdaforums.com/showthread.php?t=878686

    Original Thread: http://xdaforums.com/showthread.php?t=755265

    ------------------------------------------------
    Heimdall can run on:
    Microsoft Windows (XP and up)
    Mac OS X
    Linux (Debian)
    32 bit and 64 bit
    ------------------------------------------------
    Prerequisites:
    Microsoft Visual 2010 C++ Redistributable (Note! Only for Windows users.)
    32 bit - http://www.microsoft.com/downloads/en/details.aspx?familyid=A7B7A05E-6DE6-4D3A-A423-37BF0912DB84
    64 bit - http://www.microsoft.com/downloads/en/details.aspx?FamilyID=BD512D9E-43C8-4655-81BF-9350143D5867

    WinRAR (or your preferred extracting software. Note must be able to unpack .tar files.) - http://www.win-rar.com/


    Downloading and Installing Heimdall (http://www.glassechidna.com.au/products/heimdall/)
    Step 1
    Download the appropriate Heimdall for your system, please make sure you only download Heimdall Frontend or Suite (Windows, Mac only) as will we only be working with that.

    WINDOWS INSTALLATION FROM THIS POINT ON!

    Step 2 (refer to Capture1 Photo)
    Unzip the .zip file. Now navigate to the location/folder. Make sure you remember where the location is because this is where you’re going to be running Heimdall.

    Step 3 (Installing the drivers)
    Open up the “Drivers” folder and there should be a program called “zadig”. What this program will do is that it will replace the Samsung USB Composite Device driver (Download mode driver) with a generic driver called WinUSB (libusb 1.0).
    Note: This will only replace the driver on one usb port (Port-by-Port basics)! For example if I have three usb ports, the one usb port that you are replacing the driver will only work with heimdall(download mode only) and the other two will continue work with OdinOneClick/Odin3 only.

    (Refer to Capture2 Photo)
    1. Reboot your phone into download mode

    2. Run zadig as administrator, then connect your phone

    3. On the menu bar (Device,Options,Help) Click Options --> List All Devices

    4. Under USB Device select “Samsung USB Composite Device”

    5. Okie Dokie you can now click Install Driver
    Note: If you get a popup about not being able to verify the publisher, just click install anyways. The drive installation may take a while.

    6. Once zadig finishes installing you can close it and disconnect your phone. Just do a battery pull, and restart normally
    If my driver installation instructions are confusing or hard to understand lol just read the “readme” file.


    WINDOWS INSTALLATION DONE! :)


    Preparing a ROM for use with Heimdall (For an example I will be using JF6 stock)

    Step 1 - Downloading the rom and extracting the rom if it is in a compressed form (.rar file, etc).
    Go to http://www.samfirmware.com/WEBPROTECT-i897.htm . Please register (its free!! :) ) or login. Under Firmware, download “I897UCJF6” (or whichever version you want). Using WinRar (or your preferred software) extract the .rar file. When it asks for a password, it’s underneath the last file, “I897UCJH7” on the website (in dark black color! Highlight it so you can see it :) ).
    Note: OdinOneClick brings the Captivate back to Stock JF6

    Step 2 – Extracting the .tar/.md5 file
    After extracting the .rar file, it will provide you with a .tar file. Now normally for Odin3 users all we would do is pop that straight into the PDA section and hit start. But that’s not what we’re going to do today lol. Now using WinRar (or again your preferred extracter) extract the UCJF6 .tar file

    Step 3 – Just a FYI step ;) (refer to Capture4 Photo)
    After extracting the .tar, it will now provide you with multiple files. Now most of these files should look familiar or sound familiar, if not than omg you should not be playing around with these files! Okie Dokie we are now done for this section :rolleyes:
    Note: Notice that there is no boot.bin (Primary Bootloader), or sbl.bin (Secondary Bootloader). If you need 2.1/2.2 bootloaders because you flashed Gingerbread bootloaders, I will post them at the end :).


    Using Heimdall(I will be flashing stock JF6 as an example)

    If you downloaded the Suites package there is two heimdall’s. One is the frontend which uses a user interface, and the other is command line based. I prefer to use frontend because that includes a GUI (user interface) to work with. If you know how to use command line then feel fine to use that instead, but note again that this guide is only for frontend.

    Step 1
    Run/Execute “heimdall-frontend”

    Step 2
    When Heimdall opens there will be different slots to put files. Now use your common sense ;) and browse for the files that you extracted out of the .tar files.
    Example:
    Under FactoryFS click browse and find the FactoryFS.rfs file that you extracted out of the .tar file from the section before. Now finish up the rest ;)! When you’re finish double check that the correct files are in the correct place!! Make sure that you do not checkmark repartition device!
    Note: Please be ultra-careful when flashing with bootloaders!! Do not flash only one bootloader, always flash two at a time!!

    Step 3 (refer to Capture3 Photo)
    Check again that all the necessary files are in the right place and necessary checkboxes are checked. When you’re finish reboot your phone into download mode and connect it to the usb port that you reinstalled the drivers to (Windows and Mac only). Wait for about 5 secs. (to let your OS know you plugged in something) then click Start. Wait for Heimdall to complete uploading everything and yay!! You should get a “flash completed successfully”! Then your phone will now restart.
    Note: If you need to do a Master Clear wait for the phone to completely boot up and then type in the phone dialer *2767*3855#. The internal SD card will completely be reformatted (Please remove your external SD card if you have one).

    And there we have it! A phone flashed back to stock using Heimdall. You can use this guide if you wanna flash a different rom after :).Make sure you read all of the threads in the first section(especially Mac users!!!) before starting. Again always be carefully with flashing with bootloaders!! Another thing to be careful with is the repartition device checkbox:
    The reason is that when you repartition several partitions are being wiped, including the primary and secondary bootloaders. I don't know if the device is smart enough to back-up the bootloaders prior to the wipe and restore them afterwards. However I'm not particularly keen to find out either. If the device doesn't back-up and restore the bootloaders when you repartition then your device will be unable to boot at all i.e. hard bricked.
    (From original thread.Post#764 Page#77)

    Now after reading that please make sure that when you repartition, to include both bootloaders when you flash!! (unless someone can confirm that our Captivate does backup the bootloaders)
    Please send me a PM if anything is incorrect, and I will be glad to change anything :)! If you have any questions, post below or in the original thread! Consider donating to Benjamin Dobell (http://xdaforums.com/donatetome.php?u=2710388) who is a genius and creator of Heimdall! If this guide was helpful please hit my thanks button :D.

    Please note that this is only a guide, and I do not take credit for any programs or threads listed above ;)