Nexus 5 with dead flash memory? - Nexus 5 Q&A, Help & Troubleshooting

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?

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
Sent from my Nexus 5 using Tapatalk

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.

rootSU said:
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
Click to expand...
Click to collapse
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!

bitdomo said:
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.
Click to expand...
Click to collapse
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?

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

sir_earl said:
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?
Click to expand...
Click to collapse
Can you post the outpot for the cat /proc/partitions command?

rootSU said:
I know Samsung refuse warranty on modification but I don't think Google do. It is a developer phone after all.
Click to expand...
Click to collapse
I'm not sure if the process is different here in New Zealand. I was under the impression LG deals with warranty issues here, and Google isn't involved?

bitdomo said:
Can you post the outpot for the cat /proc/partitions command?
Click to expand...
Click to collapse
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!

sir_earl said:
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!
Click to expand...
Click to collapse
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

bitdomo said:
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
Click to expand...
Click to collapse
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.

sir_earl said:
I'm not sure if the process is different here in New Zealand. I was under the impression LG deals with warranty issues here, and Google isn't involved?
Click to expand...
Click to collapse
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

rootSU said:
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
Click to expand...
Click to collapse
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!

sir_earl said:
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!
Click to expand...
Click to collapse
Please do let us know how you get on. It will be interesting to confirm how the unlocked bootloader goes down.

sir_earl said:
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.
Click to expand...
Click to collapse
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.

bitdomo said:
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.
Click to expand...
Click to collapse
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 said:
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
Click to expand...
Click to collapse
for me this command works.
I use twrp 2.6.3.4

bitdomo said:
for me this command works.
I use twrp 2.6.3.4
Click to expand...
Click to collapse
Running same twrp here, so I guess it's failing because it can't mount the partition due to some kind of corruption.

rootSU said:
Please do let us know how you get on. It will be interesting to confirm how the unlocked bootloader goes down.
Click to expand...
Click to collapse
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!

sir_earl said:
Running same twrp here, so I guess it's failing because it can't mount the partition due to some kind of corruption.
Click to expand...
Click to collapse
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 ----------
sir_earl said:
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!
Click to expand...
Click to collapse
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

Related

Screen not working

My wife's screen has stopped working. She says it may have gotten wet from sweat while she was on a walk this morning, but I'm beginning to suspect it's been dropped because one side of the removable cover isn't very secure. Anyways, the screen briefly flashes bright white when the screen is turned on. I can tell the phone is still operating normally because of the sounds and vibrations it makes (e.g. start up sound, notifications, phone calls, etc...). Is there anything I can do short of sending it to HTC for repair? If I do send it, does it need to be returned to stock? How would I even accomplish that without the screen working?
Thanks
HTC in the past have been pretty good at warranty work even when device is rooted/bootloader unlock.
You could try to relock the bootloader and run tmobile ruu.
with the power off you can hold Vol down and power button to get into hboot.
I don't have the phone in front of me but iirc that should put you in fastboot already, if not you might need to hit power button once to
get into it. Run the fastboot command to lock bootloader.
Code:
fastboot oem lock
When done it should reboot, get back into bootloader, fastboot and run tmobile RUU
Thanks for the information.
Is there any way to force USB mounting from adb? I need to pull some stuff off of the internal SD.
Apparently I turned off USB debugging on this phone, so I have no way to connect to it. Do I have any options other than shipping it off to HTC?
greenmaze said:
I need to pull some stuff off of the internal SD.
Click to expand...
Click to collapse
greenmaze said:
I have no way to connect to it. Do I have any options other than shipping it off to HTC?
Click to expand...
Click to collapse
If you still have fastboot, you can fastboot boot into a recovery, then get an adb shell. From the shell you can mount your sdcard, and look around on it to find what you want to pull. You can use adb pull to pull entire directory trees, not just single files.
-Jobo
I'm able to connect adb in fastboot, but mounting /sdcard fails.
Code:
~ # mount /sdcard
mount /sdcard
mount: mounting /dev/block/mmcblk0p36 on /sdcard failed: Invalid argument
greenmaze said:
I'm able to connect adb in fastboot, but mounting /sdcard fails.
Click to expand...
Click to collapse
Ayyy .. well I don't really know then..
You can try and get your sdcard mountable by flashing and booting a stock recovery, and then fastboot booting a custom recovery. May be snake oil tho.
Do some searching on how to fix unmountable /sdcard
If youre on linux, you could try this:
Code:
( adb shell cat /dev/block/mmcblk0p36 ) > sdcard.img
If it starts writing a growing file on the host, wait for it to finish (will take ) and then
Code:
mount -o loop -t vfat sdcard.img some/mount/point
Unfortunately I have no guaranteed recipe..
-Jobo

