[Nexus 7 Q&A, Help & Troubleshooting] thesambassador:
Hi, this forum seems pretty active, which is exciting! Hopefully someone can help me out here. I have searched a bunch and see a lot of similar things to my problem, but I'm running into issues that aren't really described by anything else I am looking at.

Quick background

The device is a 2013 Nexus 7, Wi-Fi version. I never unlocked/rooted the device, so it was basically factory settings. On Thursday everything was working fine. Later that day, it started showing the message "unfortunately the process google.process.gapps has stopped" as soon as I unlocked, even after rebooting. I was not launching any apps. I could navigate for about 1 second every time I hit "OK" on the error before it popped back up, so I tried all the fixes I had found online for the problem (clearing app cache/preferences, disabling/enabling download manager, etc). I decided just to wipe the device and reset from factory defaults. I wasn't confident in the Factory Reset working correctly while the error kept popping up, so I booted into Recovery Mode and just decided to do the Factory Reset from there.

The reset seemed to freeze, but eventually the device rebooted and I got the text "erasing" with the animated robot. This will stay that way for forever, though sometimes it eventually turns into the android icon with the red exclamation mark.

The current problem

Right now, if I boot the device normally, it will show the google logo, then go into "Erasing", which animates. If I hit Power+volume up, it seems to be "erasing /data" but it never gets further than that. If I turn it off, it will turn itself back on and go back to erasing. I have left it on for 14+ hours and it never progresses, other than the times it sometimes stops showing "Erasing" and instead just goes to the red exclamation mark.

I can get to the bootloader menu by holding volume down+power. If I select recovery mode, it shows the Android animating logo (no text) and if I hit Power+Volume Up it shows "Formatting /data..." in the bottom. Eventually this fails and recovery mode will pop up with the following text at the bottom:

Formatting /data...
E:failed to mount /cache (Invalid Argument)
Formatting /cache....
E:failed to mount /cache (Invalid Argument)
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/log
E:failed to mount /cache (Invalid Argument)
E:Can't mount /cache/recovery/last_log
E:Can't open /cache/recovery/last_log
etc for last_install, last_kmsg, log, and then repeated all again 1 more time
E:Failed closing /dev/block/platform/msm_sdcc.l/by-name/misc (I/O error)
E:Failed to mount /cache (Invalid argument)

If I select "Factory reset/wipe" now, it shows the following:

--Wiping data...
Formatting /data...
then all of the above errors again

I tried downloading and installing the Nexus Root Toolkit and running the "Flash Stock + Unroot" iwth the "Soft-bricked/bootloop" option, but all it seems to do is restart the device a bunch of times and then get stuck on "erasing 'userdata'...

Flash Stock + Unroot...
--------------------------------------------------

sending 'bootloader' (3911 KB)...
FAILED (remote: Bootloader is locked.)
finished. total time: 0.008s
rebooting into bootloader...
OKAY [ 0.006s]
finished. total time: 0.007s

sending 'boot' (7256 KB)...
FAILED (remote: Bootloader is locked.)
finished. total time: 0.008s
rebooting into bootloader...
OKAY [ 0.007s]
finished. total time: 0.008s

erasing 'cache'...
OKAY [ 0.145s]
sending 'cache' (4664 KB)...
FAILED (remote: Bootloader is locked.)
finished. total time: 0.153s
rebooting into bootloader...
OKAY [ 0.007s]
finished. total time: 0.008s

sending 'recovery' (7860 KB)...
FAILED (remote: Bootloader is locked.)
finished. total time: 0.007s
rebooting into bootloader...
OKAY [ 0.007s]
finished. total time: 0.008s

erasing 'system'...
OKAY [ 0.732s]
sending 'system' (822754 KB)...
FAILED (remote: Bootloader is locked.)
finished. total time: 0.740s
rebooting into bootloader...
OKAY [ 0.007s]
finished. total time: 0.008s

erasing 'userdata'...

Any suggestions on how I might be able to repair my device? It seems completely screwed up, I have no experience with the flashing/bootloading stuff.

Thanks!