Nexus 5 with dead flash memory?

Search This thread

sir_earl

Senior Member
Jul 21, 2011
606
191
I went to use my Nexus 5 (D821) earlier today but it wouldn't turn on. Holding power didn't seem to work, so I assumed the battery was flat and left it charging for a couple of hours. Now it gets stuck at the first black and white "google" logo forever. The device is unlocked and rooted, but was working fine, and nothing was changed leading up to the issue.

I'm able to access the bootloader and fastboot still, but nothing seems to work.

Attempting to flash a partition (fastboot flash recovery twrp.img):

FAILED (remote: flash write failure)

Attempting to erase a partition (fastboot erase userdata):

FAILED (remote: failed to erase partition)

I can boot TWRP by running fastboot boot twrp.img, but attempting to mount any partitions results in errors such as:

E: Unable to find partition size for /system
E: Unable to mount /system

Also, attempting to install a zip shows that internal storage is 0MB in size.

At this stage, I suspect the flash memory has died a horrible death, and I'm trying to work out how to set the tampered and unlocked flags back to false to I can return it under warranty, however this is proving difficult too. If I run 'fastboot oem lock', it appears to succeed (the bootloader even changes to 'LOCK STATE - locked'), but as soon as I reboot the device, it reverts back to unlocked, and the padlock shows up again.

I've even tried manually via:

echo -ne "\x00" | dd obs=1 count=1 seek=16400 of=/dev/block/platform/msm_sdcc.1/by-name/misc
echo -ne "\x00" | dd obs=1 count=1 seek=16404 of=/dev/block/platform/msm_sdcc.1/by-name/misc

but these don't seem to have any effect on the flags.

So now I'm out of ideas, and just hoping I can set these flags back before sending the device for warranty. Any ideas?
 

bitdomo

Senior Member
Nov 3, 2011
1,542
1,244
31
Göd
I was helping a guy yestreday, he had a some problem like you. When you turn on the phone, the flashchip shuts off for some reasone. I was looking for the mmc or mmcblk device in the /dev then /dev/block after I booted a twrp like you, but I could not find any device called mmcblk or mmc, even the partitions was missing like mmcblk0p1 etc...

cat /proc/partitions just give me an empty screen, that it didnt find any storage device.
 
  • Like
Reactions: danarama

sir_earl

Senior Member
Jul 21, 2011
606
191
There's nothing you can do about it now. Just send it back. I doubt they'll blame flash memory failure on unlocking the bootloader

I'm just a little worried they'll refuse to honour the warranty without even bothering to check the hardware. Aren't they within their right to do this given the warranty terms? Sounds like I don't have any choice!
 

sir_earl

Senior Member
Jul 21, 2011
606
191
I was helping a guy yestreday, he had a some problem like you. When you turn on the phone, the flashchip shuts off for some reasone. I was looking for the mmc or mmcblk device in the /dev then /dev/block after I booted a twrp like you, but I could not find any device called mmcblk or mmc, even the partitions was missing like mmcblk0p1 etc...

cat /proc/partitions just give me an empty screen, that it didnt find any storage device.

I'm seeing a bunch of partitions listed when I run 'cat /proc/partitions', so I guess my issue might be a little different.

What I'm confused about though, is if the NAND flash is truely dead, how does the bootloader run? Isn't this stored on the same NAND flash chip? Also, aren't the lock state and tamper flags on the same chip? If so, how are these still accessible, but not writeable? I'm guessing it's not a complete failure, but only a partial one... Thoughts?
 

danarama

Senior Member
Aug 22, 2010
31,277
18,811
Oxenhope, West Yorkshire, UK
It surely isn't fully dead. It could be a corrupt partition or bunch of partitions being the issue. But the bootloader also isn't fully functional as you cannot relock it.

You definitely need to reset tamper flag for RMA, but for warranty, don't they have to prove that the hardware fault was caused by the unlocked bootloader? I know Samsung refuse warranty on modification but I don't think Google do. It is a developer phone after all.

That said, you've no choice as I can see. I'm not aware of anyone having warranty rejected or approved with an unlocked bootloader yet
 

bitdomo

Senior Member
Nov 3, 2011
1,542
1,244
31
Göd
I'm seeing a bunch of partitions listed when I run 'cat /proc/partitions', so I guess my issue might be a little different.

What I'm confused about though, is if the NAND flash is truely dead, how does the bootloader run? Isn't this stored on the same NAND flash chip? Also, aren't the lock state and tamper flags on the same chip? If so, how are these still accessible, but not writeable? I'm guessing it's not a complete failure, but only a partial one... Thoughts?

Can you post the outpot for the cat /proc/partitions command?
 

bitdomo

Senior Member
Nov 3, 2011
1,542
1,244
31
Göd
I'll have to take a photo, as I can't find any way to run adb or save the log off. Give me a minute!

you can do the whole thing with adb from your pc.
you need the naked usb drivers for that, and if you running windows 8 or 8.1 you have to turn off driver signiture enforcement inorder to isntall the drivers.
and then with adb shell command you can use your cmd window on the pc as a terminal window on your phone
 

