The Definitive Noobs Guide to Flashing and/or Fixing the SGS4G! POST QUESTIONS HERE!
I am starting this thread to help cut down on the noob questions that are irritating our devs and potentially driving them away (less bhundven, who has already left xda).
I know that there is already a thread like this by mad_fitter, but his is outdated. I will start the guide in the second post.
I was a noob, as we all were at one time, and I did a lot of reading in order to get my phone rooted and flashing my first rom (Bionix Frost, back in the good ol' Froyo days ) and the more I read, the more I see the devs getting irritated with the noob questions and I know that if we lose our devs (especially raver) we are screwed as a phone community. I'm not trying to make the noobs feel bad, I remember being one and being so eager to get stuff done I would essentially demand things from devs, then i learned my lesson and started reading and reading and learning and learning and now I flash new roms all the time with no issues. Lesson: READ
And that's the reason I'm writing this, hopefully questions can be asked here (and ultimately, the guide will be good enough that no one will have to ask questions, and they can just read the guide).
I have made this guide inherently redundant. I have posted steps to certain things in two different sections as they are used in different situations and I don't want to force you guys to bounce back and forth between posts.
If you find that my guide is helpful, PLEASE click the "Thanks" button!
SGS4G -> Samsung Galaxy S 4G (by T-Mobile in the USA), if this is NOT your phone or the phone you intend to mess with, you are in the wrong forum.
CWM -> Clockwork Mod Recovery, this is the utility you will use to flash all of your roms, kernels and modems. DO NOT FLASH CWM THROUGH ROM MANAGER!!!! USE THE ONE-CLICK!!!
ROM (Read Only Memory) -> in the traditional sense, a ROM was unchangable (read-only) memory within your computer. One example is that some older computers used ROMs to store the OS on a chip. In order to change the OS, the chip(s) had to be physically replaced. ROMs, as they pertain to your phone, contain the necessary file systems, OS, and apps for your phone to function. Stock ROMs are those released by Samsung though you may find variations of those flashable through means other than Kies Mini (ODIN, CWM, Heimdall). Custom ROMs are the creation of a developer or developers that modifies the stock ROMs.
Stock ROM - A ROM released by Samsung for your phone. This is considered stock as it contains no post-release modifications. This is the ROM officially supported by Samsung on your phone. Official stock releases include the T959VUVKD1 (Android 2.2 Froyo) and T959VUVKJ6 (Android 2.3 Gingerbread) ROMs.
Kernel -> the kernel is the core of an OS. It is responsible for memory management, scheduling, managing other system resources, among other things. (thanks to stephen_w for this definition as well as the definitions for "ROM" and "Stock ROM")
Modem ([Mo]dulator [Dem]odulator) -> helps your phone interpret wireless signals sent from your cell network and wireless routers and also send data back to them (flashing different modems can help improve your cell reception) (thanks FB)
Bootloaders -> these are the files that allow your phone to boot into the system, recovery mode and download mode. These are the equivalent to the BIOS of a computer (once again, thanks FB)
Download Mode -> this is what you need to boot the phone in order to flash through ODIN or Heimdall
Recovery Mode -> this is what you need to boot the phone in order to flash things through CWM (there is a default Samsung recovery, however, you CANNOT flash roms, etc. through that recovery)
ODIN/Heimdall -> these are computer based flashing utilities. ODIN is a leaked Samsung program which ONLY works on Windows, where as Heimdall is an open-source utility developed by Glass Echidna that can be used on Windows, Mac OSX and Linux.
ext4 (EXTensible Filesystem, Version 4) -> ext4 is the filesystem that you will be running on the /system, /data and /cache partitions of your phone's OS IF you have converted to them through the Voodoo Lagfix menu of CWM (we will cover this later).
Bloat[ware] -> this is a set of applications that either the carrier (in our case T-Mobile) or the manufacturer (Samsung) ships the phone with pre-installed. Most of these apps can be removed with on issues, but be careful before trying to remove them.
Alright, the first step to getting your SGS4G going in the custom direction is rooting. There are three ways to go about this:
You can either use bhundven's One-Click with his custom kernel (Download SMS KJ6 (beta2d) Kernel Stock Rom with Bootloaders), located HERE, or, if you don't want to bother with CWM and JUST want a rooted stock rom to use apps such as Titanium Backup, then you can use the Fully Back-To-Stock UVKJ6 from the same thread as above and root using the method HERE (no, that method is not specifically for our phone, but bhundven stated HERE that it worked).
So that is Step One.
Step Two brings about some more decisions for you to make. There are many different rom/kernel combos you can run, such as:
Custom Rom/Stock Kernel
Stock Rom/Custom Kernel
Stock Rom/Stock Kernel (rooted or unrooted)
Custom Rom/Custom Kernel (which is what most people run)
There are a plethora of custom Gingerbread (Android 2.3) based roms including:
There are also four custom kernels available for our phones which are:
bhundven's SMS KJ6 v0.2.0 by Team ACiD (this is an edited/updated version of bhundven's kernel, which I have now removed from this guide as the thread is still locked and it seems as though all progress will be listed in FB's thread)
These tweaks can give better performance and battery life, as well as an overall smoother experience to your phone.
Note: Raver has stated that using tweaks other than those that are preinstalled on Valhalla Black OR the ValBlack Booster could cause problems with Valhalla Black.
It is suggested that you flash a rom and let your phone boot and sit BEFORE installing any tweaks in order to prevent issues.
There are also different modems that you can flash and, as stated above, they can provide you with a stronger connection to the T-Mobile network as well as faster connection and data speeds.
You can flash them through wither CWM or ODIN/Heimdall (directions can be found below). Modems are bundled with all builds, and they are the same as the build number, i.e. the KD1 modem was bundled with the official KD1 Froyo release, as the KJ6 modem was bundled with the KJ6 official Gingerbread release. You can use a Froyo modem on a Gingerbread build, and a Gingerbread modem can be used on a Froyo build (although if you are reading this, I would expect you to be on Gingerbread).
Modem Downloads: Froyo Modems
(thank you to hamsterblade for the links and OP on those modems)
So have you picked out a rom that you like yet? No? Then look back through that list and find one you like and download it, download one of those three kernels as well if you would like (kernels do come bundled with roms, as the have to in order to run, so you can just use the one that comes with your selected rom if you would like)!
Then grab FBis251's kernel from HERE and extract it.
Now open up the folder that you just got from the extraction and open up the folder called "kernel_flasher" and then move the zImage file somewhere that you will remember (I would suggest your desktop).
Now download THIS file and put it on your desktop (I would ultimately suggest just creating a folder for all of your Android files).
Now open up Heimdall-Frontend and click on the Flash tab. Now select your .pit file that you downloaded and load that into the .pit slot and then select "Add" and change the partition type to "KERNEL".
So your Heimdall setup should look like THIS:
Now to put your phone in Download Mode. This will require two hands.
Take out your battery, plug your USB cord into the computer.
Then, push and hold the Vol Up and Vol Down buttons and plug the USB cord into your phone.
Then put the battery back in and you should have a big yellow triangle with and Android digging with a shovel in it. This means you are in Download Mode!
Now just click the "Utilities" tab and have it attempt to detect your device (just to make sure). If it detects it then go ahead and click "Start" and let it do it's thing.
How To Flash a Modem with Heimdall:
Flashing a modem with Heimdall is just as simple as flashing a kernel. The steps are:
Boot into Download Mode and plug your phone into the computer.
Open Heimdall, open the Utilities tab and detect device (once again, just a precaution).
Load the .pit file located HERE (this is the same .pit file as you would have used to flash a kernel so no need to redownload if you already have it).
Now, download the CWM package for whatever modem you would like to flash and unzip it.
Open the folder that you just unzipped, navigate through the "updates" folder and move the "modem.bin" folder to somewhere that you will remember it (your desktop, or somewhere else).
Now back in Heimdall, add a new partition and select "Modem".
Select the modem.bin that you took out of the .zip file.
Hit start and let Heimdall do it's work!
How To Flash a Modem With ODIN:
Flashing a modem with ODIN is very simple. Here are the steps:
Boot into Download Mode and plug your phone into the computer.
Download the ODIN package (it is a .tar.md5 file) of the modem that you would like to flash.
Load the .tar.md5 file into the "PHONE" section of ODIN.
As long as ODIN has detected that your phone is plugged in, go ahead and hit start and let ODIN do work!
How To Flash with CWM:
First off, depending on which kernel you are using you will have a different version of CWM. If you are using any of drhonk's kernels or any of bhundven's kernels BEFORE v3, you will have CWM v3.x. If you are using either bhundven's kernel v3 or v3.1 you will have CWM v5.x. You CANNOT make a backup with v3.x and restore it on a kernel that is running v5.x or vice versa. That said, if you have v3.x, some of the menu terminology will be a little different but you should still be able to navigate the menus all the same.
So now that you have your rom/kernel I'm going to walk you through, step-by-step how to flash a modem, kernel and rom. I am posting these walkthroughs in no particular order. They do not have to be done in this order. I suggest that you have your phone plugged into the charger while flashing anything.
You are first going to need to know how to boot into recovery mode. You can use the Quick Boot app from the market (found HERE) or, if you would like, you can do it manually by turning off your phone and then push, at the same time, the Power, Volume Up and Volume Down buttons until you see the screen where your phone initially powers on (Samsung Galaxy S 4G exclusively by T-Mobile, or something to that affect). Once that screen pops up, release the power button. Then you should boot into CWM (you will see a bunch of red text come up).
So, the first step to flashing anything is downloading it and placing it on your SD Card. Most people say to put it in the root of your SD, meaning not in a folder, but I keep my files together in one folder, that way it is easier to locate all of the files that you want to flash. You navigate CWM using the volume buttons to move up and down and using the power button to select your chosen option.
To flash a kernel or modem follow these steps:
Boot into CWM and select the "Wipe cache partition" option, navigate through the "no" options until you hit the "Yes" and select it.
Then go to the Advanced menu and select "Wipe Dalvik Cache", once again, navigate through the "No" options, select yes, and let it do it's thing.
Then select the "Flash zip from SD Card" option. After that select "Install zip from SD" and locate the modem or kernel you are looking to flash. Select the file, navigate through the "No" options, select yes and let it work (you will see blue and white text flash across the screen that doesn't actually fit the screen, this is normal. When I first saw this, I freaked out too.)
After the process is complete, you will find yourself back at the four option menu you found yourself at after you selected "Flash zip from SD Card", select "Go Back".
You will be back at the CWM Main Menu, select "Advanced" and "Fix Permissions" (this is really just a precaution, but is a good thing to do).
Then navigate back to the CWM Main Menu, select "Reboot System Now" and let your phone sit for no less than 10 minutes to allow for the cache and dalvik cache to rebuild, this will prevent your phone from lagging.
The steps to flashing a rom are not much more difficult, it just takes time in some cases.
Your first step is obviously to download the file, so if you haven't already, hit that download button for your chosen rom!
IF YOU ARE FLASHING A TEAM ACID ROM (Valhalla Black, ICBINB, MIUI) YOU WILL HAVE THE AROMA INSTALLER. YOU DO NOT HAVE TO GO THROUGH THE STEPS BELOW WHILE ACTUALLY IN CWM. YOU CAN DO THEM BY SELECTING "CUSTOM" IN THE INSTALLER SETUP! (You can not however make a NANDROID backup in the installer so you need to do that before you flash).
I suggest doing this with ≥80% battery and having your phone plugged in (I've always done it this way, I don't know if there is any risk in doing it another way or not).
Now to flash the rom follow these steps:
Boot into CWM and make a backup using the "Backup/Restore" option (precaution, just in case something goes wrong). This will take a while depending on how much you have on your phone and this will also take ~1 GB of space on your SD Card, If you make a backup and would like to move it to your computer later, the file will be locate in /sdcard/clockworkmod/backup. This will backup all of your contacts, texts call logs, apps, etc. I DO NOT suggest restoring any of this through CWM (though I will cover how to do that later on). Instead I would say backup your contacts by going into the Contacts app, hitting the Menu softkey and then hitting "Import/Export" and selecting "Export to SD", using SMS Backup + (on the Market HERE) to backup your texts (or if you use GO SMS Pro, you can backup through their backup/restore system), and Titanium Backup to backup your apps (this is a root application but at this point in the flashing process, I assume you are rooted).
Next, wipe your cache partition, as you did to flash the kernel/modem.
Then wipe the Dalvik cache, once again like you did before.
Now you need to select the "Mounts and Storage" option and check that your mounts are set to:
^This is what people mean when they say "UMMU"
Now go back to the CWM Main Menu and select "Wipe data/factory reset". THIS WILL ERASE ALL OF YOUR PERSONAL DATA! MAKE A BACKUP BEFORE YOU DO THIS (whether in CWM or the backup apps listed above)
Now double check your mounts in "Mounts and Storage" and make sure that they are set to UMMU
Now select "Flash zip from SD Card" > then "Install from SD Card" and find your rom file just like you did for the kernel/modem. This will take a little longer to flash
Then back out to the CWM Main Menu, select "Advanced" > "Fix Permissions" and let this run it's course
Now, to convert your /system, /data and /cache partitions to ext4, got to the "Voodoo Lagfix" menu and select "enable lagfix" and "/system lagfix on" (they are set as default, but just in case)
Now go back to the CWM Main Menu and select "Reboot System Now". You will hear a voice (her name is Linda) and she will be updating you on the progress of your conversion. Just let her do her thing and once again let the phone sit for at least 10 minutes before messing with it (I know it can be hard to do if you are really excited about messing with your new shiny custom rom, but please resist the urge for at least those 10 minutes )
There are some problems that you could face when flashing roms. They are caused by various mistakes, not doing full wipes, etc. and they can also result from bad downloads of roms or kernels (happened a couple of times to me) and if it is your first time experiencing this, it can be fairly terrifying. But fret not, there are ways to fix this.
You do not always have to use ODIN, Heimdall or a One-Click, those are for the more serious problems. Many problems can be fixed by booting into CWM and Fixing Permissions, and/or wiping the cache and Dalvik cache.
How to use ODIN:
ODIN can be used to reset your phone to stock (unrooted in the case of this tutorial) provided that something goes wrong in the flashing process. Download ODIN from HERE (this is and older version as this is the one that I use and am familiar with, so it will be easier for me to direct you if you are using the same version as I am. i have never had problems with it). Now download THIS file to flash through ODIN and unzip it.
Your first step is to boot your phone into Download mode. You can do this by pulling the battery out of your phone, pressing and holding Volume Up and Volume Down, plugging your phone into you computer using a USB to Micro USB cable, and pushing the battery back into position in the back of your phone. If done properly, you will see a yellow triangle with an Android shoveling dirt in it come up on your phone's screen. You can then put the battery cover back on so you don't have to worry about the battery falling out (WHICH WILL BRICK YOUR PHONE IF YOU ARE FLASHING AND THAT HAPPENS)
So now that you are in download mode, open ODIN and set up your files so they look like this:
Once you have your files set like this and you have made sure that the check marks that I have ticked are ticked on your computer, you can plug your phone into the computer and START. Let this run and you should be back in working order shortly after.
Flashing through Heimdall:
Now to show you how to flash through Heimdall (for us OS X and Linux users). Go and grab Heimdall from HERE (I would suggest using the Heimdall-Frontend package, as that is what I will be showing you how to use). Once you download that, you can use the same package as we used to flash in ODIN, just decompress the .tar and then go into the folder and take the three files that end in .md5, remove the .md5 ending and the decompress those (you can then re-add the .md5 to the original files if you would like).
Now you are ready to load your files into Heimdall. You are going to need:
MODEM (extracted from T959VUVKG4-Phone-CL1037720.tar.md5)
CACHE (extracted from SGH-T959V-CSC-TMB-VIBRANTP.tar.md5)
DATAFS (extracted from SGH-T959V-CSC-TMB-VIBRANTP.tar.md5)
PARAM (extracted from CODE_T959VUVKG4_CL385158_REV00_user_low_noship.tar .md5)
FACTORYFS (extracted from CODE_T959VUVKG4_CL385158_REV00_user_low_noship.tar .md5)
KERNEL (extracted from CODE_T959VUVKG4_CL385158_REV00_user_low_noship.tar .md5, but you can use any of the zImages from kernels. However i would suggest that you use the stock KG4 and then flash drhonks KG4 and flash your selected kernel through CWM after that).
but thats the thing is the noobs dont read the wiki (qnd i will put it in the guide).
and by definitive i meant all the info in one place for rom (froyo and gb), kernels, mods etc. like the bible and wiki in one place. and it's supposed to serve as a place for questions to get asked as well, instead of Development threads
thanks! like i said, i wish people read the wiki. or used FB's starter pack, etc. but people aren't taking the time to read how to do things, so they just demand answers from devs, which makes them mad and drives them away. we already lost Krylon and bhundven from xda, and i don't want to see that happen with anyone else
Google Glass, which recently received its official update … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?