[HOWTO] Unbrick your i9000 / Galaxy S
I've gotten into the habit of running all kinds of ROMs and sometimes they just blow up. Usually a reboot suffices but the last crash caused my phone to only bootloop and I couldn't get into recovery anymore, thankfully download mode still worked. This will focus on how to get your phone back to life, provided you can access download mode.
Steps this guide will walk you through:
Step 0: Backup
- Calm down a bit
- Get everything you need to fix your phone
- Do the magic
- Boot your phone
I can't stress this enough. Once you've really bricked your phone there's a chance you might not be able to access the data that's on there anymore. So, if there's stuff on your phone you care about, just backup it from time to time.
Step 1: Calm down
There's a myriad of exercises you can do to calm down, meditate, go for a walk/swim/jog, go to the gym, whatever works for you. Just chill out for a second because being in a completely panicked state is not going to help you to recover your phone.
Step 2: Get the tools in place
We need a few tools to fix your phone:
- Heimdall version 1.3.1. DO NOT download 1.3.2 it has issues with uploading large files
- Heimdall package of 2.3.6/XWJVZ: http://www.mediafire.com/?3v35chw9a8a2wmw
- CFRoot for 2.3.6/XWJVZ: http://download.chainfire.eu/130/CF-....3-CWM3RFS.zip
Once you've downloaded everything:
- Install Heimdall (run the installer)
- On Windows the link I provided also includes the GUI
- For Mac and Linux the link I provided only includes the command line binary, we don't want to use the GUI for this
- Extract the Heimdall package of 2.3.6.tar.gz to a directory, you should end up with the following files:
- firmware.xml << delete it, we're not going to need it
- s1_odin_20100512.pit << delete it, we're not going to need it
- zImage << delete it, we're not going to need it
- Extract the CF-Root-XX_OXA_JVZ-v4.3-CWM3RFS.zip, this contains only one file: zImage, put it next to Sbl.bin
- If the Heimdall installer asked you to reboot your machine but you didn't, do it now. That will make sure the drivers are loaded.
What we've done right now is set up your machine so that it's ready to flash your i9000 back to a Samsung release of Gingerbread. The astute reader might notice I'm telling you to delete the zImage (kernel) from the Heimdall package. This is true but we're replacing it with the one from CFRoot so you can flash a rooted stock instead of first flashing stock and then flashing CFRoot on top. Some people advice against this approach but it has never caused me issues.
Step 3: Do the magic
Now we're actually going to flash your phone. We're going to do this from the command line because the Heimdall GUI is a bit twitchy when it comes to flashing without a PIT-file. The command line has no such issue and will just download the PIT from your device and use that.
Mac / Linux
- Find out where Heimdall was installed (probaly %PROGRAMFILES%\Heimdall)
- Copy all the files (zImage, Sbl.bin and so forth) into the directory where the heimdall executable is located
- Go to the location of cmd.exe, right-click on it and select: Run as Administrator
- Now cd to the directory Heimdall was installed
- Issue a dir on the commandline to verify all the files (heimdall.exe and the rest) are there
Heimdall was probably installed into /usr/bin
so all you need to do is open a Terminal of your choice and see if running the heimdall
command results in heimdall output or a command not found
- Open a Terminal
- cd to the location of zImage, Sbl.bin and the other files from Step 2
Use the 3-button combo to put your phone into Download mode: Volume Down + Home + Power
and connect your phone over USB to your computer.
, issue the following command:
Mac / Linux
heimdall.exe flash --primary-boot boot.bin --cache cache.rfs --factoryfs factoryfs.rfs --dbdata dbdata.rfs --modem modem.bin --param param.lfs --secondary-boot Sbl.bin --kernel zImage
, issue the following command:
sudo heimdall flash --primary-boot boot.bin --cache cache.rfs --factoryfs factoryfs.rfs --dbdata dbdata.rfs --modem modem.bin --param param.lfs --secondary-boot Sbl.bin --kernel zImage
If all went well you should get output similar to this:
Heimdall v1.3.1, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
This software is provided free of charge. Copying and redistribution is
If you appreciate this software and you would like to support future
development please consider donating:
Setting up interface...
Checking if protocol is initialised...
Protocol is not initialised.
Handshaking with Loke...
Session begun with device of type: 0
Downloading device's PIT file...
PIT file download sucessful
KERNEL upload successful
MODEM upload successful
FACTORYFS upload successful
DBDATAFS upload successful
CACHE upload successful
IBL+PBL upload successful
SBL upload successful
PARAM upload successful
Your device will now reboot. If it doesn't and stays at a black screen, just pull the battery, put it back in and turn it on.
Step 4: Boot your device
Just let the phone boot but don't unlock your SIM-card / use it
. Once it's is done booting for the first time just shut it down and now boot into Recovery Mode: Volume Up + Home + Power
From here you can go into the Mounts and Storage
section and then into the Mount USB
menu. Now your phone will make it's storage available over USB so you can recover files you've lost or upload a zip-file to flash a new ROM.
Step 5: Rejoice
Your phone is now back into a workable state with a fully functional Recovery so you can now start flashing your fancy ROMs again.
A few pieces of advice:
- Before you flash anything else: data/factory reset and wipe your cache
- Before you flash anything else: flash CM 9.1.0, twice. The first time will upgrade your Recovery to 6.x but will then bootloop so you need to flash it again.
- If you want to flash a JellyBean ROM, flash CM 9.1.0 first. If you don't and try to upgrade from Gingerbread (2.3.6) to JellyBean in one go you'll probably end up with an invalid IMEI (no idea why this happens, it just does)