yashsingh1/xdaforums huggingface dataset:
[Nexus 7 (2013) Q&A] k23m:
Hello SomeSauce, there are 3 possible reasons for the errors:

flashing app and OS environment

N7 hardware problem

N7 eMMC fault

Let's review them.

#1

MiFlash 2014 has never failed me in both x86 and x64 environments but you could try a newer version, eg MiPhone20160401, not the latest ones though as they have switched to a different flashing protocol in the new generation of devices. You had inspired me to check out "unbrick_8960" but as you can see there is a compatibility issue with the Linux script. Nevertheless try it out yourself, there is nothing to lose. Finally, no matter what the app/OS, it always comes down to delivering the two exact files to the device: MPRG8064.hex and 8064_msimage.mbn - there is no other way to initialize the eMMC in-circuit (except for JTAG).

I note that you have another N7, so if you feel brave then you could verify the app/OS flashing process on the good working unit.

#2

You did mention that the N7 was off for several months and it is possible its battery is faulty now (discharged below 3.0V threshold and irreversibly deteriorated). In this case the entire power supply during flashing is delivered via USB only. If it is not enough (USB port specs, cable length, etc) errors will occur. I confirm that MiFlash works OK with the battery disconnected, however I did it on a USB3 port (min 0.8A) and a very short, good quality USB cable.

#3

"patching system image unconditionally for over 4 hours" - "Maybe that the eMMC just reached its end of life?"

Yes, this scenario appears to be increasingly likely. Your 16GB eMMC has a low TBW rating and it was probably killed by constant NAND re-writing during the prolonged patching episode.
[Nexus 7 (2013) Q&A] SomeSauce:
Hi, thanks for your response, and indeed scenario 3 seems unfortunately likely. I don't have another N7 though, maybe that I could just buy another N7 2013 motherboard and replace it, but, to be honest, that would just be money wasted as I could just buy a much newer tablet with better capacities. Maybe I'll do that one time just for fun!

Concerning the battery, I don't think that's the problem, my tablet was "patching system image" for over 4 hours on battery. It ended up with around 40% IIRC.

I'll try running MiPhone20160401, and if it doesn't work, the last resort unbrick_8960 on a Linux machine. And if that doesn't work... Maybe try QPST tools? ...Or just accept that my N7's EMMC is dead lol.

Though I'm still wondering... why was TWRP constantly writing while patching the system image? Couldn't it just... stop?
[Nexus 7 (2013) Q&A] SomeSauce:
...Looks like it is dead. I used a COM port sniffer that works, flashing using MiPhone20160401 and I read the following: "Write unsuccessful." That's sad. I'll try to unplug and plug the battery to see if it makes any difference, but I doubt it will actually no, it's useless. RIP Nexus 7, or at least, the Hynix 16GB eMMC chip.

Since the eMMC seems to be dead anyway and that the only solution would be to replace the motherboard, I'll use this device as a playground for Qualcomm flashing, I'll try many tools just for fun and discovery.

Thanks for the huge help though!
[Nexus 7 (2013) Q&A] arkady789:
I have Nexus 7 (2013), the idea was to install Android 11 via 'lineage-18.1-20210407-UNOFFICIAL-flo.zip', however some place soomething went wrong. My TWPR show all system, etc as zero. When I follow any giude via fastboot -w update image-razor-lmy48i.zip it cannot proceed - I am getting

archive does not contain 'dtbo.img'

archive does not contain 'dt.img'

extracting recovery.img (7 MB) to disk... took 0.016s

archive does not contain 'recovery.sig'

Sending 'recovery' (7860 KB) OKAY [ 0.256s]

