[Nexus 7 Q&A, Help & Troubleshooting] Yoqui:
The first part of this story is a little convoluted, so I'll start with my current situation and then start from the beginning.

I have a Nexus 7 WiFi tablet. I wanted a completely clean, back to factory reset. I followed the instructions here:

http://forums.androidcentral.com/ne...1477-guide-nexus-7-factory-image-restore.html

When I get to step 7 I get FAILED (command write failed (Invalid argument))

When I try to carry on past step 7 I continue to get FAILED messages. Screenshot below. Please note that I renamed bootloader-grouper-4.18.img to recovery.img for this attempt.

I have been Googling all afternoon to try to get past this but have not found a solution.

The longer, messy story. After I installed the 4.2.2 update everything seemed fine until one app, I think it was SD Maid, complained that it was lacking permissions. A bit of poking around revealed that SuperSU didn't seem to have permissions either and was giving the dreaded binaries error. Apparently 4.2.2 had removed the rooting. I waited until Nexus Root Toolkit v1.6.3 was released so it would have the right goodies for dealing with 4.2.2. Today I downloaded it and went to work.

Before I began anything with the toolkit the tablet was already showing as Unlocked. I applied the Root through the Toolkit and for some reason it would not apply. I installed Root Checker from the Play store and it confirmed that the tablet was not Rooted. I wasn't getting error messages during the procedure. I tried Googling this but didn't find anything that appeared to match my problem.

I next did a Factory Reset. When the tablet was done reloading it recovered all of my apps from backups saved to the Google servers. Still no root, still unrootable. So I do a Factory Reset but instruct it to not recover the backups. Still can't root the tablet.

At this point I'm thinking it's time to go back to a clean start instead of trying to fight the software. I'm picturing this as being like dealing with my desktop pc - no matter how bad things get I can always wipe the drive and reinstall Windows.

I next try Flash Stock + Unroot from the Nexus Root Toolkit. It appears to go smoothly and doesn't throw any errors, EXCEPT when the Toolkit says the tablet is rebooting out of fastboot mode and that the tablet may behave like it's stuck in a bootloop, the tablet just sits in fastboot mode.

So I next try the Android Central Forums link that I posted above. Maybe if I do it myself instead of using automation I'll be able to see what the problems are. As mentioned, everything goes fine until Step 7.

Other info...

This is the information that is currently displayed in the bootloader:

FASTBOOT MODE

PRODUCT NAME - grouper

VARIANT - grouper

HW VERSION - ER3

BOOTLOADER VERSION - 4.18

BASEBAND VERSION - N/A

SERIAL NUMBER - something tells me I should post this here :)

SIGNING - not defined yet

LOCK STATE - UNLOCKED

Since product name, varient and bootloader version all seem to stem from the bootloader-grouper-4.18.img file, does this mean that the attempt to apply the image through fastboot actually succeeded despite the FAILED message?

Also, while in the bootloader, if I try to select Recovery Mode I get, "Booting failed" up where the notification bar would be. I'm interpreting that as meaning that I have in fact wiped (or at least rendered unusable) the OS.

At the bottom of the image above you can see where I tried Step 8. It is followed by the messages that the archive does not contain boot.sig, recovery.sig and system.sig. When I open image-nakasi-jdq39.zip using WinRAR I find this:

The files seem to be there but with .img extensions. What is going on?

I'm putting my efforts on hold while waiting for some feedback in this thread. To be clear; I am 100% fine and happy to wipe the tablet and install 4.2.0 or 4.2.1 or whatever else and then upgrade through the Play store. I just want my Nexus 7 working again, rooted and unlocked and I'll be smiling and back to business as usual. :)