Tuesday, March 19, 2013

How to root and flash a ROM to your Android phone

Before we start, I have to warn you that if you root and flash a different ROM to your Android phone you will void your warranty.

You and you alone to take the responsibility for what happens to your phone. I will be using my Samsung Galaxy S5300 Pocket as an example here as it is the phone that I rooted and flashed.

[I tried to do this using Linux, instead of Odin I installed Heimdall and Heimdall-frontend, but the program would not communicate with my phone. So I had to do it on Windows. I feel bad to have a Windows based tutorial on a Linux blog, but such is life I suppose.]

What is root?

In Linux (of which many believe Android is a descendant!) having root access means having full system access to the hardware and software on the computer. If you want to install or remove software in Peppermint (or join a new WIFI network, etc.) you will need root access. This is important as a low level user cannot mess stuff up.

Having root access on your Android phone will allow you to:

  • Load apps that require root access (see Titanium Backup)
  • Load a different ROM onto your phone

What's a ROM?

Before I loose you, a ROM (read only memory) refers to the operating system on the phone. If you have root access you can load a different (customised) version of Android onto your phone. A stock ROM refers to the normal, plain, vanilla Android; while a custom ROM can have different themes, apps, etc. on it. For more info on custom ROMs click here.

Before we continue, if you flash a ROM and something goes wrong you could brick your phone. A soft brick can be fixed by flashing again. A hard brick means that your phone is now permanently stuffed up. So be careful when doing this.

The steps are:

1. Download and install Samsung KIES (if you have a Samsung phone, it will add all the necessary drivers for your phone to be able to talk to Windows).

2. Put your phone in debugging mode. Settings - Applications - Development - Debugging.

3. Go to this site, to download the unlock.zip file. Instructions from the site:

  • How to Root Samsung Galaxy Pocket S5300:
  • First of all download the rooting package on your computer and transfer it to your SD card by connecting your phone to computer in USB mass storage mode.
  • Now switch off your phone and remove the battery. Put the battery back again and restart it back again into recovery mode.
  • For entering into recovery mode, press the Volume Up button, Menu button (center button) and Power key all  together simultaneously.
  • Once you have booted into recovery mode, choose the option “install zip from SD card” and choose the file that we copied in SD card above.   You can use volume key to navigate through the available options.
  • Confirm the installation by pressing yes and wait until the process completes.
  • Up next, press back key and choose the “reboot system now” option.
4. From this site, you can download the stock ROM. Instructions quoted:

How to flash stock firmware:
* Download the firmware here S5300XXLF5
* Extract zip (it contains *.tar.md5 file)
* Download & Extract Odin (it contains Odin application and *.pit file)
* Mobile should be in USB Debugging mode.
* Go to Download mode (switch off your mobile, then press Vol-down + Home + Power, then Vol-up to continue)
* If Lovely greed android will appear, its download mode.
* Open Odin Application on PC
* Connect your phone to PC
* Yellow Indication will appear on Odin in first small box,
* Click on PDA and browse downloaded firmware file (*.tar.md5)
* Click on Start (it will take time to finish)
* Done  Your phone will be reset, And now you have S5300XXLF5

Remember that these instructions are for a Samsung Galaxy S5300. If you have a different Samsung phone you will need to Google "Samsung Galaxy S2 root" and "Samsung Galaxy S2 stock ROM" or "Samsung Galaxy S2 custom ROM" (if you have a an S2, otherwise insert your phone model). You will only need KIES if you have a Samsung phone. 

I hope you have enjoyed this, I did not want to hotlink to the downloads as the forum members on the XDA forums have asked everyone not to. Rooting your phone is risky, but if you follow the instructions slowly, it should work.

I wanted to flash a different ROM onto my phone as I would periodically loose network connection (and my phone pretended it was still connected), which was very frustrating. The only way to check if I really had a connection to my carrier was to do a balance inquiry or to check my Voicemail every half an hour or so. Very frustrating. I am testing the stock Gingerbread ROM and hope that it does not suffer the same problem.