[Q] Partition tables

Could someone please post their partition tables by running "fdisk -l /dev/block/mmcblk0" in ADB?
MysticMgcn said:
Could someone please post their partition tables by running "fdisk -l /dev/block/mmcblk0" in ADB?
Click to expand...
Click to collapse
I get "/system/bin/sh: fdisk: not found" when trying to run the command. Tried running as su as well, it still said fdisk wasn't found.
SteveG12543 said:
I get "/system/bin/sh: fdisk: not found" when trying to run the command. Tried running as su as well, it still said fdisk wasn't found.
Click to expand...
Click to collapse
Hmm, would you mind trying from ADB in recovery?
MysticMgcn said:
Hmm, would you mind trying from ADB in recovery?
Click to expand...
Click to collapse
Sure, I can do that. It'll be a bit before I can get to a computer though.
Btw I'm on the stock recovery, if that matters at all.
Sent from my ADR6425LVW using XDA Premium.
I used adb to reboot the tablet into recovery and I got he fallen android with red triangle with no response to adb queries. I then powered the device off and then used power / vol down to get the mini EFI-like menu, then used Vol Up to pick RCK. Same thing.
Am I missing something?
MysticMgcn said:
Could someone please post their partition tables by running "fdisk -l /dev/block/mmcblk0" in ADB?
Click to expand...
Click to collapse
The Transformer does not use a traditional partition table.
fdisk -l confirms: "Disk /dev/block/mmcblk0 does not contain a valid partition table" (run from a shell session root prompt directly on the device in ConnectBot)
AFAIK, it uses a GPT which is stored at a yet-unknown-to-me location (maybe at the end of the MMC). After booting, the kernel log (dmesg) always says "Primary GPT is invalid, using alternate GPT.". I assume this is by design because I've seen it also on the TF101.
Another thing is that some partitions are hidden from the OS (everything related to bootloader, recovery and kernel). While I could find the recovery and kernel images inside mmcblk0 (offsets 0x380000 and 0xB80000), the bootloader itself seems to be completely inaccessible from the OS.
_that said:
The Transformer does not use a traditional partition table.
fdisk -l confirms: "Disk /dev/block/mmcblk0 does not contain a valid partition table" (run from a shell session root prompt directly on the device in ConnectBot)
AFAIK, it uses a GPT which is stored at a yet-unknown-to-me location (maybe at the end of the MMC). After booting, the kernel log (dmesg) always says "Primary GPT is invalid, using alternate GPT.". I assume this is by design because I've seen it also on the TF101.
Another thing is that some partitions are hidden from the OS (everything related to bootloader, recovery and kernel). While I could find the recovery and kernel images inside mmcblk0 (offsets 0x380000 and 0xB80000), the bootloader itself seems to be completely inaccessible from the OS.
Click to expand...
Click to collapse
Boo Face!! Well thank you for the info. The offsets may still prove useful to get me out of this recovery bootloop I'm in.
Use parted not fdisk for emmc
MysticMgcn said:
Could someone please post their partition tables by running "fdisk -l /dev/block/mmcblk0" in ADB?
Click to expand...
Click to collapse
I know this is an old post but I think the command you are looking for is "parted /dev/block/mmcblk0" then type "print" and hit enter.

[Q] Bricked Note. No Samsung Logo

