| || |
[GUIDE] Nexus 7 - Factory Image Restore
You unlocked, rooted, ROM'd, and, somewhere or another, appear to have royally screwed up your Nexus 7..... Not to fear! As a Nexus device Google has you covered with factory image packages you can use to restore your tablet to brand new out-of-the-box condition. And here's how...
[WARN]The procedure below will fully wipe of your device, internal SD included. If you are able to boot your tablet at all right now, its a good idea to copy anything you desperately need to save over to your computer, as you can move it back later. This is your last-resort fix for hacking screw ups. Niether myself nor Android Central is responsible for anything that happens to your device... but we will be here to help you as best we can[/WARN]
Here are the GENERAL INSTRUCTIONS TO RESTORE THE STOCK IMAGES. Make sure you know how to do it for your computer/setup and that ADB and fastboot is set up on your computer. Please check the guides provided by Zero Neck and Ragnarokx to ensure that you have your fastboot drivers installed correctly. Also know the exact folder containing the fastboot files you will be using and the specific name of the file, which might be "fastboot", "fastboot-windows", or "fastboot-mac" depending on which unlock method you used for your device.
In addition, make sure you know how to type the commands in for your specific setup. For example, if you're using a superboot folder for Mac, you need to make sure you understand what your "version" of the beginning of the command is (usually "./fastboot-mac" if you're using that r3-superboot folder).
For Linux/Ubuntu, be sure to put "sudo" before any and all fastboot commands, or you will get an error about insufficient permissions.
AC user SladeNoctis has provided a great video walkthrough of the entire process done on a Windows PC. While the commands you would use on a mac or linux box would be slightly different, this should give you a great idea of the overall process and what to expect. Thanks Slade!
1. Download the 4.3 (JWR66V) image files to your computer. A direct download link is found here for the Wifi only Nexus 7: https://dl.google.com/dl/android/aos...y-d341d356.tgz
The image for the GSM/HSPA+ Nexus 7 is found right here: https://dl.google.com/dl/android/aos...y-aebc7b11.tgz
Please be careful to download the correct factory image!!
The instructions below are for the Wifi only tablet.. if you have a GSM/HSPA+ tablet your instructions are pretty much identical except for a tiny change in the filenames.. Any file that contains the word "nakasi" is instead "nakasig" for the GSM/HSPA+ tablet... As well, your files will contain the codename "tilapia" instead of "grouper" Make note of that when you type in the fastboot command to flash the factory image!
While a link to the Google page you can search on if you need, is here: http://developers.google.com/android/nexus/images
2. Extract the files from that downloaded file. This will give you a folder called "nakasi-jwr66v"... and inside of that you will see the files we are going to fastboot to your tablet. We want to place these files into the folder we located earlier which contains our "fastboot" file. Move or copy them over to that folder.
Note: On Linux/Ubuntu you may just extract them to any easily located folder.. Create a new one on the desktop or your home folder is my recommendation.
For reference, there should be 4 files, named:
*radio-tilapia-1231_0.18.0_0409.img <--- IF you downloaded the image for the 3G/HSPA+ Nexus 7 you will see this file and should move it as well as the others
3. Open a command prompt inside the folder we have set up our files in. On windows this can be done by holding shift as you right-click in the folder, then select "Open command window here". On Mac or on a Linux system you want to open a terminal/command prompt and navigate to that folder using "cd" or "change directory" commands. For example if your folder is called "fastbootfiles" and it is on your desktop, you would enter:
4. Power down your tablet. Reboot into the bootloader by holding Volume Down + Power until you see the bootloader screen. In red letters toward the top of the text you will see fastboot mode. Once here, plug it into your computer.
5. Let's make sure you have your fastboot drivers installed and recognizing your device. Enter in the command prompt:
And press enter. You should see "List of attached devices" Followed by a string of numbers. If you do not see this, you do not have your drivers installed correctly! Go back to Zero Neck's Unlocking guide and grab the correct drivers, and make sure you install them correctly. You can also find the procedure during the video posted by Ragnarokx.
If you got the expected response, let's move on to fastbooting you back to stock...
6. This first command is going to wipe all your old EVERYTHING from the device. Credit to our resident AC cowboy, Jerry Hildenbrand, for pointing out to me a minor bug with the Nexus 7 bootloader that makes this a wise step to do first. Type each of these lines followed by Enter between them, waiting for one to finish before moving on to the next:
7. This command will flash the stock bootloader on to your device. Enter:
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot erase userdata
And press enter. Make sure you type the command exactly as you see it.
fastboot flash bootloader bootloader-grouper-4.23.img
Note: As we noted earlier, replace "fastboot" above with the exact name of the fastboot file in your folder, for your system, such as "fastboot-windows" or "fastboot-mac". Addtionally for Mac's only, the command should be entered as such
Noting the period and forward slash before the command.
./fastboot-mac flash bootloader bootloader-grouper-4.23.img
Going forward you Mac folks just remember that with the rest of the commands
Now reboot the bootloader:
7 (b). **IF you have the 3G/HSPA+ Nexus 7 you should flash the radio file as well. Wifi-only Nexus 7's skip this step. To flash the radio file:
fastboot flash radio radio-tilapia-1231_0.18.0_0409.img
8. This next command will both wipe your old system and flash the factory image in its place, which includes the stock system, recovery, kernel, and userdata partitions:
Enter, and wait, make sure the command finishes. This might take a few minutes.
fastboot -w update image-nakasi-jwr66v.zip
Reboot the bootloader again:
9. We are done with the hard part... pretty easy right? Now we're just going to lock that bootloader.
Yes, this step is optional but I strongly recommend it if you had issues earlier which led to this procedure. Now you can unlock again if you like, which will give your tablet that final full wipe to clear out any bad data remaining:
fastboot oem unlock
10. Finally, reboot and setup your tablet again from scratch!
That's it, we're done. You have a stock, factory Nexus 7 tablet to get right back to tinkering with to your heart's content. If you have any questions, comments, concerns, or a recommendation to make this guide clearer, please sound off and myself or someone else will be around to help you out!
Credit for much of this guide and its format also goes to AC Moderator, dmmarck. Show him the love as well!