[STOCK ROM] How to Unroot, Return to stock or flash a factory image on any nexus device

Google Nexus devices are the first in the world to get the Latest Android versions.
In the near future Google is going to release the Latest Android L versions.
But you can't taste it if you have installed some custom ROM like CyanogenMod ROM or Paranoid Android or something else.

So you must know how to return to a stock image on your nexus device.
For some case if you need to undo root your nexus, then this guide will be for you.

Before going into details make sure that you have the following things in hand to start with the rooting method.
Required things:
- Driver for Your Nexus device
- Fastboot and adb binaries
- Factory image for your corresponding Nexus device
- USB cable
- Enough time with a smart and cool brain

NOTE:
Please download the factory image meant for your device only.

This process will erase all of your data, so it is strongly recommended that you should take a full backup of your current data.
Follow the below link for how to backup all the data on your android device:
Step by step guide to take full backup of your phone data

flashing_fact_image

[Manually flashing factory images for all Nexus devices]






STEP by STEP factory image flashing guide for your Nexus device:

If have not yet unlocked the bootloader of your device then follow the below link to get it done:
Unlocking the Bootloader:

Installing a factory image:

STEP 1:
---------
I hope you have already downloaded the mfastboot zip file.
Extract the mfastboot zip file and keep it in an easily accessible loacation like c:\mfastboot-v2\
If you are on a linux machine then preferably /home/<user_name>/mfastboot-v2/

STEP 2:
---------
I hope you have already downloaded the factory image for your device.
keep the factory image zip packege inside the mfastboot extracted directory.
Example: Inside this directory c:\mfastboot-v2\
Same case for linux users.

To make it understandable I have downloaded the factory image for my Nexus 4:
verion: 4.4.4 (KTU84P)

NOTE:
The zip file comes in a package.
The package contains the following:
- bootloader image: bootloader-mako-makoz30d.img
- radio image: radio-mako-m9615a-cefwmazm-2.0.1701.03.img
- The actual Android system image: image-occam-ktu84p.zip
- scripts for different platforms like Windows and linux that will flash all of the images by itself to your device.

After completing the above steps there are are although several methods that you can follow to flash a factory image to your Nexus device, but here I am going to show you the easiest method to do it.

Easiest flashing method:

STEP 1:
---------
Power off your phone.
Boot it in fastboot by pressing and holding Power Button + Volume Down at the same time.
And then connect your phone to the PC using a USB cable.

STEP 2:
---------
Run the flash-all.bat by double click on the script file.
For linux users you have to run the flash-all.sh script file.

Wait for the script till it flash everything.

STEP 3:
---------
After everything finished, select "Recovery" using the volume buttons.
When a small dead Android appears, press Power Button + Volume UP.
Select "Wipe data/factory data reset"

Now reboot your phone.
After rebooting you should be on a brand new(atleast from software perspective) stock version.


Have fun and stay tuned to get more updates.

I am an embedded software engineer by profession and an advanced Android user who knows a little more than many out there. I work on creating and promoting GCam APK which is a modified APK done to get several extra features on the stock app in Android. Basically this is done using reverse engineering the original app file. I work on publishing about GCam APK Port, custom ROMs and some Linux how-to guides. I use this YouTube Blue APK and the NewPipe APK as a daily Youtube apps.

Share this

Related Posts

Previous
Next Post »