Writing 'recovery' FAILED (remote: 'partition table doesn't exist')

fastboot: error: Command failed.

When I click reboot it comes to the black screen with white "Google' in the center and open lock on the bottom.

Any ideas if I can save this device?
[Nexus 7 (2013) Q&A] k23m:
Yes:

get CROSS - Custom ROM Scripted Setup

run

repartition.bat

select: ultimate

reboot

install LOS18

If error, run relog.bat and attach "relog-xxxxxx.zip" to your post

and run RESTOCK with "restore original partitions" YES
[Nexus 7 (2013) Q&A] arkady789:
Great, works, thank you for fast and Correct reply.
[Nexus 7 (2013) Q&A] Kaar3l:
I have the 128GB EMMC 5.1 flo device. I was running latest stock image. Now I wanted to upgrade to lineage 18.1. So I tried the CROSS script. It did something but I cannot install rom with the twrp that is for flox device. I think it might be issue with the 5.1 EMMC.

How could I compile flox twrp that would support emmc 5.1?

Do I also need to patch and recompile lineage?
[Nexus 7 (2013) Q&A] k23m:
Both TWRP and ROM kernels need the eMMC patch. They should support it by now, it is a very old issue. Ask the devs to re-compile the kernels. A really trivial change is required, a simple 1-byte mod.
[Nexus 7 (2013) Q&A] Kaar3l:
Thanks!

I tried to compile kernel but failed on the first go.

Then I cleaned everything and tried to build again and success.

I will describe what I did:

1) Installed with RESTOCK stock image. Then flashed emmc 5.1 kernel that is available in this thread. Verified that everything is working. I used the modified twrp that is available here. (twrp-3.3.1-0-flo-k2.img)

2) Then I used CROSS as I needed bigger partitions for Lineage 18.1. When using cross I used lineage-install-3-flox.bat and I didn't want the CROSS to reflash my twrp that was working with eMMC 5.1.

3) I compiled kernel and swapped out the boot.img from lineage-18.1-20210712-nightly-flox-signed.zip. As I had twrp for flo I had to change the flashing script from flox->flo, so it could flash.

4) Flashed the modded lineage. And it booted.

So the 128GB Nexus 7 with eMMC 5.1 and bigger partitions is working.
[Nexus 7 (2013) Q&A] jhford:
This board is not the same as my deb boards. Is this a flo board?
[Nexus 7 (2013) Q&A] jhford:
@Kaar31. Wow. I'm impressed. Apparently you have a flo, but I have 3 debs. Would it be feasible for you to modify your step-by-step, above, so that I can upgrade my debs to 128GB, also? Much appreciated.
[Nexus 7 (2013) Q&A] jhford:
I just rebuilt the software for my N7 2013 deb. I was all finished the way I wanted inclukding followmis's excellent LOS 18.1 Rom, but it noticed that Magisk v.23 was apparently not installed, even though I was pretty certain that I had flashed it, also. So, I booted back into recovery (TWRP 3.4.0-0) and flashed Magisk, but the device continuously bootlooped on the Google flash screen. I hate to start all over from scratch. Can anyone help?

Thanks
[Nexus 7 (2013) Q&A] ipdev:
Flash the lineage 18.1 boot image from the ROM zip.

Unzip the lineage zip file and you will find the boot.img file.

You can flash it using fastboot or install it using TWRP's option to installl image files.

That should get you out of the bootloop.

Fixing Magisk is OT for this thread. ;)

Cheers. :cowboy:
[Nexus 7 (2013) Q&A] ZiAndoid:
Sorry guys noob here!

I am trying to fix my Nexus 7, and after alot of effort I have established that I have a faulty eMMc IC. I have found a cheap replacement FBGA 153. However one step I am not sure of is that will I still need the JTAG Box or can I just solder the blank eMMc and update it using RESTOCK.

Sorry if I have missed something which makes my query seem daft! This was all new to me 2 days ago...
[Nexus 7 (2013) Q&A] k23m:
Hi, after soldering a blank eMMC follow the Nexus 7 2013 Unbricking Guide .
[Nexus 7 (2013) Q&A] MirtaX:
Hi there, have you isp location for ME571KL or schematic motherboard? Thanks
[Nexus 7 (2013) Q&A] underflash:
Hey, I have used flo-deb_clamor_repartition_20201203 and then installed official Android 11 LineageOS 18.1-flox without any problems from stock ROM. Device started lagging terribly, some apps take ages to open, a lot not responding messages, tablet literally unusable. eMMC is HYNIX HBG4e // 31GB MAY 2013, I have formated and wipe it 4-5 times without any errors. Also tried limiting background processes to 4 and used fstrim.bat from CROSS 2.5. No significant change.

