[GUIDE] Nexus 7 - Factory Image Restore

Golfdriver97

Trusted Member Team Leader
Moderator
Dec 4, 2012
35,367
113
63
Visit site
Hello,

I tried to downgrade my Lollipop 5.1.0 Nexus 7 to 4.4.4, however, I think I've downloaded and flashed the wrong factory image. I'm re-downloading the right one, however, is there anything I have to do, or should I just reflash the correct factory image?
The cmd only displayed that my tablet is [grouper] therefore it couldn't be done.

Thank you very much,
Welcome to the forums. Reflashing the proper image should be all you need to do.

From an AOSP M8
 

edumasc

New member
Mar 5, 2015
2
0
0
Visit site
Hello guys,

I made a beginner's mistake, instead of flashing the Kitkat Razor version to my Nexus 7 Wifi 2012, I flashed the Kitkat Nakasi. I tried to re-flash the tablet using the correct Kitkat Razor version, but my touchpad stopped working. Now I am stucked in the language selection screen without being able to move forward. What should I do?

Thank you,
EduardoIMG_20150413_224805892.jpg
 
Last edited:

Chris Hom

Member
Jan 30, 2013
6
0
0
Visit site
Boot your device into the bootloader. With the power off, hold the power and volume down buttons ( I do believe that is correct for the nex 7 ). Then run your scripts via command line with fastboot scripts. "Fastboot flash system system.img" etc. Anyone coming across issues flashing and failing, I provided a little script above that manually flashes all the files to avoid that error. It also works for the rest of googles lineup.
 

Chris Hom

Member
Jan 30, 2013
6
0
0
Visit site
Hi really useful instructions. I got as far as bootloader img stage on command prompt and it came up with an error FAILEd stuus read fialed too many links. I have attached a link
Welcome any suggestionsView attachment 161056

Try renaming the bootloader to something simple. Like bootloader. Also make sure its the only bootloader IMG in your folder. For ease of use I always rename the main folder to something like android 5.1 Hammerhead and rename all the other files in that something simple. This means you generally have to manually flash the files but since 4.4 googles flashing scripts have rendered me incapable of doing it their way, having to manually flash all partitions myself to avoid errors.
 

Karl Haman

New member
Aug 25, 2013
1
0
0
Visit site
Hello Everybody, and sorry to hijack the thread :D
i just tried this tutorial with no success ... let's just get back in time a little bit, everything began when i flashed a custom 5.1.1 ROM
when i rebooted i got stuck on a bootloop so i hardreset the tablet to access the recovery and flash back my rom ...
when the tablet restarted there was no recovery, can no more start the OS and when i reload bootloader it got stuck, when i hook it to PC it displays as APX mode, at first i thought i was hard bricked, but next i was able to enter Fastboot mode ! huray i said, but, when i try to get back to factory image (using NRT at first and fastboot adb commands next) i can send the stuff (bootloader, recovery ) but i always get a FAILED <Remote: <FileWriteFailed>> next, after several tries i gave up, and today i put it to charge to see what happen, and i got the battery refiling animations, that means the bootloader isn't broken if im correct, i tried next to send a bootloader.img it got sent OK but FAILED <Remote: <FileWriteFailed>> , and in the tablet screen i got a Signature Match message, any ideas ? aditional informations, last time my system was on EXT4 and the rest on F2FS, maybe that's the culprit, if i could format everything to EXT4? thanks in advance!

Sans titres.png
 

Ronnie Cober

New member
Jul 21, 2015
1
0
0
Visit site
Thank you so much for your tutorial. It save my Nexus 7. I am an avid rooter. I root everything I own....just because I can and I love to experiment with electronics. Once again thank you

Ronnie
 

Doofguy

New member
Sep 9, 2015
1
0
0
Visit site
I tried to follow this guide because my Nexus 7 was stuck on the google logo, and Nexus Toolkit wasn't working for me, but... I think I made the problem a teeny bit worse.

Code:
C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>fastboot erase boot
erasing 'boot'...
OKAY [  0.016s]
finished. total time: 0.016s

C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>fastboot erase cache
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [  0.094s]
finished. total time: 0.094s

C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>fastboot erase recovery
erasing 'recovery'...
OKAY [  0.031s]
finished. total time: 0.031s

C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>fastboot erase system
******** Did you mean to fastboot format this partition?
erasing 'system'...
OKAY [  0.125s]
finished. total time: 0.125s

C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>fastboot erase userdata
******** Did you mean to fastboot format this partition?
erasing 'userdata'...
OKAY [  5.288s]
finished. total time: 5.288s

C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>fastboot flash bootloader bootloader-grouper-4.23.img
sending 'bootloader' (2100 KB)...
OKAY [  0.281s]
writing 'bootloader'...
OKAY [  1.201s]
finished. total time: 1.498s

