• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[FIX][EMMC] Nexus 7 2013 ⊕ bricked, dead, frozen or stuck ⊕

Search This thread

Kaar3l

Senior Member
Oct 4, 2011
90
36
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?
 

k23m

Senior Member
Jan 3, 2016
915
515
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?

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.
 

Kaar3l

Senior Member
Oct 4, 2011
90
36
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.
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.
 

jhford

Senior Member
Quick Links

In this thread I would like to consolidate information about eMMC flash memory failures and remedies.

When flash memory fails it becomes inaccessible or unwriteable with errors like the following:

Code:
sending 'bootloader' <3911 KB>...
OKAY [ 0.202s ]
writing 'bootloader'...
FAILED <remote: flash write failure>
   or
E:can't mount /cache/recovery/last_install
E:can't open /cache/recovery/last_install
E:failed closing /dev/block/platform/msm_sdcc. 1/by-name/misc (I/O error)
E:failed to mount /cache (Invalid argument)
   or
E:Unable to find partition size for '/boot'
E:Unable to find partition size for '/recovery'
E:Unable to find partition size for '/misc'
E:Primary block device '/dev/block/platform/msm_sdcc.1/by-name/userdata' for mount point '/data' is not present!
E:Unable to mount '/data'
E:Unable to recreate /data/media folder.

   dmesg...
mmc0: error -110 whilst initialising MMC card



We observe these hardware failure symptoms:
  1. device is totally dead
  2. dead but flashes a few times the white LED next to USB port
  3. dead but with active USB on PC device list
  4. works up to fastboot stage or Google logo
  5. may slowly boot Android sometimes
  6. intermittently Android does not boot or work at all


#1 - eMMC unrelated

#2 - battery fault is most likely

#3 - catastrophic eMMC failure or GPT/bootloader damage, PC registers a new USB\VID_05C6&PID_9008 device, refer to QPST diagnostics below

#4 - partial eMMC failure or OS error, refer to fastboot diagnostics below

#5 - probably eMMC failure, unlocking and TWRP tests are required - post your logs

#6 - unlikely eMMC fault


Fastboot Diagnostics

If your bricked unit still works in fastboot mode then please do the following tests:
  1. boot the Nexus in fastboot mode (when off press power+vol.dn)
  2. connect it to your PC
  3. on PC run:
    fastboot oem gpt-info
    fastboot format cache
You can run the fastboot app from Windows or Linux...

If you get "partition[30].size 27852783 KB" then your eMMC chip is from Kingston (very high failure rate).
If the format command freezes at any stage, then the eMMC chip is faulty and needs to be replaced.
The normal format output takes only 1 second and is:
Code:
Creating filesystem with parameters:
    Size: 587202560
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 7168
    Inode size: 256
    Journal blocks: 2240
    Label:
    Blocks: 143360
    Block groups: 5
    Reserved block group size: 39
Created filesystem with 11/35840 inodes and 4616/143360 blocks
erasing 'cache'...
OKAY [  0.359s]
sending 'cache' (10984 KB)...
OKAY [  0.359s]
writing 'cache'...
OKAY [  0.484s]
finished. total time: 1.203s



QPST Diagnostics

Please upload your bricked device's memory dump for investigation. Just try the unbricking guide.

  • download "New Qualcomm 2012.rar"
  • extract the "fre" folder
  • connect your N7 to PC and when asked for a driver point it to the above folder
  • download "New_Qualcomm_QPST-2.7.422.zip"
  • extract it and run "setup.exe"
  • run Start/QPST/MemoryDebugApp.exe
  • in Memory Debug keep clicking "Browse" until you see a new COM port
  • in Memory Debug click "Get Regions"
  • in Memory Debug select and save "CODERAM.BIN"
  • upload "CODERAM.BIN" here


Repair Options
  • ASUS service - apparently they can now do it for free with paid shipping!
  • motherboard replacement - for example this one "pulled from a working unit" for $25
  • RIFF JTAG Box - while the box is not cheap it can be used for other devices too (v1 was $109). Optional tool.
  • off-circuit eMMC programming and chip replacement - it is difficult and expensive but feasible
  • in-circuit Service ROM flashing - after chip replacement or if eMMC is OK but with damaged partition table or bootloader

eMMC chip replacement
  • do not replace it with another Kingston
  • search for eMMC in FBGA 153 or 169 package
  • you can upgrade it to a higher capacity memory
  • new high-performance eMMC v5.1 requires updated software, available here


Nexus 7 2013 uses 3 brands of eMMC chips: Kingston, Hynix and Toshiba.

Kingston was initially identified as unreliable in this post a few years ago:




The above file is for RIFF JTAG flasher.