The only idea comes to my mind is repartition to make system partition bigger, now it is 1.4GB with 290MB free. Any other solution?
[Nexus 7 (2013) Q&A] k23m:
Hello, try the following.

1. RESTOCK restore original partitions and verify N7 performance. If all OK...

2. CROSS flox with sysrepart-ultimate and default gapps

Unless you're sure of a hardware issue, reply in CROSS' thread.
[Nexus 7 (2013) Q&A] telep:
Hi i have tried to use clamor repartition script, and in that process tablet got disconnected from pc, i restarted tablet, but it won't boot. I've tried to use restock but it can't write it gives error failed, i can boot to bootloader. Is there any software fix or i must change emmc?
[Nexus 7 (2013) Q&A] k23m:
Hi, double-check it with Fastboot Diagnostics and if confirmed, replace eMMC.
[Nexus 7 (2013) Q&A] telep:
i got this, second screenshot is from relog if it helps
[Nexus 7 (2013) Q&A] k23m:
Please post a

getlog.ba

t log as text, not image. Also if possible, retry

relog.bat

from a different PC.
[Nexus 7 (2013) Q&A] telep:
I tried everything yesterday and it wouldn't work. This morning i tried and restock went thru first time.
[Nexus 7 (2013) Q&A] jhford:
I can't seem to download MiFlash. Solution?
[Nexus 7 (2013) Q&A] jhford:
Please ignore. I found it at the Xiaomi website.
[Nexus 7 (2013) Q&A] Meins321:
Is it possible to solder a Sandisk 64GB eMMC to the board and the current install scripts from linage os will run the partition to the limit of the emmc?

Following chip is still available in 2024..

SDINBDG4-64G-I1​
[Nexus 7 (2013) Q&A] echow2001:
Yes I did that with a different 64emmc works fine have to edit the repartition script a lil though
[Nexus 7 (2013) Q&A] C5Longhorn:
It was flashed with Lollipop 5.1, a fairly recent build (Jan I think). It's definitely a different tab. I don't know if there is a way to tell if it's a refurb or not but I would assume it is. Either way, it looks and feels like a new tablet. Turn around time was less than a week.
[Nexus 7 (2013) Q&A] micl9:
Here is the data from my dead 32GB N7 (no charging, no blinking LEDs, QHSUSB_DLOAD when plugged into PC).

Dead Nexus date of mfg 6/2013

Memory is Kingston

I forgot to take a pic of the chip before putting it back in the now spare parts N7. If you really need it I can take it apart again. But I assume its going to be just prior to tablet date of mfg as below.

Mobo donor N7 date of mfg is also 6/2013 (God, I love Craigslist!)

Memory is Hynix - HAG2e - 16GB - May 2013

Both are Rev E HDW
[Nexus 7 (2013) Q&A] k23m:
Thank you for this comprehensive report! Stats updated.

