Basics to Rom Flash for Galaxy S4, my own experience sharing
I have an GT-I9505 international version, and did some DIY and flashed customized Roms.
Just like to share my experience on this whole Rom flash thing and some basics hopefully can help other new users.
0. Device Code
for Galaxy S4 LTE international, the device code is GT-I9505,
So every device has a code and it's useful as these will be commonly referenced in forum posts.
For Galaxy S4 there is old bootloader and new bootloader.
The difference is new Bootloader has Knox and in download mode it has the additonal line of "Knox Warranty Void 0X0"
2. Bootup mode
There are 2 special bootup modes. Recovery mode and Download mode.
Download mode is built in and the lowest level.
Odin and Heimdall can be used for this mode to flash customized Recovery.
Recovery mode can do factory reset, partition format and rom install.
This is a concern as Rom flashing may likely void warranty and not easy to reclaim back. Knox warranty bit cannot be reversed so far, and almost surely will become 0X1 if do anything customized recovery or Rom.
Another thing is Flash counter. This can be reset by "Triangle Away", but could be a dangerous operation.
4. Need to check Bootloader is not locked, and not with the AT&T MF3 firmware before proceed. These 2 scenario are more difficult.
5. Baseband and Roms
Customized Roms are usually pre-rooted, and may require the Baseband to be updated to work.
The Baseband can be safely updated and usually internationally combatible so no need to worry much on this.
Baseband can be downloaded and flashed via Odin. Reboot and confirm it's updated and everything works.
As I read up, if Baseband cannot work still can flash the modem.bin from stock firmware package to restore. So it's important to always prepare a copy of the Stock firmware before the customized rom flash.
6. Full wipe
It's always better do full wipe for new Rom flash.
In order to do a full wipe, need to do a few partition wipes.
As example in ClockworkMod, need to wipe /data, /cache, /dalvik, and /system
It's important to format the /system also before install new Rom.
7. Install customized Rom
The steps are generally like this,
Boot into Download mode (home+power+down buttons), use Odin/Heimdall to flash customized recovery.
Then before stock rom bootup, boot into recovery (home+power+up button), then do full wipe first, then install the customized rom.
Reboot, will be all set.
Note: In order to bootup into Recovery mode, don't press power button too long as this will reboot phone again. When once see the blue line in the top corner, can quickly release power button already it will boot into Recovery. This confused me quite a while.
There are a lot of info and posts can be searched in web and xda developer forum. Xda developer forum in general info is better.
Read up and prepare before do the actual thing. It's important to backup. I lost my SD card data once, it's painful. The data files better be backup.
Get the Roms and tools ready, in case any issue unexpected come up can still revert to backup plan. such as flash back Stock firmware via Odin.
Happy playing with your Android device.