Saturday, 7 January 2012

[At Your Own Risk] How to restore your Samsung Galaxy S2 back to stock

Everyone needs a get out of jail card and if you find yourself in deep doo-doo with your phone and have no luck fixing some weird and unwanted bug you'll probably be muttering some expletives under your breath about having no choice but returning your phone for a warranty repair.

Eeek, but you've rooted it and flashed eleventy hundred roms on it and it's no longer stock.

All is not lost.

Breathe.

Take another calming breath, and then make the jump and follow our guide to make your Galaxy S II warranty-worthy again.


If you've managed to root and flash a custom rom, then you're more than likely able to find the courage to get the phone back to stock.

I don't suppose you grabbed the stock rom before you first flashed a custom rom. No?  You're not alone, many wouldn't have bookmarked where to grab the stock rom from.

There's a few steps involved in flashing the stock.  And you may even like to take a nandroid backup of your current favourite rom running on your phone now. That way when the phone is returned you can potentially place the nandroid backup on the phone and restore to it (after having gained root access and flashing a kernel that provides ClockworkMod functionality). Talking of extra steps, you might like to take screen shots of what your home screens look like. By the time you get your phone back you might have forgotten what it all looked like.  Take the screen shots and save them to your computer for refer to later.

There's an assumption that if you've already rooted your phone you'll have taken the precaution of backing up your /efs folder.  If you don't know what I'm talking about, or haven't yet done so, now is the time!  Follow Murray's tip at the end of this post: How to backup your Rooted 'Droid.

So lets get into restoring the stock rom.