hi all,
So, I've been a bit of a idiot.
In a nut shell I was trying to manually remove the flash count and followed the wrong tut.
I did dd if=/dev/zero of=/dev/block/mmcblk0 bs=1 count=1 seek=3145732 and now when i try to boot the note I dont get the Samsung logo splash screen, I get a screen full of static.
I can access the recovery partition, I can also access in download mode with odin.
If I try to flash the stock rom, it completes ok but doesn't auto restart and stays on the odin mode screen.
I do get E:\ unable to mount /efs when i wipe the cache's.
I have a 2nd note 10.1 (both n8010) so I'm hoping I can fix/copy/image from the 2nd working device.
Any ideas on how to fix? or is it now an expensive paper weight?
I have flashed the stock firmware and rom from samsung-mobile but no joy.
thanks,
http://forum.xda-developers.com/showthread.php?t=2087567
blastman said:
hi all,
So, I've been a bit of a idiot.
In a nut shell I was trying to manually remove the flash count and followed the wrong tut.
I did dd if=/dev/zero of=/dev/block/mmcblk0 bs=1 count=1 seek=3145732 and now when i try to boot the note I dont get the Samsung logo splash screen, I get a screen full of static.
I can access the recovery partition, I can also access in download mode with odin.
If I try to flash the stock rom, it completes ok but doesn't auto restart and stays on the odin mode screen.
I do get E:\ unable to mount /efs when i wipe the cache's.
I have a 2nd note 10.1 (both n8010) so I'm hoping I can fix/copy/image from the 2nd working device.
Any ideas on how to fix? or is it now an expensive paper weight?
I have flashed the stock firmware and rom from samsung-mobile but no joy.
thanks,
Click to expand...
Click to collapse
You are in a tough situation my friend
I think as long as the recovery and odin work there is a chance...
can you give me the link to that tutorial .. I think i may help
Or do you remember where that sector was??
Anyways you may try to backup both devices EFS (backup that of the non working device in case you need it for anything) .... (But i think the EFSPro wont work) (you may do that using EFSpro or i think it may be done through the shell by "dd if=dev/block/mmcblk0p? of=/sdcard/efs.img" where "?" is the number of EFS partition you can know that from shell command mount "i think its mmcblk0p3") .... then restore the EFS of the working device to the non-working one (EFS pro or using "dd if=/sdcard/efs.img of=/dev/block/mmcblk0p?" "i think its mmcblk0p3")
I hope this would succeed although i red that it contains MAC address data which may prevent both devices connecting to same network
(N8010 has no connection to cellular networks so i think no problem)
Scorpion_Ibm said:
I think as long as the recovery and odin work there is a chance...
can you give me the link to that tutorial .. I think i may help
Or do you remember where that sector was??
Anyways you may try to backup both devices EFS (backup that of the non working device in case you need it for anything) .... (But i think the EFSPro wont work) (you may do that using EFSpro or i think it may be done through the shell by "dd if=dev/block/mmcblk0p? of=/sdcard/efs.img" where "?" is the number of EFS partition you can know that from shell command mount "i think its mmcblk0p3") .... then restore the EFS of the working device to the non-working one (EFS pro or using "dd if=/sdcard/efs.img of=/dev/block/mmcblk0p?" "i think its mmcblk0p3")
I hope this would succeed although i red that it contains MAC address data which may prevent both devices connecting to same network
(N8010 has no connection to cellular networks so i think no problem)
Click to expand...
Click to collapse
this?
http://forum.xda-developers.com/showthread.php?p=37465299
jaydubbbbs said:
this?
http://forum.xda-developers.com/showthread.php?p=37465299
Click to expand...
Click to collapse
But before all these go to shell and try "dd if=/dev/block/mmcblk0p3 of=/sdcard/efs.img" and "tar -cvf /sdcard/EFS.tar /dev/block/mmcblk0p3"
if these commands succeed you would have a backup of old efs before changing any thing (keep it in a safe place)
Look you may try just backing up and then restoring the same EFS of the device
Try this first: use the tar command to copy the files of EFS "tar -cvf /sdcard/EFS.tar /dev/block/mmcblk0p3"
then do " mke2fs /dev/block/mmcblk0p3" the last thing is to restore the tar with "tar -xvzf /sdcard/EFS.tar -C /dev/block/mmcblk0p3"
I prefer you try what i said first as it's shorter and makes nearly the same thing except that it takes all files not just the nv_data.bin
You can then try that tutorial in the link i think it works and you can get the that file nv_data.bin from your other device or from the non-functioning one if you can extract it from the tar backup in the first step
Cheers for the replies guys.
I'll find the tut I followed and post a link.
I'll also look into the link and suggestions you've mentioned.
My main issue seems to be that I can't get a adb connection to the device as it won't boot.
Even with cwm 6.1 installed, I still can't connect. Bear in mind, I've flashed back to stock but not been able to boot it to put it into usb debugging mode. does this mean I'll never be able to get a shell open?
I have managed to create a efs.img from the working device but have no way to push to the broken one.
Any suggestions?
Thanks
blastman said:
Cheers for the replies guys.
I'll find the tut I followed and post a link.
I'll also look into the link and suggestions you've mentioned.
My main issue seems to be that I can't get a adb connection to the device as it won't boot.
Even with cwm 6.1 installed, I still can't connect. Bear in mind, I've flashed back to stock but not been able to boot it to put it into usb debugging mode. does this mean I'll never be able to get a shell open?
I have managed to create a efs.img from the working device but have no way to push to the broken one.
Any suggestions?
Thanks
Click to expand...
Click to collapse
You say that adb wont work even from CWM??
Try this and see if it works http://www.dominantwire.com/2012/11/how-to-solve-adb-device-not-found-error.html
yep, even when booted into cwm recovery i still can;t connect to adb
just downloading a custom rom now to see if it's the stock rom causing the issue.
although I am able to access adb in cmw recovery from the other working device, even with USB debugging turned off.
sadly that link is no good.
I'm able to connect to the working device on the same cwm recovery version, using the same cable, so setup and PC are ok.
I dont know if the roms are the same (maybe not) but I'll flash the broken one with a custom 'pre rooted' rom in case it helps.
blastman said:
yep, even when booted into cwm recovery i still can;t connect to adb
just downloading a custom rom now to see if it's the stock rom causing the issue.
although I am able to access adb in cmw recovery from the other working device, even with USB debugging turned off.
Click to expand...
Click to collapse
Ok try another rom as i think roms have diferences in adb !!
if not working also and If you know you can safely flash a new recovery .. try TWRP it has an inbuilt shell .. the keyboard is not that good but you can try it better than nothing
ok so....
I've flashed an different custom rom via cwm install from ext_sdcard. After a reboot I now have the samsung logo back!!!!
It's hung on the samsung logo for a wile now, 5 minutes or so, but I'll let it sit there for a good 30 minutes to be sure.
I'll see what happens from this rom flash, but failing this I'll stick TRWP on and have a go with the inbuilt shell. even if i can mount ext sd I should be able to restore the block i over wrote.
getting closer!!!
thanks so far,
blastman said:
ok so....
I've flashed an different custom rom via cwm install from ext_sdcard. After a reboot I now have the samsung logo back!!!!
It's hung on the samsung logo for a wile now, 5 minutes or so, but I'll let it sit there for a good 30 minutes to be sure.
I'll see what happens from this rom flash, but failing this I'll stick TRWP on and have a go with the inbuilt shell. even if i can mount ext sd I should be able to restore the block i over wrote.
getting closer!!!
thanks so far,
Click to expand...
Click to collapse
Good to hear .. i hope it finishes the problem .. but in case it fails before flashing TWRP try from adb .. adb kill-server then adb start-server and adb usb and see if it works
will do, thanks.
I've just noticed that the command i ran I outputted to mmcblk0 and your commands refer to mmcblk0p3.
Am i right in guessing the the 0 part lists the disk and the px part is referring to the partition on that disk (so to speak)?
so my original command which broke it basically wiped the internal storage? this would explain a lot about failed connections as well.
blastman said:
will do, thanks.
I've just noticed that the command i ran I outputted to mmcblk0 and your commands refer to mmcblk0p3.
Am i right in guessing the the 0 part lists the disk and the px part is referring to the partition on that disk (so to speak)?
so my original command which broke it basically wiped the internal storage? this would explain a lot about failed connections as well.
Click to expand...
Click to collapse
Did the device work or did you manage to get adb connection??
Anyways ... from what i read during searching is that if=/dev/zero and bs=1 count=1 seek=3145732 parts of your command writes zeros only to one byte, one time after seeking 3145732 blocks of the storage which seems to be in EFS partition which says cant mount ... So the commands i wrote are to take a backup of whatever files in there then format the drive and restore the files back to it ... after formating using mke2fs reboot the device before restore and see if it shows the cant mount message again
arh ok, that makes sense.
I've managed to tar the efs files form the working device.
I then opened the shell in twrp and did a mke2fs /dev/block/mmcblk0p3 which completed ok.
But when i try to tar -xvzf EFS.tar -C /dev/block/mmcblk0p3 (from the external sd dir, it tells me that the mmcblk0p3 isn;t a directory.
any ideas?
thanks again
how about doing a dd if=efs.img of=/dev/block/mmcblk0p3??
I got a efs.img from efs pro on the working device..
blastman said:
arh ok, that makes sense.
I've managed to tar the efs files form the working device.
I then opened the shell in twrp and did a mke2fs /dev/block/mmcblk0p3 which completed ok.
But when i try to tar -xvzf EFS.tar -C /dev/block/mmcblk0p3 (from the external sd dir, it tells me that the mmcblk0p3 isn;t a directory.
any ideas?
thanks again
Click to expand...
Click to collapse
try remove -C from the command it's for directory my mistake
and you can also try dd with (if=/"path of extsd"/EFS.img) but try the tar first .... after that see if it tells you cant't mount EFS by opening mount and select EFS and see if it becomes with an 'x' then going to the upper right corner of the screen and pressing the icon beside back and home and see if it shows cant mount EFS
sorry, before you replied i went and did a dd if=efs.img of=/dev/block/mmcblk0p3
I then flashed the stock ROM and BOOM!! im in!!
YEAH BABY!!!
only issue now is that the boot loader isn't quite right.
1 - it doesn't show the 'Samsung Galaxy Note 10.1" splash screen
2 - instead of above I get a screen showing the last thing i was doing, ie, download mode, but with static across it.
any ideas on how to correct this?
blastman said:
sorry, before you replied i went and did a dd if=efs.img of=/dev/block/mmcblk0p3
I then flashed the stock ROM and BOOM!! im in!!
YEAH BABY!!!
only issue now is that the boot loader isn't quite right.
1 - it doesn't show the 'Samsung Galaxy Note 10.1" splash screen
2 - instead of above I get a screen showing the last thing i was doing, ie, download mode, but with static across it.
any ideas on how to correct this?
Click to expand...
Click to collapse
Can you answer some questions??
what do you mean by you are in?? .. can you get to android or not yet?? ... what do you mean with getting download mode with static ??
would you try going to recovery and clear cache and dalvik cache to try??
sorry, by I'm in I mean that I can now boot to Android.
when i say download mode with static, image the download screen but fuzzy and punctuated with white nose.
I've done a cache format and a reset to factory but I still get the same issue.
Also, I'm still unable to get an adb connection to the device.
I have noticed that the serial number has now changed to the same as the working device but thats expected as we copied the efs contents from one to the other.
thanks for all your help. you saved my bacon

[Q] Mounting userdata partition on PC

Hello all,
Last night I ran the following command (with the phone in recovery and everything unmounted) to back up my Nexus 5's userdata partition to my computer:
Code:
adb pull /dev/block/platform/msm_sdcc.1/by-name/userdata
My phone is encrypted, so I use "cryptsetup --type=plain open" to obtain a plaintext version on /dev/mapper/my-nexus-backup. But I cannot mount the mapped device using "mount"! It complains that iit can't find the filesystem.
So, how would I mount such an image? Or, even better, what's the best way to dd it back to the userdata partition on the device?
And yes, next time I will just use a Nandroid, even if it means having to erase things to make room.
See if @rootSU or @bitdomo can help. They're gurus at this type of stuff
Sent from my Nexus 5 using XDA Free mobile app
Sorry, where are you mounting exactly? Are you trying to mount an image on a Linux box after the pull?
If not can you please share the full step of commands and what you expect to happen please?
Sent from my Nexus 5 using Tapatalk
rootSU said:
Sorry, where are you mounting exactly? Are you trying to mount an image on a Linux box after the pull?
If not can you please share the full step of commands and what you expect to happen please?
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Hey rootSU. I pulled the image from my phone, decrypted it, and tried to mount it:
Code:
$ adb pull /dev/block/platform/msm_sdcc.1/by-name/userdata
$ su
# losetup /dev/loop1 userdata
# cryptsetup open --type plain /dev/loop1 nexus
Enter passphrase:
# mount /dev/mapper/nexus /mnt/tmp
mount: wrong fs type, bad option, bad superblock on /dev/mapper/nexus,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
I'm not sure why that doesn't work. It's just ext4, right? I'd still find it instructive to figure out how to mount it; hopefully you can shed some light?
As far as getting the image back on the device's partition, I was a bit stuck, because there's obviously no room on the device to copy it to. I finally figured out a method involving netcat. Essentially I forwarded a local TCP port to my device (in recovery) using adb, then used netcat to feed dd the image.
Code:
$ adb forward tcp:4444 tcp:4444
$ adb shell
# nc -l -p 4444 -e dd of=/dev/block/platform/msm_sdcc.1/by-name/userdata
This will hang as it waits for an inbound connection. From a second shell:
Code:
$ dd if=userdata | nc localhost 4444
My 28GiB image took around 6 hours (!) to complete. Nandroid is probably the way to go.
Nandroid won't backup sdcard but you can use foldersync to back that up.
Yes it is just ext4
I've never done anything like this before with an encrypted device but my assumption was if you adb pull a file, it would decrypt it on the fly.. Does it not?? If it does, I'd just dd it to an img.
Sent from my Nexus 5 using Tapatalk
rootSU said:
Nandroid won't backup sdcard but you can use foldersync to back that up.
Yes it is just ext4
I've never done anything like this before with an encrypted device but my assumption was if you adb pull a file, it would decrypt it on the fly.. Does it not?? If it does, I'd just dd it to an img.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Nope, in this case, userdata is the encrypted *device*; in any case TWRP knows nothing about the encryption. The pull was identical to using dd to copy the file. Of course, if you wanted to decrypt your device without wiping data, you could probably have TWRP decrypt the data partition, then dd or pull the resulting /dev/block/dm-0 file (which is equivalent to my /dev/mapper/nexus file I created). Haven't tried it though; ain't nobody got time for that.
I wonder why it wouldn't mount. Oh well. I'm just happy that my device is the way it was yesterday.
I'd love to have a play with this but I just don't have the time to start encrypting and decrypting stuff
Out of interest what about adb whilst in android?
Sent from my Nexus 5 using Tapatalk
rootSU said:
I'd love to have a play with this but I just don't have the time to start encrypting and decrypting stuff
Out of interest what about adb whilst in android?
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
You would have the exact same results, as the /dev/* files are the physical disks represented as a file. The crypto drivers read/write this block device file to present a decrypted /dev/block/dm-0 device. Then the kernel mounts dm-0 as an ext4 filesystem on /data. All the files I mentioned are pullable with adb, assuming you have sufficient privileges. You don't need fancy tools to read/write them, which is why the netcat hack worked. Thus is the power of Unix!
You can screw around with it if you want in regular desktop Linux with a "device" you make from a bunch of 0s. Do:
Code:
# dd if=/dev/zero of=disk.image count=100000
# losetup /dev/loop0 disk.image
Now you can do "mkfs.ext4 /dev/loop0" and "mount ..." or whatever, and the data will be written to the "device" disk.image.
some time ago I backed up /dev/block/sda from my android 12 phone.
I forgot it was encrypted..
and that it had 34 partitions.
userdata partition WAS sda34.
how can I momentarily mount the backup in android?
losetup is present...

Is there a way to delete/uninstall an APK and its data from fastboot?

so i went into FKU franco kernel updater and changed my CPU max speed from 1500 back to the default but did not change my voltage settings back to default. now the device is softbrocked and just boots to the google nexus splash screen
I have tried flashing:
system.img
boot.img
bootloader.img
stock 4.4.4 kernel
yet regardless of flashing the above the device still is softbricked and wont get past the nexus google logo.
the only thing i have not flashed over is my user data and thats because i dont want to lose my pictures and video of my little boy that i didn't get to back up yet due to my dropbox just hitting its limit.
Im hoping I can remove the franco updater app and its user data and boot but maybe thats not possible?
Thanks for any and all help!
nextelbuddy said:
so i went into FKU franco kernel updater and changed my CPU max speed from 1500 back to the default but did not change my voltage settings back to default. now the device is softbrocked and just boots to the google nexus splash screen
I have tried flashing:
system.img
boot.img
bootloader.img
stock 4.4.4 kernel
yet regardless of flashing the above the device still is softbricked and wont get past the nexus google logo.
the only thing i have not flashed over is my user data and thats because i dont want to lose my pictures and video of my little boy that i didn't get to back up yet due to my dropbox just hitting its limit.
Im hoping I can remove the franco updater app and its user data and boot but maybe thats not possible?
Thanks for any and all help!
Click to expand...
Click to collapse
Do you have a custom recovery? If so, use adb while in recovery to pull your files. If not, then flash one then pull them.
Not sure why you mentioned "boot.img" then "stock 4.4.4 kernel", boot.img = the kernel lol
Don't know why your device won't boot even after flashing stock boot.img, but if you use TWRP you can use the file manager to delete the .apk/other files.
Lethargy said:
Do you have a custom recovery? If so, use adb while in recovery to pull your files. If not, then flash one then pull them.
Not sure why you mentioned "boot.img" then "stock 4.4.4 kernel", boot.img = the kernel lol
Don't know why your device won't boot even after flashing stock boot.img, but if you use TWRP you can use the file manager to delete the .apk/other files.
Click to expand...
Click to collapse
thanks, i deleted the franco files and still cant boot.
i want top pull files but it looks like I need ADB and currently i can only get into fastboot mode.
(i'm using wugfresh toolkit, i know some say manual is the way to go but right now this is what I have to go on and have had no issues thus far with it)
i was using the button pull files in the tool kit but its not detecting the device since im in fastboot mode.
i swear I did a factory reset before and my photos were still present but many articles online say in 4.4 that a factory reset will wipe your photos.
nextelbuddy said:
thanks, i deleted the franco files and still cant boot.
i want top pull files but it looks like I need ADB and currently i can only get into fastboot mode.
(i'm using wugfresh toolkit, i know some say manual is the way to go but right now this is what I have to go on and have had no issues thus far with it)
i was using the button pull files in the tool kit but its not detecting the device since im in fastboot mode.
i swear I did a factory reset before and my photos were still present but many articles online say in 4.4 that a factory reset will wipe your photos.
Click to expand...
Click to collapse
Don't use toolkits. You say you've had no issues but you have and that issue is that you don't know how to use adb and fastboot
Click the link in my signature to get to the sticky roll -up thread. From there you will find my "adb and fastboot. What is it?" thread. Please read it. You'll have ALL the information you need to get your photos etc off your sdcard
Stock recovery - factory reset wipes sdcard
Custom recovery - factory reset preserves sdcard
Sent from my Nexus 5 using Tapatalk
rootSU said:
Don't use toolkits. You say you've had no issues but you have and that issue is that you don't know how to use adb and fastboot
Click the link in my signature to get to the sticky roll -up thread. From there you will find my "adb and fastboot. What is it?" thread. Please read it. You'll have ALL the information you need to get your photos etc off your sdcard
Stock recovery - factory reset wipes sdcard
Custom recovery - factory reset preserves sdcard
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Thanks,
since i can not boot, i am forced to use TWRP recovery and then go ingo CMD shell and ADB there however when I do ADB Devices i get the serial number showing its connected but then it says RECOVERY at the end.. much lke when you are in fastboot it says FASTBOOT at the end of the device.
i tried doing a pull using this:
adb shell
mount data
exit
adb pull data/media/0 c:\MyBackup
but when I do ADB Shell, the command prompt says this
~ # ←[6n
if t that prompt i type mount data then I get this:
mount data
mount: mounting /dev/block/mmcblk0p28 on /data failed: Device or resource busy
~ # ←[6n
im not sure how else to get to a working ADB to perform a proper pull if i cant boot into the device fully
nextelbuddy said:
Thanks,
since i can not boot, i am forced to use TWRP recovery and then go ingo CMD shell and ADB there however when I do ADB Devices i get the serial number showing its connected but then it says RECOVERY at the end.. much lke when you are in fastboot it says FASTBOOT at the end of the device.
i tried doing a pull using this:
adb shell
mount data
exit
adb pull data/media/0 c:\MyBackup
but when I do ADB Shell, the command prompt says this
~ # ←[6n
if t that prompt i type mount data then I get this:
mount data
mount: mounting /dev/block/mmcblk0p28 on /data failed: Device or resource busy
~ # ←[6n
im not sure how else to get to a working ADB to perform a proper pull if i cant boot into the device fully
Click to expand...
Click to collapse
It could say "device busy" if data is already mounted. Does twrp have a "mounts and storage" menu like CWM? Where you can mount data? If so, check if it is mounted there (would typicall say "unmount data" if it was mounted, otherwise it would say "mount data" if it is unbmounted)
nextelbuddy said:
Thanks,
since i can not boot, i am forced to use TWRP recovery and then go ingo CMD shell and ADB there however when I do ADB Devices i get the serial number showing its connected but then it says RECOVERY at the end.. much lke when you are in fastboot it says FASTBOOT at the end of the device.
i tried doing a pull using this:
adb shell
mount data
exit
adb pull data/media/0 c:\MyBackup
but when I do ADB Shell, the command prompt says this
~ # ←[6n
if t that prompt i type mount data then I get this:
mount data
mount: mounting /dev/block/mmcblk0p28 on /data failed: Device or resource busy
~ # ←[6n
im not sure how else to get to a working ADB to perform a proper pull if i cant boot into the device fully
Click to expand...
Click to collapse
ok so i went into TWRP and UNMOUNTED DATA
and then I went back in to cmd prompt and tried mount again and it worked i guess since theres no error. I typed EXIT and was brought back to normal windows command prompt. I then typed
adb pull data/media/0 C:\Users\srobertson\Desktop\Nexus 5 7-15-2014 DCIM
and when I hit enter it just shows a list of ADB commands as if it didnt recognize anything yet when I do ADB DEVICES it shows the device and ID
nextelbuddy said:
ok so i went into TWRP and UNMOUNTED DATA
and then I went back in to cmd prompt and tried mount again and it worked i guess since theres no error. I typed EXIT and was brought back to normal windows command prompt. I then typed
adb pull data/media/0 C:\Users\srobertson\Desktop\Nexus 5 7-15-2014 DCIM
and when I hit enter it just shows a list of ADB commands as if it didnt recognize anything yet when I do ADB DEVICES it shows the device and ID
Click to expand...
Click to collapse
If you're going to put spaces in your folder names, you'll have to enclose the entire path in "...
Example
adb pull data/media/0 "C:\Users\srobertson\Desktop\Nexus 5 7-15-2014 DCIM"
Best to avoid spaces though.
I'll put this in the guide, thanks.
rootSU said:
If you're going to put spaces in your folder names, you'll have to enclose the entire path in "...
Example
adb pull data/media/0 "C:\Users\srobertson\Desktop\Nexus 5 7-15-2014 DCIM"
Best to avoid spaces though.
I'll put this in the guide, thanks.
Click to expand...
Click to collapse
Thanks so much for your help
I ended up taking the leap and performing a Factory reset from TWRP and when I logged back into the phone I saw all my media was still present Whew.
just for posterity I went ahead and tried your code in ADB to make sure the quotes worked and it did so thank you very much and i will keep those notes handy for next time.

Categories

Resources