Restore Samsung Galaxy S3 To Factory State (unroot/stock recovery/reset binary counter/stock ROM)

Note: I originally posted this guide a while ago at XDA Developers but thought I might post it here as well.

IMPORTANT:This guide is for the i9300 variant of the S3Those with other variants – Please use this guide ONLY if you know for sure it will work for you. 
For those with the Verizion S3, it was reported that you can use this guide: http://forum.xda-developers.com/showthread.php?t=1762709
The problem is that many of you may have unlocked your bootloaders, and this guide DOES NOT apply if you need to re-lock.

I only just completely restored my S3 to factory state and I had to use so many articles over the web, half of them not even bringing me back to the original state. If you follow this, you will bring it back to a condition that will be nearly identical to the condition you found it in the box.
What This Will Leave You With In The End

  1. Official Firmware
  2. Official Recovery
  3. Binary Counter set to 0
  4. Device status to “Normal”
  5. Factory Settings as if you just took it out of the box.

This Will Help You Out If

  • You’ve soft bricked your phone but can still access recovery and want to reset
  • You’ve installed a custom recovery and want stock
  • You want to unroot and remove the modifications made (including a custom recovery such as CWM)
  • You want to reset the binary counter
THIS IS A DANGEROUS OPERATION AND COULD POTENTIALLY BRICK YOUR DEVICE. PROCEED AT YOUR OWN RISK. I AM NOT RESPONSIBLE FOR ANYTHING ON THIS THREAD AND FOR ANYTHING THAT WILL HAPPEN TO YOUR DEVICE AS A RESULT OF FOLLOWING MY GUIDE. BY FOLLOWING IT YOU ACCEPT THIS.

Process Overview

  1. Reset Binary Counter
  2. Flash Stock Recovery
  3. Device Wipe
  4. Flash Stock ROM
  5. Done!

Instructions

1. Reset Binary Counter

Right so the S3 has a feature known as the binary counter – this counter is incremented every time you flash any unofficial software. This includes any custom ROMs, Kernels, and Recoveries. Chances are, during your rooting process you installed a custom recovery such as ClockWork Mod. This means your counter is not at 0, and your system status will be that you’re running unofficial software – WE NEED TO GET RID OF THIS.

Steps

1.1 Turn off your phone.
1.2 Press the Home, Volume Down and Power buttons together.
1.3 Press Volume Up to continue when prompted
1.4 You will now see the binary counter will have an integer other than 0. Note this value down.
1.5 Download: TriangleAway. You can do this by going to this thread: http://forum.xda-developers.com/show….php?t=1494114
1.6 Copy it to your phone’s memory or SD card.
1.7 Use any file browsing software to install the apk you downloaded.
1.8 Open the application and follow the notifications shown.
1.9 Find “Reset Flash Counter”. The details shown should match your binary counter that you noted down earlier.
1.10 It may also say “this information cannot be retrieved” or something of the sort – in that case you can go ahead (I had to do this) and press reset flash counter. It will now boot into it’s own mode. Follow the instructions to reset.

Can I add that between steps 10 and 11, if you have a custom kernel or recovery, and a JellyBean bootloader – when the phone boots, the flash counter goes back up to to 1.

To remedy this, you can either:

1) After pressing the volume key in Triangle away, interrupt the boot up by pulling the battery. Check in download mode. If 0, move on to next step – otherwise, repeat

2) Flash an ICS Bootloader via ODIN first. ICS bootloaders are reset permanently once reset via Triangle away

3) Flash a stock recovery and kernel via ODIN so the flash counter doesn’t increase once reset via Triangle away

4) Flip the entire process around. Flash a stock ROM first, root with CF Auto root. Run triangle way then use the superuser app itself to unroot.

Hope this helps.

1.11 Your counter is now reset! You can check it by repeating the first 4 steps.

2. Flash Stock Recovery

(Skip this step if you have stock recovery already)
We need to do a full wipe of the system. To do this we need to go to our recovery but OH shit we’ve got a custom recovery. If we go into this recovery then we’ll set the binary counter back to 1 again and it’ll defeat the purpose of the first step. If we, however, use a stock recovery then the counter will still stay at 0.

Steps

Credits: http://galaxys3root.com/galaxy-s3-tu…-on-galaxy-s3/
2.1 We need to go back to ODIN mode (where you observed your binary counter).
2.2 Turn off your phone.
2.3 Press the Home, Volume Down and Power buttons together.
2.4 Press Volume Up to continue when prompted
2.5 Download ODIN: http://stockroms.net/file/Tools/ODIN/Odin3v185.zip (this is the version I used)
2.6 Download your Stock Recovery:
Stock Recovery for International Galaxy S3 GT-i9300 (This is the one I used because I’m from the UK)

Download Stock Recovery for Galaxy S3 SGH-I717/I717M (AT&T,Canadian)

Download Stock Recovery for Galaxy S3 SCH-I535 (Verizon)

Download Stock Recovery for Galaxy S3 SGH-T999 (T-Mobile)

Download Stock Recovery for Galaxy S3 SPH-L710 (Sprint)

2.7 Run ODIN. Do not touch any of the options. Only Auto Reboot should be checked.
2.8 Plug in your phone. The first COM rectangle should be yellow (like: http://gyazo.com/ad7dcd2af17a7ff6745ded7ea91eefaf ) and ODIN should recognize the phone. If this is not the case and it’s not recognizing it then you need to get drivers for your phone.
2.9 Click “PDA” and select the stock recovery file you just downloaded.
2.10 Click Start.
2.11 When complete the top left will be green.
2.12 Now you have a stock recovery!!
2.13 Unplug your phone

3. Device Wipe

3.1 Go into your custom recovery by holding down Home, Volume up and Power buttons together.
3.2 When you see the samsung logo, let go and you’ll see it go into custom recovery.
3.3 Scroll to device wipe using the volume keys.
3.4 Press the home key to select the option, and then select yes. Once the device is wiped it will let you know.

4. Flash Official ROM

4.1 Download your official ROM here: http://samsung-updates.com/device/?id=GT-I9300
4.2 Choose the correct ROM corresponding to your country, I chose BTU since my phone was unlocked and I’m from the UK.
Please note: it is IMPORTANT that you download the correct ROM. Dial *#1234# to find your CSC (country code) and CP number which you can match up to the ROM.
4.3 It’s around 800MB so it will take a while to download.
4.4 Go to ODIN mode again by
4.5 Press the Home, Volume Down and Power buttons together.
4.6 Press Volume Up to continue when prompted.
4.7 Run ODIN on your computer and connect your phone.
4.8 When it recognizes it, check “Auto Reboot” and “F.Reset Time”.
4.9 Everything else should be left unchecked.
4.10 On your computer, unzip the ROM file you downloaded. It should give you something with the extension of .tar.md5
4.11 Press “PDA” on ODIN and select this file.
4.12 Everything should be as shown here: http://gyazo.com/fea7a1c8b7a7b5bb287fb0a0c70056dc
4.13 Click Start and wait for it to do it’s thing. It’ll take quite a few minutes.
4.14 When it’s finished, you’re DONE!!!!
IMPORTANT: If when rebooting, it hangs at the samsung logo for a while then perform STEP 3 (Wipe Device) and then reboot it. Should work. If not then post here and someone may help you OR you can attempt reflashing your stock ROM again.

And that’s it folks. I’m not too experienced with Android so if you have any questions then head over to XDA Developers.

 

Leave a Reply

Your email address will not be published. Required fields are marked *