C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>fastboot reboot-bootloader
rebooting into bootloader...
OKAY [  0.016s]
finished. total time: 0.016s

C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>fastboot -w update image-nakasi-jwr66v.zip
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'
archive does not contain 'vendor.img'
Creating filesystem with parameters:
    Size: 30080499712
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8160
    Inode size: 256
    Journal blocks: 32768
    Label:
    Blocks: 7343872
    Block groups: 225
    Reserved block group size: 1024
Created filesystem with 11/1836000 inodes and 159268/7343872 blocks
Creating filesystem with parameters:
    Size: 464519168
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 7088
    Inode size: 256
    Journal blocks: 1772
    Label:
    Blocks: 113408
    Block groups: 4
    Reserved block group size: 31
Created filesystem with 11/28352 inodes and 3654/113408 blocks
--------------------------------------------
Bootloader Version...: 4.23
Baseband Version.....: N/A
Serial Number........: 015d3b6618041806
--------------------------------------------
checking product...
OKAY [  0.047s]
checking version-bootloader...
OKAY [  0.031s]
sending 'boot' (4896 KB)...
OKAY [  3.136s]
writing 'boot'...
OKAY [  0.203s]
sending 'recovery' (5432 KB)...
OKAY [  1.326s]
writing 'recovery'...
OKAY [  0.218s]
erasing 'system'...
OKAY [  0.094s]
sending 'system' (529061 KB)...
FAILED (data transfer failure (Unknown error))
finished. total time: 24.523s

C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>fastboot reboot-bootloader
rebooting into bootloader...
FAILED (command write failed (Unknown error))
finished. total time: 5.008s

I'm not really sure what I did wrong, but now my tablet won't switch on at all. No lights, nothing. There's no response when I plug it into the wall charger, I can't access bootloader, I've tried holding all the buttons in various combinations for various amounts of time, but nothing is working. Checking the Device Manager, my tablet is listed as APX. I guess I'm the not-so-proud owner of a paperweight, now? :-\
 

ESut

New member
Oct 28, 2015
1
0
0
Visit site
Great help.
Actually this was my first time using ADB on this device.
3 things:
1) my physical connection was bad but in spite of it throwing some Errors relating to pipeline identification it still returned the device serial at the the beginning (./fastboot devices)
I was able to get through most of the steps but it returned lots of errors along the way yet I persisted and it was stuck in the bootloader mode.
I tested and retested the physical connection until it re-identified the device correctly, this time without any errors.

2) I actually had to ./fastboot oem unlock before it'd do anything but once I did, I just ran through the steps again and it worked perfectly.
3) btw the second to last ./fastboot reboot was cut short as the system already booted to the main screen and I had to manually put it back into the bootloader menu

regardless of my hiccups, the info provided gave me the basic understanding to work through it.
thanks,
-e
 

Distorted Vision

New member
Apr 26, 2013
2
0
0
Visit site
The guide refers to 4 files:

bootloader-grouper-4.23.img
flash-all.sh
flash-base.sh
flash-all.bat

in the image file. But when I download the factory image for 5.0.2 the file is nakasi-lrx22g-factory-30701477.tar and inside is just a single file nakasi-lrx22g-factory-30701477 (no file extension).

Can anyone please help?
 

kaljor

New member
Feb 15, 2016
2
0
0
Visit site
Wow. I know this thread was started 4 years ago, but I'm so happy it's still here. I just used the instructions to restore an old Nexus 7 to the last version of Kit Kat. It just seemed sluggish after Lollipop and I eventually stopped using it much. But when I saw on this forum how to roll it back, I jumped right in, and it all worked flawlessly. I'm so glad that sites like this exist, and that there are wonderful people who do this work of documenting how to do things we want to do but don't know how. And then they hang around and help people who have questions when they run into difficulty. You know the internet can be a crummy, nasty place, but this is the exact opposite; people putting themselves out to help other people they don't even know. Thank you doesn't seem like enough, but there it is. You can tell that I'm pretty happy about "repairing" my old tablet, a tablet that I have found useful in the past, and now can use again.
 

kaljor

New member
Feb 15, 2016
2
0
0
Visit site
Can anyone please help?


Alright Mr. Vision, I’ll try to help, but I’m no expert.

To reproduce your work, I downloaded the 5.02 file you referred to. On my machine it was called nakasi-lrx22g-factory-30701477.tgz

I put that file in a new directory I created on the Desktop. I named it Lollipop, but you can name it anything you want. To extract the files from it, I used a program called 7zip. I right clicked on the downloaded file, selected 7Zip, and then clicked on “Extract Here”

That resulted in a file called nakasi-lrx22g-factory-30701477.tar