If the spare parts N7 is more-or-less complete, then could you try to download the bricked device's CODERAM? ("diagnostics" on front page) We only need the motherboard, daughterboard, MB-DB cable, vol/power buttons assembly and maybe the battery. QHSUSB_DLOAD 9008 mode works definitely w/o battery but we'd try switching to 9006.
[Nexus 7 (2013) Q&A] k23m:
Hello Tmzdroid, may I ask you to help us out in Kingston diagnostics? Would you be able to run: adb shell head /sys/block/mmcblk0/device/* > emmc.txt in OS or TWRP and attach the

emmc.txt

here?

I attached my Hynix.

Among other things I'd like to examine the CSD register's PERM_WRITE_PROTECT and TMP_WRITE_PROTECT data in bricked units, but I need it first from a working Kingston.

Thank you in advance.
[Nexus 7 (2013) Q&A] Tmzdroid:
Yes sure what would be the best/easiest way of getting this data (I might need a quick walkthrough) I'm a bit busy for a couple of hours but will do it ASAP.
[Nexus 7 (2013) Q&A] k23m:
Great. I think you mentioned NRT before and if it is still installed on your system then you already have ADB. Go to the NRT\data folder and open command prompt there. If you type "adb"[enter] it should respond with a list of options. Now boot your N7 to TWRP and connect it to PC, then copy and paste the following into the command prompt window:

adb shell head /sys/block/mmcblk0/device/* > emmc.txt

When you press [Enter] a new file named "emmc.txt" will be created in the NRT\data folder. If it is similar to the one I posted, then please attach it here.
[Nexus 7 (2013) Q&A] k23m:
If you prefer a fully scripted solution then:

copy the attached zip file to a flash drive

connect OTG adapter with the flash drive

boot TWRP

"Install" the zip

"emmc.txt" is now saved in the root folder of your flash drive.
[Nexus 7 (2013) Q&A] k23m:
From the other post...

These are normal and OK. The problem is with flash memory - eMMC, note your log:

<3>[ 3.143951] mmc0: error -22 whilst initialising MMC card

Compare it to my (OK) log:

<6>[ 7.487792] mmc0: new HS200 MMC card at address 0001
<6>[ 7.489013] mmcblk0: mmc0:0001 HBG4e 29.1 GiB

Let's continue on my thread dedicated to this issue.
[Nexus 7 (2013) Q&A] consumer61:
Ok I've read this thread and have a general understanding but do not have the level of Droid tech knowledge as yourself and some of the posters.

This is a 2013 Nexus 7, built in Mar 2015, so has rev 1.6 mb. It has the Toshiba chip. Somewhere I had found a diagram showing the chip outlined in purple, and definitely Toshiba 16gb. Contrary to the norm, I was able to get away with installing another rev 1.4 MB and everything worked fine. Normally you have to match versions with the charge board, but this one seemed to work fine.

And it turns out you are the one selling the MB on ebay that I had referred to lol!. You are not that far away from me, and I was thinking of buying a 1.6 board off that listing if you had any. I will absolutely NOT sell a tablet to a stranger unless I am sure it is 100%, so am not real happy to mix the 1.4 and 1.6 boards.

Off to bed for now. If there are any other diags you would like me to run, feel free to ask. Alternatively, I have no objection to mailing you this board for you to personally play with for yourself, especially if you happen to have another rev 1.6 either 16 or 32gb.
[Nexus 7 (2013) Q&A] k23m:
Are you absolutely sure the dmesg is from N7 with a Toshiba eMMC?

Can you please check if this MB rev 1.6 still reports

version-hardware: rev_e

?

Have a look at the text in fastboot mode or run fastboot getvar all for even more info.

No, it's not my listing and I am far, far down under - this is my ebay.com.au. I only added the link as an example of cheap MB replacement. If you know a cheaper option I will gladly replace the link. Mailing it to me would cost more than the replacement MB unfortunately.

I will prepare a diagnostic script to pull more logs from this tablet automatically.
[Nexus 7 (2013) Q&A] k23m:
Thank you in advance. Please download the 3 files to Wug's data folder. BAT files you know from DOS,

diag2.img

is a mod of TWRP which I made for diagnostic tests, it does not mount any files systems and there should be few if any errors on your bricked device. It also always activates UART regardless of bootloader's settings.

boot the Nexus in fastboot mode, connect it to your PC

in Wug's data folder open a DOS command window and copy/paste: fastboot boot diag2.img [Enter]

when TWRP is up and running double-click on

diag.bat

in Wug's data folder

in TWRP select reboot to bootloader (for another round of tests)

in the DOS command window and copy/paste: fastboot boot twrp-2.8.6.0-flo.img [Enter]

when TWRP is up and running double-click on

twrp.bat

in Wug's data folder

you will find

diag.txt and twrp.txt

in Wug's data folder

zip up the 2 txt files and attach them to your next post

Cheers :good:
[Nexus 7 (2013) Q&A] Tmzdroid:
Sorry for the delay heres the EMMC data from my Nexus 7
[Nexus 7 (2013) Q&A] k23m:
Awesome, thank you.

==> /sys/block/mmcblk0/device/date <==
07/1997

A bizarre date.

==> /sys/block/mmcblk0/device/date <==
05/1997

My Hynix is slightly older :silly:
[Nexus 7 (2013) Q&A] consumer61:
Oh Houston we have a problem...

Downloaded those files.

Ran the first command - fastboot boot diag2.img

Dos window reports "downloading 'boot img'"...booting.... OKAY

Result is tablet is completely frozen on fastboot screen - no TWRP, nothing. Up and down keys do nothing.

I had left it with TWRP still up from last night and rebooted to fastboot as per your instructions before typing the diag2.img command

So can't go any further with that....it really doesn't like the diag2.img file!
[Nexus 7 (2013) Q&A] k23m:
No worries. Turn it off/on and run only the second test with

twrp.bat

please.
[Nexus 7 (2013) Q&A] consumer61:
Ok second test done.

Also attaching photo of Toshiba chip.
[Nexus 7 (2013) Q&A] k23m:
You read my mind mate - I was going to ask you for a picture of the chip :laugh:

Great logs! First observation...

Kingston fails with: mmc0: error -110 whilst initialising MMC card

Toshiba fails with: mmc0: error -22 whilst initialising MMC card

Please check HW VERSION of this 2015 v1.6 mb - is it Rev E?
[Nexus 7 (2013) Q&A] consumer61:
As far as the photo you were going to ask for...what can I say, I'm Cdn, were both part of the same roots lol, and actually I have distant relatives I've never even met in Australia. Last name is Whan (Irish, before that Scots, before that English, before that-Spanish Armada - {an uncle went back 800 yrs tracing records in the 3 countries}) Supposed to be a rather famous Whan psychiatrist in Australia.

I believe this is what you want....I think this is what you mean by hardware version. Normally with hardware I would think I would be looking at the chip itself, but I think not in this case. Please see attached photo. HW rev E.
[Nexus 7 (2013) Q&A] k23m:
If we look back far enough, our ancestors were actually living together :highfive:

But look what has happened right now...

BRICKED Kingston Hynix Toshiba
----------------------------------------
graphdarnell 1
fuser-invent 1
aungmyoswe 1
marc1706 1
micl9 1
consumer61 1

...you have spoiled such perfect stats :silly:

So they release 2015 MB v1.6 yet HW Rev still stays 'E' - bizarre!
[Nexus 7 (2013) Q&A] graphdarnell:
A few days ago, I looked at an ebay listing for a MB with Hynix 16GB whose owner got it screwed up with an OTA the way we're too familiar with by now. It was real though I didn't think of taking a screen shot since it was hardly surprising to me. So the stats now look even less perfect. But your current developing tests give me the impression we're close to some conclusion. Kudos to you!
[Nexus 7 (2013) Q&A] consumer61:
Perhaps that is why the rev 1.4 motherboard I put in this one mixed with the rev 1.6 charge board worked as normal.

Normally you must match the rev numbers of the two boards. Even if they work seemingly fine at the start (which doesn't happen often in my experience), they will sometimes seem fine, or just a few tiny touchscreen quirks, but eventually you will do something that will not work right. Maybe the real culprit to that situation is the HW rev, more than the board rev.

Either way, too bad it makes the darn board toast. Outside the factory, there are few people that can obtain or replace that chip.

Also whatever it is that is making them fail, is clearly not manufacturer specific. So it is firmware making the chip fail? You have to wonder.
[Nexus 7 (2013) Q&A] k23m:
The ebay's Hynix is definitely inconclusive w/o a test. Have a look at this recent case of bricked Hynix - it was fixed and will outlive all those Kingstones ;)

How did the USB patch go?
[Nexus 7 (2013) Q&A] k23m:
You're right about the mismatch but re-calibration might help...

As for eMMC failure theories I do offer this one -- it is well known that Kingston does not manufacture flash memory, they buy and repackage or rebrand it. Perhaps it was Toshiba that supplied the defective chips :laugh:
[Nexus 7 (2013) Q&A] graphdarnell:
I soldered the hanging wires to a separate USB port and got the thing to charge briefly, but the pins were so flimsy they'd break off after a couple of movements in any direction (which couldn't be helped since it was hanging loosely at one end of the wires). So I ordered one soldered to a tiny plain PCB, but it'd normally take close to a month to get here. If it pans out, I can get it to work with a BT mouse perhaps. Inconvenient, but still usable. I'll report back.
[Nexus 7 (2013) Q&A] consumer61:
Well thanks very much for you help in confirming what I thought - snap that MB in half since it's too light to use as a boat anchor.
[Nexus 7 (2013) Q&A] k23m:
Please don't damage it, this MB may be useful for future software or hardware tests.
[Nexus 7 (2013) Q&A] consumer61:
Ok

Ok, I'll hang on to it.
[Nexus 7 (2013) Q&A] k20-:
My emmc is dead. Can I just replace it? If so, where can I find those online? Or do I have to replace the entire motherboard?
[Nexus 7 (2013) Q&A] k23m:
Which of the following applies to your N7:

totally dead

dead but flashes a few times the white LED next to USB port

dead but with active USB on PC device list

works up to fastboot stage

Note the repair/replace options in my first post.
[Nexus 7 (2013) Q&A] k20-:
I can get to the fastboot but that's all about it. Can't recover, non of the fastboot commands work. Basically, I couldn't write anything to flash. It's bricked for no reason. The morning before everything worked great with PureNexus rom. Last time when I turned it on, only the Google logo appeared and it just sit there forever. I tried to get to Multirom and it was stuck at the Multirom first flash screen.
[Nexus 7 (2013) Q&A] k23m:
Please fastboot-boot TWRP and let's see the hardware log:

download

twrp-2.8.6.0-flo.img

from https://dl.twrp.me/flo/ to your folder with fastboot and adb apps

boot the Nexus in fastboot mode, connect it to your PC

PC run: fastboot boot twrp-2.8.6.0-flo.img

when TWRP is up, run: adb shell dmesg > dmesg.txt

attach

dmesg.txt

to your next post
[Nexus 7 (2013) Q&A] k20-:
I accidentally locked my bootloader after trying all the fastboot options available including the command you told me (which I've already tried it numerous times before). Surprisingly, only a "fastboot oem lock" command worked and everything else won't.

D:\android-sdk\platform-tools>fastboot boot twrp-2.8.6.0-flo.img

downloading 'boot.img'...

FAILED (remote: Bootloader is locked.)

finished. total time: 0.000s

D:\android-sdk\platform-tools>fastboot oem unlock

...

(bootloader) Unlocking bootloader...

(bootloader) erasing userdata... <<====== Stuck here forever

FAILED (unknown status code)

finished. total time: 1062.101s

D:\android-sdk\platform-tools>

D:\android-sdk\platform-tools>fastboot boot bootloader-flo-flo-04.05.img

creating boot image...

creating boot image - 4007936 bytes

downloading 'boot.img'...

FAILED (command write failed (Unknown error))

finished. total time: 5.005s

D:\android-sdk\platform-tools>fastboot boot boot.img

downloading 'boot.img'...

FAILED (command write failed (Unknown error))

finished. total time: 5.010s

D:\android-sdk\platform-tools>fastboot boot recovery.img

downloading 'boot.img'...

FAILED (command write failed (Unknown error))

finished. total time: 5.011s

D:\android-sdk\platform-tools>fastboot devices

0583e60e fastboot

D:\android-sdk\platform-tools>
[Nexus 7 (2013) Q&A] k23m:
Oh no, everything is much more difficult now. Try fastboot oem uart-on but this is only a test of writeability of the 'aboot' partition.

Do you know the maker of your eMMC? Did you save dmesg log or TWRP's recovery.log in the past?
[Nexus 7 (2013) Q&A] k20-:
D:\android-sdk\platform-tools>fastboot oem uart-on

...

(bootloader) uart will be enabled after rebooting...

OKAY [ 0.131s]

finished. total time: 0.134s

D:\android-sdk\platform-tools>

No I didn't save any logs. If I did, they were all on the device internal storage and I don't know if there is a way to retrieve them.