[Nexus 7 (2013) Q&A] SomeSauce:
Hi, first off, I'm totally new to Nexus 7 tinkering, my device is entirely stock; anyway, I couldn't get MiFlash to flash correctly, but first let me explain how I got there:

I finally received my wireless charger for my N7, because the USB port wasn't working. I powered up my N7 2013 16GB Hynix, 4 months after it was constantly off... And the screen didn't turn on... The excitement to use my tablet back again was just gone.

After tons of research, I found that my device was recognized as a QDLoad, and, after installing drivers, it was in 9006 mode luckily!

I proceeded to use a linux machine, plugged in my tablet, and fortunately I had access to my eMMC storage, I backed up the aboot(b), boot, persist, radio, rpm(b), sbl(1/2/3)(b), tz(b) partitions, as well as my most important data from the userdata partition (media and the /data/app folder of all users, containing all the app data, my game saves are intact!). Besides, I noticed some strange I/O errors in dmesg while copying files. That doesn't smell good, but 99% of the files seemed OK.

Then, I wanted to try out something: flash the aboot, abootb, boot (HUGE MISTAKE!!!!), sbl(2/3)(b) partitions from a working N7 using dd... Did that, and guess what? IT WORKED! And it even unlocked my bootloader! But... it was stuck in a bootloop. Crap. I'm sure it wouldn't bootloop if I hadn't replaced the "boot" partition.

The USB port decided to not work anymore for some reason. I bought a replacement daughterboard from Aliexpress, put it in my tablet. USB now worked great!

I now had access to fastboot, so I flashed TWRP and ran it successfully. Of course, this wouldn't be fun without another problem: the touchscreen is not responsive. I tried to reseat the large silver cable multiple times, but it didn't work. I decided to live with it and do what I could. By the way, I tried to use a OTG adapter to use an USB mouse with TWRP, it didn't work.

Using TWRP and adb shell, I decided to try to repair my device using what I considered "the safest route for keeping my data": adb sideload. So that's what I did, using Google's official ota MOB30X.

Result of that sideload: a catastrophic failure. My tablet was stuck on the "patching system image unconditionally" for over 4 hours without any signs of progress. I rebooted the tablet... Back to the initial problem, except that it's even worse, now in the 9008 mode!

Morality: always do a clean install, sometimes your personal data is not worth your device. Learned that the hard way, I guess?

~​

Anyway, before putting my tablet in the wonderful museum of devices I stupidly broke, I tried the last resort: MiFlash. Actually, this should've been the first thing to do, but I was way too attached to my data that I became insanely dumb. Also, this is giving me a disproportionate amount of anxiety everyday and it even prevent me from sleeping correctly, wow.

I followed the instructions given there, using multiple devices:

Laptop: A windows 7 x64 laptop

PC: A windows 10 x64 PC

And here are my multiple attempts:

I tried to run MiFlash (the given version) on the Laptop, it ran, and got stuck with "WriteFile position 0000000000000000, size 0", I let it do its work for a little while, and it just crashed! While leaving behind its shameful death a 2GB log, filled with "WriteFile position 0000000000000000, size 0" lines. Unfortunately, I can't send the log right now, as I don't have access to the Laptop.

I tried to run it on the PC, no USB issues and the devices is recognized correctly. That's some great signs, will my tablet come back to life? Of course not, it stops with various errors, there is either "Reached the end of file", "Unspecified error" or even "The specified service does not exist" combined with "receiving hello packet", "Send configure command", "Send nop command" or "Send parameters command". Of course, I tried to try other USB ports, restart my computer, restart my tablet with the two volume buttons pushed, etc. But no dice. I attached all the logs related to my attempts in this post.

Then I tried to run it again on the Laptop, and it's essentially the same problems as with the PC.

I will try tomorrow to use a Win 10 PE x86 with admin account, because it worked for n7br.

Maybe that the eMMC just reached its end of life? I don't know, and it seems unlikely. But at this point it's really hard to keep hope. Nonetheless, although it cost my tablet (and a replacement daughterboard), it's was a fun adventure and I learned a TON about Android's internals, flashing, fastboot, repairing a N7, and Qualcomm internals as well. My N7 was crazy slow anyway, it's time for it to retire and let its successor I chose (the Lenovo Tab M8, cheap, almost stock Android, ok perfs, perfect for what I need!). Although, it's kind of frustrating to give efforts over 3 months on fixing a tablet that ends up hard bricked. Whatever, **** happens.

But, I don't really want it to die now, see, there are others solutions, and I'm asking for your help so I don't make stupid self-taught beginner mistakes again. If I still cannot get MiFlash to work despite your precious advice, there are some alternative dangerous last-resort solutions I found:

https://github.com/jareddantis/unbrick_8960

QFIL

Please let me know what you think of these, and if it might work correctly with the N7. By the way, I learned the lesson and I don't care about my data anymore. Just make the damn thing work!

Thanks a ton.

Note about the logs: I did my best to convert them to UTF8 and translate them from French to English.