[Nexus 7 (2013) Q&A] jackkill:
This practical solution I wanted to share here after i couldn't find a solution online is for Nexus 7 devices that can boot into Fastboot. If your device can't boot into fast boot anymore try this solution by K23m from here. And if your device have instead a faulty eMMC that might need replacement or else check here instead.

My Nexus 7 2013 16gb with Toshiba eMMC got stuck on a boot loop two days ago. I used twrp recovery to wipe it all, refresh lineage os or stock ota, yet i couldn't get past the boot loop. Ill spill the beans early here, It fixed and it needed me to zero out all the free space of the eMMC. as soon as i did that i got back to a 100% reliability and fast speeds like the first time i bought it.

But first was how to boot into a working android image to download and run the zeroing utility. The only working image i could run was the old Factory image "razor-jss15j-factory-2e08b83b.tgz" you can google it but ill provide this mirror link just in case it disappears.

I believe that my problem was that i had little space left and it got corrupted in some way maybe because of bad Trim process. in any case the following old factory image is small and have the highest (only?) chance to boot once and allow to reset the empty space values int he eMMC.

I started by following the process under fast boot:

fastboot devices

fastboot oem unlock

fastboot flash bootloader bootloader-flo-flo-03.14.img

fastboot reboot-bootloader

ping -n 5 127.0.0.1 >nul

fastboot -w update image-razor-jss15j.zip

Try booting 4 times if it doesn't work add this step before:

Download the great restore script and files from "[TOOL] 06/22/14 One Click Factory Restore 4.4.4 KTU84P (dead or alive)" here at XDA and download the "Nexus7_2013_KTU84P_Restore.zip WIFI Flo" if you're like me or the other corresponding image for your Nexus 7 version.

First copy the files of the razor-jss15j-factory from the compressed archive inside the same folder as the restore archive and

Run these fast boot commands from within:

fastboot devices

fastboot oem unlock

fastboot flash bootloader bootloader-flo-flo-03.14.img

fastboot reboot-bootloader

ping -n 5 127.0.0.1 >nul

fastboot flash system system.img

fastboot flash recovery twrp-3.2.1-0-flo.img

fastboot flash cache cache.img

fastboot flash userdata userdata.img

fastboot flash boot boot.img

fastboot -w

fastboot -w update image-razor-jss15j.zip

fastboot flash boot boot.img

fastboot reboot

Try booting 4 times with at least one switched off period of 20mn in between till you boot in. ( it is random and its not guaranteed it will work for you like i did for me)

I know some command are redundant and might make you think its stupid to do so but believe me when i say i spent 2 days non stop trying everything i can short of opening the device to heat gun the eMMC chip :eek:

These are the last steps i took to finally boot in and i repeated the process as i tried the first time to flash newer images in the hope they will boot too but to no avail.

Now that you booted in the old android version first go to the App Store and download a free zeroing app like" Secure Eraser " by Giuseppe Romano from the app store. after you run it twice, you can reinstall lineage os or your favourite stock version and be relieved.

I hope this amateurish post help you not discard too early your beloved Nexus 7 tablet. its only worth for me is manga reading and youtube sometimes, and for that its a wonder.