My Nexus 7 JTAG collection:

  • Asus_Nexus_7.rar
  • Asus_Nexus_7.txt
  • nexus7 jtag.jpg
  • RIFF Box JTAG GettingStarted.pdf
  • RIFF Box JTAG Manager Setup v1.56.exe



Please post your Nexus 7 2013 eMMC maker in this thread.

So far I have collected the following reports:

Code:
BRICKED         Kingston  Hynix     Toshiba
-------------------------------------------
graphdarnell    1               
fuser-invent    1               
aungmyoswe      1               
marc1706        1               
micl9           1               
consumer61                          1*
bl4cKz4cK       1
patmann03       1
CWempe          1
purian23        1
NX3             1
ali1234         1
lowridincrew    1
DaWeIII         1
HTC Tytn...     1
jaybea          1
vfrvulcan       1
TechnicsKuzya   2
barbuda         1
Snoob25         1
Dazmatic        1
459below        1
amix            1
hypochondrej    1
                                
WORKING         Kingston  Hynix     Toshiba
-------------------------------------------
fuser-invent    1               
k23m                      2     
yosmokinman               2     
Tmzdroid        1               
graphdarnell    1         2     
OrBy                                1
mydian                              1
quickdraw86               1
micl9                     1
tegodwin                  1*
noahvt                    1
Carrick Glen              1*
Axel85                    1
NTRNSTR                   1

*2015 production


To check the chip in working units use this app or dmesg:

Code:
Kingston (MMC32G)
-----------------
mmc0: new HS200 MMC card at address 0001
mmcblk0: mmc0:0001 MMC32G 28.8 GiB

Hynix (HBG4e)
-------------
mmc0: new HS200 MMC card at address 0001
mmcblk0: mmc0:0001 HBG4e 29.1 GiB

Toshiba (016G92)
----------------
mmcblk0: mmc0:0001 016G92 14.6 GiB


It is not so simple with bricked units but this device is exceptionally easy to disassemble. The chip is on the bottom of the motherboard but unlike the top, it is not covered with any shield (the purple chip).


DKDfcwe3sHZNIY3K.large



:good:
This board is not the same as my deb boards. Is this a flo board?
 

jhford