Again, I right clicked on that file and selected “Extract Here”

That resulted in a new directory called nakasi-lrx22g and inside that directory were the 4 files you listed in your post, and also the image file that you are trying to restore. That file is named image-nakasi-lrx22g.zip

Try that, and if you get the same results, then you can go back to where you left off in the guide, and you should be on your way.
 

RG Mini

New member
Apr 9, 2016
1
0
0
Visit site
Not going to lie. I want to kiss you right now!!! I searched far and wide for an easy guide and this by far the best one! Thanks!
 

rhltechie

New member
Jul 5, 2016
1
0
0
Visit site
hi all...

came into my office this morning to see my first gen nexus 7 stuck in a boot loop. Found this thread and followed it as I tried to do a factory reset first and that did not work. The guide was easy to follow and seemed to work fine on my device. I get through all the commands and such successfully but it does not work. When the end of the new install happens and it reboots my device, the nexus starts to boot and I can tell it has not worked as I am still seeing the swirling dots instead of the original google logo at boot. Can anyone direct me to something else? I'm not sure what other info to include. Sample of the end of my fastboot process:

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot -w update image-nakasi-jwr66v.zip
target didn't report max-download-size
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'
archive does not contain 'vendor.img'
wiping userdata...
Creating filesystem with parameters:
Size: 14442037248
Block size: 4096
Blocks per group: 32768
Inodes per group: 8176
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 3525888
Block groups: 108
Reserved block group size: 863
Created filesystem with 11/883008 inodes and 96825/3525888 blocks
wiping cache...
Creating filesystem with parameters:
Size: 464519168
Block size: 4096
Blocks per group: 32768
Inodes per group: 7088
Inode size: 256
Journal blocks: 1772
Label:
Blocks: 113408
Block groups: 4
Reserved block group size: 31
Created filesystem with 11/28352 inodes and 3654/113408 blocks
--------------------------------------------
Bootloader Version...: 4.23
Baseband Version.....: N/A
Serial Number........: REMOVED
--------------------------------------------
checking product...
OKAY [ 0.031s]
checking version-bootloader...
OKAY [ 0.047s]
sending 'boot' (4896 KB)...
OKAY [ 0.677s]
writing 'boot'...
OKAY [ 0.180s]
sending 'recovery' (5432 KB)...
OKAY [ 0.666s]
writing 'recovery'...
OKAY [ 0.188s]
erasing 'system'...
OKAY [ 0.016s]
sending 'system' (529061 KB)...
OKAY [ 63.393s]
writing 'system'...
OKAY [ 23.749s]
erasing 'userdata'...
OKAY [ 0.047s]
sending 'userdata' (137527 KB)...
OKAY [ 16.431s]
writing 'userdata'...
OKAY [ 6.250s]
erasing 'cache'...
OKAY [ 0.031s]
sending 'cache' (9052 KB)...
OKAY [ 1.089s]
writing 'cache'...
OKAY [ 0.434s]
rebooting...

finished. total time: 113.593s

any help greatly appreciated.
 

kiup

New member
Jul 23, 2016
1
0
0
Visit site
I wanted to personally thank you for these instructions. My device was stuck in a boot loop. Asus ME370TG aka "tilapia" aka "nakasig."

I power off the device. Wait 2 seconds, then hold power and volume-down for 2 seconds. That will bring you to the recovery menu. At the recovery menu I tried to clear cache and reset device, did not work. Brought me to a continuous boot loop with a red dead android bot.

Went back into recovery, plugged in the usb cable and did the following...

Note: you can test to make sure the device is detected using "adb fastboot"
The first five cables i used did not support adb (they were missing a gold pin on the microusb side) .... that was frustrating.. even the expensive gold plated 9to5 cable i had did not support it.. the original charging cable from my oneplusone worked great...

I used a macbook pro with adb and fastboot from Android Studio. The original flash-all.sh did not work and gave me errors loading files.

I used your instructions (including the radio flashing) and it worked in minutes without flaw.

I downloaded original firmware zip per my device from the Asus/google/android support website (340mb)

I went to Android 5.0.1, randomly, i could have chosen a different version.

Note: make sure to choose the correct firmware 2012(no camera on back) vs 2013(camera on back) AND wifi only or mobile. The files are very different and can permanently brick your device. Again. MAKE SURE TO USE THE RIGHT FIRMWARE DOWNLOAD. My device was a 2012, cellular mobile =" nakasig "

Previously i attempted factory restore, twrp, and the wugfresh tool to no avail. All brought me to a boot loop with a weird X..

Your method was flawless.

Note: the oem lock and unlock is what saved my device. Initiating the lock and then unlocking the bootloader reset some magic parameter that brought my device back to life.

Where, how and when can I buy this OP a beer. Just lemme know where, I owe you.. this just fixed 6 tablets....
 

Smelter_uk

New member
Sep 4, 2016
2
0
0
Visit site
MAKE SURE TO USE THE RIGHT FIRMWARE - But which one?

I get as far as "checking product... Failed", Device product is 'grouper'. Update requires 'deb'.
On the page 'https://developers.google.com/android/nexus/drivers' it states "Nexus 7 (Wi-Fi) ("grouper") bianaries Android 4.1.2 (JZO54K and (JZO54L)
On the page 'https://developers.google.com/android/nexus/images' the only match for 4.1.2 (JZO54K) is for "nakasi"
I had not planned to go that far back as I only want to get back to KitKat 4.2.2 for my 2012 model.

After failing, I currently have a 'vanilla' 5.1.1 which has picked up my bookmarks in chrome ok, so it is not a brick, but I still have the question, which one should I be using?
 

dtoth99

New member
Sep 6, 2016
1
0
0
Visit site
Greetings. Like several others throughout this thread, Step 7 Failed, because Bootloader is locked. So then I trued step 9, fastboot Oem unlock which I get the Unlock Bootloader screen on the N7 device itself, select Yes to unlock, the PC indicates erasing user data and cache, but says FAILED when unlocking. Unknown error code. So I need to unlock Bootloader for this to work for me, but I am unable to do the unlock. I've tried different USB ports, but that did not help. One post a few years back said it might be a hardware issue and that I'm out of luck. Any ideas to help me? I went thru the whole thread so my apologies if I missed a posted solution. Thanks...
 

Jheanne Dee

New member
Sep 30, 2016
1
0
0
Visit site
i cant seems to unlock my bootloader

whenever i type it...the cmd prompt says...

boot loader ....unlocking...
FAILED: remote: unknown error code

pls help
 

matryc

New member
Oct 10, 2013
2
0
0
Visit site
Hi.

I got it finally sorted.

I was unable to flash bootloader to version 4.23 (bootloader-grouper, MD5: df53028033c9eccf4fe5ba7bc198ce24)
every time: fastboot flash bootloader bootloader-grouper-4.23.img
I got:
FAILED (remote" (BadParameter))

I was stuck at v. 4.13.

The 100% solution is:
Retrive blob.bin from your nexus. It can be made using flatline-recovery.
AndroidRoot.Mobi - Tegra3 Guide: nvflash NEXUS 7 (and Transformer Jellybeans)

It's easy and can be made in 8 steps:
1. first flash recovery "fastboot flash recovery flatline_device.img"
2. reboot to flatline recovery and follow advanced - wheelie - step 1
3. reboot to flatline (if there's no flatline, than flash again) and advanced - wheelie - step 2.
4. copy your blob.bin from device: adb pull /data/media/AndroidRoot (follow path which is showed on your device display)
5. now when you have blob.bin copied, go ahead and put your nexus into APX mode.
More info: http://forum.xda-developers.com/showthread.php?t=2034866
For me, the easiest way was:
"7. Another way:- Provided by daws
Power off the tablet and don't touch the power button again.
Connect USB cable to tablet but not to PC yet.
Press volume up and then connect USB cable to PC.
Wait a few seconds before releasing volume up button.
You should now be in APX mode."
6. Now install APX drivers (drivers provided at androidroot.mobi didn't work for me)
working drivers: Android Forums: [TUTORIAL] How to unbrick Nexus 7 using NvFlash
You will probably need to disable driver signing in windows:
https://learn.sparkfun.com/tutorials/disabling-driver-signature-on-windows-8/disabling-signed-driver-enforcement-on-windows-8

7. Boot nexus with: wheelie --blob blob.bin
8. Flash bootloader with: nvflash -r --download 4 bootloader-grouper-4.23.img
Wait few seconds, nexus will reboot.

Sorted.

Log included:

D:\New folder\nvflash - Copy>wheelie --blob blob.bin
Wheelie 0.1 - Preflight for nvflash.
Copyright (c) 2011-2012 androidroot.mobi
========================================

Waiting for device in APX mode...
[=] Chip UID: 0x1XXXXXXXXX
[=] RCM Version: 0x30001

[=] CPU Model: Tegra 3
[+] Sending bootloader...
Sending file: 100 %
[!] Done - your device should now be ready for nvflash

D:\New folder\nvflash - Copy>nvflash -r --download 4 bootloader-grouper-4.23.img

Nvflash v1.13.87205 started
[resume mode]
sending file: bootloader-grouper-4.23.img
- 2150992/2150992 bytes sent
bootloader-grouper-4.23.img sent successfully
 

Forum statistics

Threads
943,146
Messages
6,917,509
Members
3,158,842
Latest member
Sleezzyy21