sir_earl

Senior Member
Jul 21, 2011
606
191
you can do the whole thing with adb from your pc.
you need the naked usb drivers for that, and if you running windows 8 or 8.1 you have to turn off driver signiture enforcement inorder to isntall the drivers.
and then with adb shell command you can use your cmd window on the pc as a terminal window on your phone

adb was working with the Nexus when the rom was booted, but can't seem to find the device when running TWRP or fastboot (not sure if the server can run there?) Will the naked usb drivers resolve this issue?

Regardless, I've attached the photo with the partitions.
 

Attachments

  • IMG_20140130_233502.jpg
    IMG_20140130_233502.jpg
    254.9 KB · Views: 855

sir_earl

Senior Member
Jul 21, 2011
606
191
google are only involved in that all this is done on behalf of them. They commission the phone. But the mandate is that it's a developer phone

That's somewhat comforting. We shall see how it goes! Not looking forward to being without a decent phone for however long the warranty process takes though!
 

bitdomo

Senior Member
Nov 3, 2011
1,542
1,244
31
Göd
adb was working with the Nexus when the rom was booted, but can't seem to find the device when running TWRP or fastboot (not sure if the server can run there?) Will the naked usb drivers resolve this issue?

Regardless, I've attached the photo with the partitions.

Yes naked drivers will help you, but keep in mind that fi you are running windows 8 or 8.1 you have to turn of driver signiture enforcement.

Could you mount the system partition?

$ mount -o rw /dev/block/mmcblk0p25 /system
$ cd /system

and try to make folder like

$ mkdir asd

and then remove it

$ rm -rf asd

if that works we can write the flash chip, so it must be some kind of partition corruption.
 

sir_earl

Senior Member
Jul 21, 2011
606
191
Yes naked drivers will help you, but keep in mind that fi you are running windows 8 or 8.1 you have to turn of driver signiture enforcement.

Could you mount the system partition?

$ mount -o rw /dev/block/mmcblk0p25 /system
$ cd /system

and try to make folder like

$ mkdir asd

and then remove it

$ rm -rf asd

if that works we can write the flash chip, so it must be some kind of partition corruption.

I'm able to use adb now, so that's a start.

Trying to mount with the command you gave gives:

mount -o rw /dev/block/mmcblk0p25 /system
mount: mounting /dev/block/mmcblk0p25 on /system failed: Invalid argument
 

sir_earl

Senior Member
Jul 21, 2011
606
191
Please do let us know how you get on. It will be interesting to confirm how the unlocked bootloader goes down.

Will do. I'm curious though, if random corruptions like this can occur, isn't it possible that the bootloader could appear unlocked if it's reading a corrupt piece of memory? If that's the case, they can't just assume the user has unlocked the bootloader in cases where the flash chip fails, correct? Granted, this isn't the case here, but it must have some impact!
 

bitdomo

Senior Member
Nov 3, 2011
1,542
1,244
31
Göd
Running same twrp here, so I guess it's failing because it can't mount the partition due to some kind of corruption.

I don't know what else you could do. You can try to lock and reset tamper flag by mmcblk0p15 and not with ...../by-name/misc, if it works probably you could not unlock your bl again.

Try to lock bl and reset tamperflag (adb shell):

echo -ne "\x00" | dd obs=1 count=1 seek=16400 of=/dev/block/mmcblk0p15
echo -ne "\x00" | dd obs=1 count=1 seek=16404 of=/dev/block/mmcblk0p15

---------- Post added at 12:45 PM ---------- Previous post was at 12:43 PM ----------

Will do. I'm curious though, if random corruptions like this can occur, isn't it possible that the bootloader could appear unlocked if it's reading a corrupt piece of memory? If that's the case, they can't just assume the user has unlocked the bootloader in cases where the flash chip fails, correct? Granted, this isn't the case here, but it must have some impact!

bl lock state and tamper flag stored at the misc partition, so bl can read it but ti seems it fails to write it, i don't know the reasone why, but it seems tha path to the partitions by-name is missing
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Just an update for anyone that's interested, my phone was sent to an LG authorized mobile repairer who confirmed the flash chip was dead and replaced the main board under warranty, no issues, and no mention of the fact that the phone was unlocked. This was in New Zealand, so your mileage may vary!

    I almost forgot how much I missed this phone until I got it back today!
    1
    I was helping a guy yestreday, he had a some problem like you. When you turn on the phone, the flashchip shuts off for some reasone. I was looking for the mmc or mmcblk device in the /dev then /dev/block after I booted a twrp like you, but I could not find any device called mmcblk or mmc, even the partitions was missing like mmcblk0p1 etc...

    cat /proc/partitions just give me an empty screen, that it didnt find any storage device.
    1
    And im assuming that means I shouldnt root anymore?

    Your just unlucky, I wouldn't have a device that wasn't rooted, especially a nexus 5. It's a developer device. Don't let this experience keep you from enjoying your phone.