How to install a factory image and to root the Nexus 7

This guide will provide detailed instructions on flashing a factory image, installing a custom boot loader and rooting the Nexus 7. I will be using fastboot and adb rather than a toolkit because this will allow you to see what is happening every step of the way and is a good opportunity to learn about the process. I will be using Arch Linux but one can using any operating system where fastboot and adb is available.

Why install a factory image or root a Nexus 7:

Some reasons why one would want to install a factory image.

  • If you have a custom rom installed and would like to return to a default factory setup.
  • If your device is damaged and would like to return it for warranty purposes.

Here is a few reasons why one would want to root an android device.

  • One will have full control over the device.
  • It will allow you to install root only apps like AdAway which will block advertising on your Android device and the Sixaxis Controller app that will allow you to use a PS3 controller with your Android device.

Getting Started:

If your Nexus 7 is on Android 4.2.0 or higher, you will need to enable the "Developer options" first.

  1. From the home screen swipe down from the top right and select settings.
  2. Select "About tablet"
  3. Then tap the "Build number" 7 times
  4. Go back one screen and you should see the "Developer options"

You now need to go in to the "Developer options" and enable "USB debugging", once that is done plug the Nexus 7 in to your computer via a mini usb cable.

If you want to flash a factory image to your device you will need to download the factory image for your device, this step is not require if all you want to do is to root your device.

So for the Nexus 7 WiFi version we will use the following command


Once the download is complete you can extract the file with the follwoing command.

tar xf nakasi-jwr66y-factory-1e503532.tgz
cd nakasi-jwr66y

If you intend to root your device you will need to download the following files as well.


Now you must make sure that you have "fastboot" and "adb" installed on your computer. Since I use Arch Linux here is the links to fastboot and adb.

The boot loader:

When you install a recovery image or root the Nexus 7 you will need to unlock the boot loader. To do this we first need to put the device into fastboot mode with the following command.

sudo adb reboot-bootloader

Now that you are in fast fastboot mode you need to use the following command to unlock the bootloader.

sudo fastboot oem unlock

Follow the instructions on the device to complete the process.

Installing factory image:

In fastboot mode with your device's bootloader unlocked, run the following commands in sequence, waiting for each command to complete.

sudo fastboot erase boot
sudo fastboot erase cache
sudo fastboot erase recovery
sudo fastboot erase system
sudo fastboot erase userdata
sudo fastboot flash bootloader bootloader-grouper-4.23.img
sudo fastboot reboot-bootloader
sudo fastboot -w update

After the final command completes, the device will reboot it's self.

Rooting the Nexus 7:

First you will need to copy the supersu zip to the Nexus 7 with the following command.

sudo adb push /mnt/sdcard/

Now you need to put the device into fastboot mode by running the following adb command.

sudo adb reboot bootloader

The following command will flash a custom recovery image onto the device.

sudo fastboot flash recovery recovery-clockwork-touch-

Once completed, choose RECOVERY MODE from the fastboot menu on the device and enter Recovery Mode.

Select "install zip from sdcard", then "choose zip from sdcard". Select the first directory "0", then select the "". Lastly select "Yes - Install". You are now done you can "Go Back" and "reboot system now".

If you have any questions please leave a comment below.

Posted by Deon Spengler
Last updated on Sept. 4, 2013, 11 a.m.

Tags: Android

Follow Me