The definitive guide on hacking the Nexus 4, part 7: How to revert back to stock Android

crabnebula

The definitive guide on hacking the Nexus 4, part 7
This is part 7 of an 8 part series of articles on the Nexus 4. This guide assumes that you have successfully installed the ADB drivers (part 1), Nexus 4 Toolkit (part 2) and that you have installed a custom ROM (part 3). This guide will describe how to revert back to stock Android 4.2.2, remove ClockworkMod, remove root and relock the bootloader.

Legal disclaimer: We are not responsible for any damage or loss to your device or computer system. Therefore, should you decide to follow these steps, you do so at your own risk and peril and agree to hold us harmless from any damage or loss you may experience. Should you disagree with the foregoing, please do not read any further.

This is a step by step guide on how to restore stock Android 4.2.2 on your Nexus 4. Therefore, if you’re tired of your custom ROM or if you’d like to send your phone back to Google for warranty purposes or for whatever reason would like to revert back to 100% stock Android 4.2.2, you can do so by following these steps. This method will make you lose nearly everything in your phone (similar to a factory reset). Also, you will lose root and the custom recovery. However, you will regain the ability to get over the air (OTA) updates from Google.

How to revert back to stock Android 4.2.2

1)    On your PC, download the factory image of Android 4.2.2 from this page. The factory image for Android 4.2.2 for the Nexus 4 is called occam-jdq39-factory-345dc199.tgz (328MB). Download the file to your computer, but do not unzip the file.

2)    Assuming you have the Nexus 4 Toolkit already installed at the default location (follow step 1 and step 2 in part 2), place occam-jdq39-factory-345dc199.tgz in this folder “C:\Google Nexus 4 ToolKit\put_google_factory_image_here

3)    Connect your phone to your computer via a mini USB cable. Turn off your phone and enter fastboot mode.  You can do that by holding the up and down volume buttons down (while still holding them down) push and hold the power button until you see the following screen then let go of all 3 buttons.

photo

4)    Execute the Nexus 4 Toolkit. The default location is “C:\Google Nexus 4 ToolKit\ToolKit.exe

1

5)    When prompted, click “No, do not check for update“. Click “1” for Android 4.2, Select “9” to download, extract and flash the google factory stock ROM, as seen below.

2

6)    Push “2” to Flash Google Factory Image

factoryimage2

7)  If your phone is in fastboot mode and it’s connected to your PC, type “yes“.

factoryimage3

8) The toolkit will extract the archive and send it to your phone. Your phone will now reboot in stock Android.

3

4

9) If you’re sending your phone back to Google make sure that the bootloader is locked. In order to check, go back into fastboot mode and if it says UNLOCKED, you need to lock the bootloader by choosing “3” in the Nexus 4 Toolkit.

10) Once you see the screen below, select “2” and type “yes” to lock the bootloader.

6  

11) Go back into Android and you should be running stock Android 4.2.2. The bootloader has been locked. The custom recovery has removed, the phone has been unrooted, the stock kernel and radio has been re-installed. The phone is now 100% stock.

Screenshot_2013-02-24-01-14-58

In the final part 8, we will discuss how to optimize and extend battery life for the Nexus 4.

  • Robert Navarro

    Thanks!

  • Jason

    i cant seem to make it work, my screen stays with a multi-color X and does not continue booting up

    • Hippowise

      sorry, i’m not sure what’s causing it. It’s never happened to me.

      • Farouk

        its asked to format my user data before flashing new user data image and i typed yes, then it says starting flash process then flashing bootloader image then it says please help!

        • Farouk

          sorry i meant that after it says flashing the bootloader image , it says can you please help me?

          • din

            you need to install the nexus driver first..
            when open the toolkit,choose no. 1 first before choosing no. 9..
            happen to me before

      • farouk omer

        sorry i meant that after it says flashing the bootloader image , it says waiting device and my device is already connected and is on fastboot and i turned on usb debugging, can you please help

  • Dz25000

    You know what….. you are a genious.
    I was looking every where on the net to backup my nexus 4 to the stock rom, and ther is no website who could really help me, most of the topics don’t work…. so THANK YOU VERY MUCH

  • Emilio Arias

    Man I got stock here

  • Emilio Arias

    Nevermind, I solve the error, Now I’m on complete stock android

    • Matej Omerzu

      how do you solve error????

      • Emilio Arias

        Did the same error happened to you ?, If it was that just install all the drivers correctly (ADB) and when the ToolKit ask you about making a format { (Or something like that) read every step) } just say no

  • confusedone

    will this work if i flashed an older radio to have lte?

  • edw

    why is that mine kept asking for mako.zip file? I only want to go back on 4.2.2..

    • edw

      oh, i’m done with that, now the flash is started

      • edw

        It stopped in waiting for device? stuck for almost half an hour..

  • Punit

    I followed the guide upto step 4 but I didnt got the image in step 5.
    What I got is, I selected 13 for android 4.2.2 JDQ39.

    Then I got “Press any key to close the toolkit”.

    Please help as I am unable to get OTA updates.

    I am on PA 3+ with Franco Kernel on Android 4.2.2 JDQ39.

    Please help!!

  • mousa

    Hi, I followed the guide until step 6, and after choosing to flash I got an error message. I have nexus 4, 4.4.2. Can you please help?

    • Padremayi

      You have a locked bootloader, unlock it first ;-)