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.
If your Nexus 7 is on Android 4.2.0 or higher, you will need to enable the "Developer options" first.
- From the home screen swipe down from the top right and select settings.
- Select "About tablet"
- Then tap the "Build number" 7 times
- 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.
wget http://download2.clockworkmod.com/recoveries/recovery-clockwork-touch-220.127.116.11-grouper.img wget http://download.chainfire.eu/346/SuperSU/UPDATE-SuperSU-v1.55.zip?retrieve_file=1
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 image-nakasi-jwr66y.zip
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 UPDATE-SuperSU-v1.55.zip /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-18.104.22.168-grouper.img
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 "UPDATE-SuperSu-v1.55.zip". Lastly select "Yes - Install UPDATE-SuperSu-v1.55.zip". You are now done you can "Go Back" and "reboot system now".
If you have any questions please leave a comment below.