In broad terms these are the steps:

  • Phone charged
  • Locate and download the stock rom
  • Note your IMEI number
  • Install Odin
  • Copy files from your Internal SD if you want them for later
  • Make sure your micro USB cable hasn't been chewed by the dog, run over by the car or damaged in some other spectacular way
  • Ensure Kies is not running (you mean you've still got Kies installed taking up valuable space on your computer?)
  • Flash the original rom with Odin
  • Confirm you're running the stock rom
  • Complete the Setup wizard
  • Smile nicely at the Customer Service Rep when you return your phone for repair

Phone charged

It's recommended that you have some decent battery life on your phone. Flashing is fairly labour intensive. You don't want a flash to go bad because your phone has run out of puff right in the middle of things.

Locate and download the stock rom

Thanks to Intratech from XDA, all the information on "Official Firmware" can be found from this thread.

Scroll through the list and download the firmware that relates to your phone. Save the files (Firmware and Kernel) to your computer – note where you've saved them to, you'll need to use these files with Odin

Note your IMEI Number

Head to Settings --> About Phone --> Status, scroll down and write down the IMEI number. You'll check the IMEI number after you've flashed in Odin and performed a factory format.

Install Odin

On Intratech's XDA page he's provided a link to download Odin. Download Odin from here.

Copy files from the Internal SD

When we perform a factory format you'll lose your Internal SD contents. If you've got anything stored on your Internal SD you want to keep, maybe a folder containing the precious game history or your Titanium backups, then connect the phone to the computer as USB mass storage and copy the folders and store them somewhere safe.

Check the quality of your micro USB cable


Check your cable is in good condition. You don't want a loose connection while you're connecting your phone to your computer. I've heard of people who have come into difficulty because their cable is less than perfect. Go. Check you don't have a dodgy cable before embarking on this. And while we're checking things that might stop working part way through. Now is a good time to reboot your computer/laptop. You don't want things to stall because there's some random update taking place, or your computer decides it's tired and would like a little nap now. Wont hurt to reboot your computer.

[I think to be safest it's always best to do this stuff on a laptop, then if your power supply is interrupted during the operation you should hopefully still be OK - it's really hard to brick Samsung Android handsets in general but a power outage during something like this will do it, Ed]

Kill Kies

Now that your computer is up and running the dreaded Kies may have reared it's ugly head and spontaneously "started". I use "started" loosely. Look in your system tray to make sure Kies isn't working (well it's never working, but you know what I mean). Make sure you've quit Kies.


Flash the original rom

There's a bit more to explain here, so I'll break this down.
If you've not taken a nandroid backup, do that now.  You'll find instructions on how to perform a nandroid backup from Murray's post.

Open Odin.

Now we're going to locate the files you previously saved of your stock rom.

  • Extract the files from the downloaded firmware
    • If there are 3 files you'll need to use the PIT when flashing
    • If there is 1 file you DON'T need a PIT file for flashing
  • Start Odin
  • Select the files needed
    • If there's 3 files include PIT and TICK re-partition
      • PDA = CODE
      • PHONE = MODEM
      • CSC = CSC
    • If there's 1 file NO PIT, and do NOT tick re-partition
      • Put the one file into PDA
  • Power off the phone
  • Put the phone into download mode by pressing the Volume Down, Home and Power buttons until you see the Samsung boot up screen. Then release all buttons together
  • Press Volume up to continue onto Download mode

factory5


  • Connect to USB
  • Wait for the ID:COM to highlight yellow
  • Click Start

clip_image006


clip_image008


factory4



  • The phone will reboot when the flash has completed successfully

Confirm the IMEI hasn't changed

Head to Settings --> About Phone --> Status

Confirm you're running stock rom

Open the dialler and press *#1234# the following screen, or one very much like it should appear:


clip_image010


Perform a factory format. This next step will completely wipe the Internal SD.

In the dialler press *2767*3855# once you've done that you'll get the following screen:

factory6


It's more than a few seconds.  Don't be alarmed.  It's probably dependant on how much you've got on your Internal SD. But it's not a quick process and I don't want you panicking that things have turned ugly because 10 seconds have gone by and you're still watching the thing spinning in the top right corner. I reckon mine easily took 2-3 minutes before the yellow writing started appearing on my screen. 

The Samsung boot up sequence will start.

If you haven't got the SIM in you'll be prompted first to connect to Wi-Fi.

You don't need to complete the Wizard to power off the phone.  Hold the power button. Power off and add the SIM and External SD if you had one which you'd earlier removed. Boot up, you're done!

Last words

Before heading to the store to leave your precious with them, make sure there's nothing on your external SD that would point to you flashing a custom Rom. Better yet, remove the external SD before heading to the shop.

Right, now that I've returned my phone to stock successfully to complete this guide I'm going to go straight back to flashing the custom rom and getting my phone back to how it was. I can't stand stock, I can't be without root privileges. I need Titanium Backup, Root Explorer and a raft of other apps that require root access.

Please feel free to leave any comments on this process, or questions you may have. If there's something you religiously do when you revert to stock that's not included but you feel is worthwhile doing let us know.

7 comments:

  1. Thanks for the detailed information,
    But I would like if you could point out an article that explains about "Root Access".
    Because you posted a video of changing the root and then showed a game, so i thought that you upload on to your phone a play station program , converting your phone into a playstation,
    But now it seems like "Root Access" is a whole different thing.

    Another quetions : returning to factory settins, i have a phone which came from my provider with some apps by the provider, and diffrent language as defualt, does your method work for this setting?

    ReplyDelete
  2. Does a similar procedure exist for the samsung galaxy note?

    If so is there a guide for doing this for the note?

    I have never done stuff like rooting or modding phones before, so would like some fall back if i need warranty as the samsung galaxy note was expensive to buy sim free but took the plunge after seeing your videos! My wife will kill me if i ruin my present one and want to buy another Note. Yes my next mobile will be the SG note2 or better, thanks to you.

    Probably should have blamed you as the cause for me spending all that money on my note! But doubt my wife would have bought that excuse.

    ps: apologies didnt buy it from clove as the price difference to amazon.de was too huge to ignore. BTW loads of swiss websites had the galaxy note for prices of about £370-400. Heard even some australian website had them for about £370 just as they were available in India for the same price with free flip cover. Mine didnt come with the free flip cover. Since yours probably did come with the free flip cover, could you confirm if it fits the car dock with the flip cover in situ. Keeping away from buying the flip cover as want the car dock too. But will have to decide which i want more as they dont seem to be compatible with each other from online reports elsewhere.

    ReplyDelete
  3. @Vinay: No need to apologise for buying at a better price! We love Clove here for their awesome service and sharp prices, but we're hardly going to berate anyone for getting a deal!

    I no longer have the flip cover, so unfortunately can't advise whether it works with the car dock.

    There are guides for returning to stock on the Note at XDA. I plan to do one but with lots of new devices needing attention right now it will be a few weeks (at least) until I can produce my own guide.

    @Anon: Root access means having complete control over your device - being able to access restricted parts of the system - this allows you to improve the functions and performance of the device considerably. Being able to use PS3 controllers is one example of a mod that improves the phone using Root access, there are many other things too - backing up apps and their saved data (see our Titanium Backup guide here at the blog), use custom ROMS with many improvements, Root-only programs like Voodoo Louder and Voodoo Sound to massively improve the sound quality etc etc. The list is near-limitless.

    ReplyDelete
    Replies
    1. Hi I have rooted my samsung galaxy note as you mentioned in "http://www.androidnz.net/2011/11/at-your-own-risk-how-to-root-your.html" provided by my friend.
      As my friend said that there wont be any issues if we root our android where his phone is working fine after root.
      But I am facing problems with my Galaxy Note after rooting.So could you please tell me how to restore rooted Samsung Galaxy Note to factory settings and retain my warranty... please reply me... please please please...
      My mail: bhaskarunichiranjeevi@gmail.com

      Delete
  4. Hi there, as mentioned in the disclaimers we're not really able to do much in the way of indepth problem solving - head to XDA developers - in the Note Development forum there are guides for what you need to do.

    ReplyDelete
  5. Hi i have my sgs2 rooted with cf-root installed checkrom revohd and domination theme.

    I followed your guide and now i have the stock firmware but still the checkrom kernel still rooted and with the domination theme, i would like to know how i can go back all to stock to send the phone for warranty

    ReplyDelete
  6. Hi!

    I have a Samsung Galaxy S2 GT-i9100m rooted with a custom rom and custom kernel. I got rid of the yellow triangle with triangle away. I want to get back to the stock rom which is Jelly bean 4.1.2. I have read on the web about the fact that my stock rom from Samsung would have the brick bug in the rom kernel. Is it a urban legend or this is the truth?

    I am with Virgin Mobile Canada. The name of my provider rom download is: I9100MUGMA5_I9100MOYCMA5_VMC.zip

    Thank you!

    Thank you!

    ReplyDelete