Senior Member
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.
@Karr31. 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.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    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.
    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.
  • 12
    Nexus 7 2013 Unbricking Guide

    Instructions for soft-bricked or blank/replaced eMMC. If your tablet can boot in fastboot mode, you do not need it.

    Download these files:
    Nexus 7 2013 Service ROM
    MiFlash-20141107
    "razor" Nexus 7 [2013] (Wi-Fi) 6.0.1 (MOB30X) factory image (flo), or...
    "razorg" Nexus 7 [2013] (Mobile) 6.0.1 (MOB30X) factory image (deb)
    latest Google USB Driver
    latest ADB and Fastboot Binaries (optional)

    Next...
    • unpack the service ROM
    • install MiFlash/MiPhone
    • turn on and connect N7 to PC
    • new USB\VID_05C6&PID_9008 "Qualcomm HS-USB Diagnostics 9008" device will be registered
    • if no driver is found, point it to "C:\Program Files\Xiaomi\MiPhone\Qualcomm\Driver"
    • run MiFlash
    • click Refresh, note a new device on a high COM port number, eg. I see COM20
    • click Browse and go to the service ROM folder with 28 files
    • click Flash (see attachments)
    • when flashing is finished (ignore error messages), power N7 off
    • boot it in fastboot mode (power+vol-)
    • if necessary for fastboot, install Google USB Driver
    • from the service ROM folder check for: fastboot devices
    • run "debrick-flashall.cmd" (ignore error messages)
    • if it was a blank eMMC, do this extra step using: fastboot boot twrp.img
    • flash factory image - instructions
    • run Android MOB30X once, then you can flash TWRP and a custom ROM

    2021 UPDATE:

    - Nexus 7 2013 Unbricking Guide for Windows 10 x64 - revised and simplified

    - Nexus 7 2013 Unbricking Guide for Linux and Mac OS X

    .
    7
    Quick Links

    In this thread I would like to consolidate information about eMMC flash memory failures and remedies.

    When flash memory fails it becomes inaccessible or unwriteable with errors like the following:

    Code:
    sending 'bootloader' <3911 KB>...
    OKAY [ 0.202s ]
    writing 'bootloader'...
    FAILED <remote: flash write failure>
       or
    E:can't mount /cache/recovery/last_install
    E:can't open /cache/recovery/last_install
    E:failed closing /dev/block/platform/msm_sdcc. 1/by-name/misc (I/O error)
    E:failed to mount /cache (Invalid argument)
       or
    E:Unable to find partition size for '/boot'
    E:Unable to find partition size for '/recovery'
    E:Unable to find partition size for '/misc'
    E:Primary block device '/dev/block/platform/msm_sdcc.1/by-name/userdata' for mount point '/data' is not present!
    E:Unable to mount '/data'
    E:Unable to recreate /data/media folder.
    
       dmesg...
    mmc0: error -110 whilst initialising MMC card



    We observe these hardware failure symptoms:
    1. device is totally dead
    2. dead but flashes a few times the white LED next to USB port
    3. dead but with active USB on PC device list
    4. works up to fastboot stage or Google logo
    5. may slowly boot Android sometimes
    6. intermittently Android does not boot or work at all


    #1 - eMMC unrelated

    #2 - battery fault is most likely

    #3 - catastrophic eMMC failure or GPT/bootloader damage, PC registers a new USB\VID_05C6&PID_9008 device, refer to QPST diagnostics below

    #4 - partial eMMC failure or OS error, refer to fastboot diagnostics below

    #5 - probably eMMC failure, unlocking and TWRP tests are required - post your logs

    #6 - unlikely eMMC fault


    Fastboot Diagnostics

    If your bricked unit still works in fastboot mode then please do the following tests:
    1. boot the Nexus in fastboot mode (when off press power+vol.dn)
    2. connect it to your PC
    3. on PC run:
      fastboot oem gpt-info
      fastboot format cache
    You can run the fastboot app from Windows or Linux...

    If you get "partition[30].size 27852783 KB" then your eMMC chip is from Kingston (very high failure rate).
    If the format command freezes at any stage, then the eMMC chip is faulty and needs to be replaced.
    The normal format output takes only 1 second and is:
    Code:
    Creating filesystem with parameters:
        Size: 587202560
        Block size: 4096
        Blocks per group: 32768
        Inodes per group: 7168
        Inode size: 256
        Journal blocks: 2240
        Label:
        Blocks: 143360
        Block groups: 5
        Reserved block group size: 39
    Created filesystem with 11/35840 inodes and 4616/143360 blocks
    erasing 'cache'...
    OKAY [  0.359s]
    sending 'cache' (10984 KB)...
    OKAY [  0.359s]
    writing 'cache'...
    OKAY [  0.484s]
    finished. total time: 1.203s



    QPST Diagnostics

    Please upload your bricked device's memory dump for investigation. Just try the unbricking guide.

    • download "New Qualcomm 2012.rar"
    • extract the "fre" folder
    • connect your N7 to PC and when asked for a driver point it to the above folder
    • download "New_Qualcomm_QPST-2.7.422.zip"
    • extract it and run "setup.exe"
    • run Start/QPST/MemoryDebugApp.exe
    • in Memory Debug keep clicking "Browse" until you see a new COM port
    • in Memory Debug click "Get Regions"
    • in Memory Debug select and save "CODERAM.BIN"
    • upload "CODERAM.BIN" here


    Repair Options
    • ASUS service - apparently they can now do it for free with paid shipping!
    • motherboard replacement - for example this one "pulled from a working unit" for $25
    • RIFF JTAG Box - while the box is not cheap it can be used for other devices too (v1 was $109). Optional tool.
    • off-circuit eMMC programming and chip replacement - it is difficult and expensive but feasible
    • in-circuit Service ROM flashing - after chip replacement or if eMMC is OK but with damaged partition table or bootloader

    eMMC chip replacement
    • do not replace it with another Kingston
    • search for eMMC in FBGA 153 or 169 package
    • you can upgrade it to a higher capacity memory
    • new high-performance eMMC v5.1 requires updated software, available here


    Nexus 7 2013 uses 3 brands of eMMC chips: Kingston, Hynix and Toshiba.

    Kingston was initially identified as unreliable in this post a few years ago:

    Google Nexus 7 2013 (Asus Razor)
    This is bootloader repair package for Google Nexus 7 based on QUALCOMM APQ8064 MCU. Tegra based is not supported !
    - GPT is for 32GB chip, hence it's not ticked by default. DO NOT tick it if You have 16GB version
    - EFS/CEFS partitions You can tick in case that nothing else works, it's not recommended to try it if You haven't made backup first. In this model, partitions layout is different from all other known Qualcomm devices, hence reading first 512MB for backup wont do any help. Do do proper backup, You have to read 2GB + size (from 0x0000 0000 0000 to 0x0000 9000 0000)
    Important ! ! !
    - If You have device which hangs on Google logo, and resurrection process hangs at 1%, You'll have to replace the eMMC chip first. Kingston eMMC chips used in these devices oftenly fail and become unwriteable !
    Attached Files Asus_Nexus_7.rar (103.60 MB)


    The above file is for RIFF JTAG flasher.



    My Nexus 7 JTAG collection:

    • Asus_Nexus_7.rar
    • Asus_Nexus_7.txt
    • nexus7 jtag.jpg
    • RIFF Box JTAG GettingStarted.pdf
    • RIFF Box JTAG Manager Setup v1.56.exe


    Please post your Nexus 7 2013 eMMC maker in this thread.

    So far I have collected the following reports:

    Code:
    BRICKED         Kingston  Hynix     Toshiba
    -------------------------------------------
    graphdarnell    1                
    fuser-invent    1                
    aungmyoswe      1                
    marc1706        1                
    micl9           1                
    consumer61                          1*
    bl4cKz4cK       1
    patmann03       1
    CWempe          1
    purian23        1
    NX3             1
    ali1234         1
    lowridincrew    1
    DaWeIII         1
    HTC Tytn...     1
    jaybea          1
    vfrvulcan       1
    TechnicsKuzya   2
    barbuda         1
    Snoob25         1
    Dazmatic        1
    459below        1
    amix            1
    hypochondrej    1
                                     
    WORKING         Kingston  Hynix     Toshiba
    -------------------------------------------
    fuser-invent    1                
    k23m                      2      
    yosmokinman               2      
    Tmzdroid        1                
    graphdarnell    1         2      
    OrBy                                1
    mydian                              1
    quickdraw86               1
    micl9                     1
    tegodwin                  1*
    noahvt                    1
    Carrick Glen              1*
    Axel85                    1
    NTRNSTR                   1
    
    *2015 production


    To check the chip in working units use this app or dmesg:

    Code:
    Kingston (MMC32G)
    -----------------
    mmc0: new HS200 MMC card at address 0001
    mmcblk0: mmc0:0001 MMC32G 28.8 GiB
    
    Hynix (HBG4e)
    -------------
    mmc0: new HS200 MMC card at address 0001
    mmcblk0: mmc0:0001 HBG4e 29.1 GiB
    
    Toshiba (016G92)
    ----------------
    mmcblk0: mmc0:0001 016G92 14.6 GiB


    It is not so simple with bricked units but this device is exceptionally easy to disassemble. The chip is on the bottom of the motherboard but unlike the top, it is not covered with any shield (the purple chip).


    DKDfcwe3sHZNIY3K.large



    :good:
    3
    Thank you for fast answer and help)
    This is my log:
    OK, let me explain the situation. When we re-uploaded the service ROM to an easily accessible server (thanks davefiddes), Jelly Bean 4.2.2 system image file was removed to decrease the download size, but Jelly Bean is great at raw eMMC presets and initialization. MM and custom ROMs can not handle empty 'persist' partition and just stop booting. No problem and we're not going to waste time downgrading to an ancient OS before flashing a modern one. Please boot TWRP, copy both attached files to the root of internal storage, 'install' p4-restore-int.zip and then reboot - Android will work now.

    You might consider changing wifi and bt addresses later from the ones I made up, if you wish.
    Code:
    .bdaddr
    D850E6444444
    
    .macaddr
    443835304536333633363336
    BTW, I noticed from your log that it is a deb device. Unfortunately I can't help you restoring lost IMEI. You may be able to recover it from your broken Kingston. These partitions need to be copied.

    /EDIT 2019
    If you have used eMMC v5.1 chip, check this post for updated software.

    :highfive:
    3
    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.
    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.
    3
    ...I'm really thankful with you for all your support and time dedicated to solve my situation! And for those who own a N7 with a dead Kingstone eMMC, I encourage you to follow my steps and learn A LOT on the way :D.
    Here goes link to download factory image MOB30X and TWRP-3.3.1-0, both with updated kernel to support eMMC 5.1: mega.nz/#F!zM9BzS7D!LANr3czGEz7IqY_MJnzQRg
    P.D.: just some thought... would be possible to apply a new mcc.c to native support eMMC 5.1 HS400 (something like importing mcc.c from Android Pie)?
    Congratulations on the very first adaptation of eMMC v5.1 on Nexus 7 2013! :victory:

    Let's briefly compare original, old eMMC v4.5 to eMMC v5.1:
    • faster R/W performance
    • 2x Interface Bandwidth
    • SMART (Health) Report
    • F/W Update option
    But most importantly, there is no need to search for old stock of original or equivalent chips, as new high-performance, cheap ICs can be used (in FBGA 153/169 package of course). Furthermore, higher capacity memory like 64GB, works fine. While the advanced new features of eMMC v5.1 require additional kernel modifications and dedicated apps, we already have standard solutions for N7 ROMs. Links to stock ROM and RAM-bootable TWRP are in edovis' post, I also compiled a flashable TWRP and generic kernel for custom ROMs.
    :good: