[SOLVED] "E: can't mount /sdcard" CWM 6.0.4.5 after trying L preview. - Nexus 5 Q&A, Help & Troubleshooting

[SOLVED]
there may be other causes of this error, so there is no guarantee this will always be the fix.
"E: can't mount /sdcard"
in my case was "E: can't mount /sdcard" caused by some corrupted files in /data.
see here:
[email protected]:~$ adb shell
~ # mount /data
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/userdata on /data failed: Invalid argument
i was able to fix this with instructions from this thread: http://forum.xda-developers.com/goo...o-repairing-corrupted-data-partition-t2577447
boot phone into recovery, and ensure you are able to to see your device with the command:
sudo adb devices
then use this command:
adb shell ‘e2fsck /dev/block/platform/msm_sdcc.1/by-name/userdata’
it should prompt you to hit enter to repair several times. simply hit enter each time you are prompted until it resolves.
after that you should be able to access your data through recovery or adb pull.
the "/data/media/0/0/" problem
i thought we were passed this bug, but somehow i caused it again.
it isn't particularly difficult to fix, provided you have proper access to your data.
i just used solid explorer to move the contents of to "/data/media/0/0" to "/data/media/0" and "/data/media/0/clockworkmod" to "/data/media/clockworkmod".
any sort of root file manager should be fine.
original thread:
current situation: nexus 5 has no system data. i can get into fastboot and CWM recovery, but CWM can't perform any functions due to "E: can't mount /sdcard"
[update/edit:
[email protected]:~$ fastboot devices
0370333c437f5965 fastboot
[email protected]:~$ adb devices
List of devices attached
0370333c437f5965 recovery
]
is there anything i can do from fastboot?
should i reflash the recovery or use a different recovery?
do i have to flash stock images?
anyway to back up my data to my pc first?
full story (in case something dumb i did is relevant):
ok, so i flashed the L preview from vomer's thread (http://forum.xda-developers.com/google-nexus-5/development/rom-n5-l-developer-preview-t2796003), and yes i made a nandroid backup (wish i'd copied it to my pc now...)
i dirty flashed because i'm dumb and thought i would format /data anyway. it didn't, but actually didn't cause too many problems (no force closes, but the home button didn't work.)
i went back to recovery and formatted /data, /cache, and dalvik, then reflashed the L zip and made a backup of this fresh install.
messed around with L for awhile, but wanted to go back to my previous setup. so i went back to recovery to restore my nandroid. there was only that most recent backup in the list.
i poked around and realized my files were now located inside "/sdcard/0/0/" so i formatted /data, /cache, and dalvik and flashed my rom (latest aokp, 4.4.4) and gapps. the phone booted up fine but got infinite play services force closes. i assume this is because flashing my rom hadn't actually cleared /system first.
so i go back into recovery once more, format /system, and try to flash the rom again.
E: can't mount /sdcard
i'm assuming my data (and my backup) is still there somewhere in /sdcard/0/0/ but i have no idea how i might access it.
any help would be appreciated. i can definitely return to stock and start over, but i'd much rather have my data.
Click to expand...
Click to collapse

Fastboot flash the stock userdata.img
You'll need to adb pull everything from /data/media first
Yes you should use another recovery but not for this reason
Sent from my Nexus 5 using Tapatalk

rootSU said:
Fastboot flash the stock userdata.img
You'll need to adb pull everything from /data/media first
Yes you should use another recovery but not for this reason
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
i'm not super familiar with this. i've only really used adb with guides for specific tasks.
do i just use "adb pull /data/media /where/i/want/it/to/go"
i'm using ubuntu if that matters.

Yep.
Boot into recovery
Open terminal
mkdir sd_backup
adb shell
mount /data
exit
adb pull /data/media/* /sd_backup
Sent from my Nexus 5 using Tapatalk

rootSU said:
Yep.
Boot into recovery
Open terminal
mkdir sd_backup
adb she'll
mount /data
exit
adb pull /data/media/* /sd_backup
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
ahh, the "/data/media/*" was the part i was looking for.
not sure i understand the
"adb shell
mount /data
exit"
part.

vonlupe said:
ahh, the "/data/media/*" was the part i was looking for.
not sure i understand the
"adb shell
mount /data
exit"
part.
Click to expand...
Click to collapse
In what respect?
They're commands. Type them in the terminal
Sent from my Nexus 5 using Tapatalk

rootSU said:
In what respect?
They're commands. Type them in the terminal
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
[email protected]:~$ adb devices
List of devices attached
0370333c437f5965 recovery
[email protected]:~$ adb shell
~ # mount /data
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/userdata on /data failed: Invalid argument
~ # exit

Try and do "adb root" first..
Sent from my Nexus 5 using Tapatalk

rootSU said:
Try and do "adb root" first..
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
[email protected]:~$ adb root
adbd is already running as root
[email protected]:~$ adb shell
~ # mount /data
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/userdata on /data failed: Invalid argument
~ #

not sure if this is relevant or weird or not, but "datadata"??
[email protected]:~$ adb shell
~ # ls
boot fstab.hammerhead sdcard
cache init seapp_contexts
charger init.rc sepolicy
data internal_sd storage
datadata mnt sys
default.prop proc system
dev property_contexts tmp
emmc recovery ueventd.goldfish.rc
etc res ueventd.hammerhead.rc
external_sd root ueventd.rc
file_contexts sbin
fstab.goldfish sd-ext
~ #

vonlupe said:
[email protected]:~$ adb root
adbd is already running as root
[email protected]:~$ adb shell
~ # mount /data
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/userdata on /data failed: Invalid argument
~ #
Click to expand...
Click to collapse
[email protected]:~$ adb root
adbd is already running as root
[email protected]:~$ adb shell
~ # mount /data
~ # exit
[email protected]:~$
Click to expand...
Click to collapse
Could be your data partition is screwed too. Can you still boot into L? if not, I think your data is done for. Basically you have to format data going to and from L.
No idea what "datadata" is.

rootSU said:
Could be your data partition is screwed too. Can you still boot into L? if not, I think your data is done for. Basically you have to format data going to and from L.
No idea what "datadata" is.
Click to expand...
Click to collapse
no, i formatted /system, that's when everything broke.
thanks for all your help! i'm going to keep poking around, as i'd rather like to keep my data. i have the stock 4.4.4 images if i need to wipe though.

vonlupe said:
no, i formatted /system, that's when everything broke.
thanks for all your help! i'm going to keep poking around, as i'd rather like to keep my data. i have the stock 4.4.4 images if i need to wipe though.
Click to expand...
Click to collapse
Just fastboot flash the L system.img and boot.img

rootSU said:
Just fastboot flash the L system.img and boot.img
Click to expand...
Click to collapse
hmm, will that work?
will it boot without userdata.img?
it's just usuerdata that wipes everything, right?

vonlupe said:
hmm, will that work?
will it boot without userdata.img?
it's just usuerdata that wipes everything, right?
Click to expand...
Click to collapse
Userdata wipes data if flashed and no it is not a requirement. Will it work, not sure. Try it.
Also flash a cache.img just incase because dodgy cache can prevent mounting too
Sent from my Nexus 5 using Tapatalk

AHA!!
i found this thread: http://forum.xda-developers.com/goo...o-repairing-corrupted-data-partition-t2577447
which instructed me to run
‘e2fsck /dev/block/platform/msm_sdcc.1/by-name/userdata’ in adb shell.
and it worked!!!
i was able to mount /data and am currently running adb pull /data/media/ (no asterisk, btw)
and backing up all my data.
will update OP if this resolves everything.

Cool
Sent from my Nexus 5 using Tapatalk

Related

GT-n8010 (Wifi) Factory Mode

Hi,
Hope someone can figure this as its wrecking my brain.
I got an 8010 (wifi only version) a few days ago.
Did the clockwork and rooting and it was all working fine, until..
Booted it up this morning and it flashed a message 'Unfortunately, Factory Test has stopped. Factory Mode is ON!!' and gave me the 'calculator' program for putting in service codes.
I've checked the efs folder and its blank, no files. (I do not have a backup, yes I know I'm an idiot)
I've since tried flashing a number of roms, including stock. None of which have resolved the issue.
When using the stock recovery it gives me an error about being unable to mount /efs
From google it appears that the efs folder is to do with the imei and other areas. As mine is wifi only version should I even have this folder?
The note appears to work fine with the exception of having a lock screen, power off options etc.
thanks
BB
Have you tried to flash it over the PC with Odin and the Files from sammobile.com ??
Have you tried to repair the EFS with this Tool: http://forum.xda-developers.com/showthread.php?t=1308546 ?
update
Darkman_RS said:
Have you tried to flash it over the PC with Odin and the Files from sammobile.com ??
Have you tried to repair the EFS with this Tool: http://forum.xda-developers.com/showthread.php?t=1308546 ?
Click to expand...
Click to collapse
Hi,
I have tried with the N8010XWALG4_N8010XSAALG3_XSA from sammobile but am currently running the N8010-XXALH2-XAALH2-DBT-deodexed
Strangely enough I have just tried to connect with Kies, and it wont connect gives an error of 'No Sim Card inserted unable to continue communication'
I'm wondering if I've somehow confused my device into think its a 8000, when it is in fact an 8010.
I've tried the EFS Repair, it states that Locate /efs partition failed and can't locate any backups ;-((
I've just tried reflashing a stock rom via odin, selecting the re-partition and format efs section (got nothing to lose at this stage I guess)
I've also removed clockwork mod and gone back to stock recovery, which reads E:failed to mount /efs (Invalid arument)
would anyone have the .pit file / bootloader files? or are they built into the the pda rom?
thanks
BB
Pit file
Further testing has shown that the /efs partition does not exist or has become corrupt.
Would anyone have / or could make a pit file for a 32gb gt-8010?
Failing that would anyone know the terminal commands and dev location for making the /efs partition (make2fs ??)
Did you fixed the issue?
blue_bear said:
Further testing has shown that the /efs partition does not exist or has become corrupt.
Would anyone have / or could make a pit file for a 32gb gt-8010?
Failing that would anyone know the terminal commands and dev location for making the /efs partition (make2fs ??)
Click to expand...
Click to collapse
I have the same problem please advise?
Dont want to start another thread, i ran into this problem today and my solution
Assuming you have CWM installed on device and have androidsdk store on computer C: drive
1..Plug Device to Computer.. Reboot Device in CWM recovery/ mount storage/ mount system
2 on computer Shift+Ctrl +right click to open command window
command window type
cd c:/androidsdk/tools
adb shell
su
mke2fs /dev/block/mmcblk0p3
mount -w -t ext4 /dev/block/mmcblk0p3
reboot
this will create a generic EFS files on device
when you reboot you will see your screen with a yellow text..now time to get rid of it
root explorer/efs and delete factorymode(OFF) and replace with factorymode(ON)
reboot in recovery wipedata factory reset...done
you can do this with terminal also but i dont type well so this works best for me...tested only on 8013
Hello
I am getting the same problem.
Odin can not find partition. But I cant go to CWM, only download mode is possible. Any other way to start, it goes to a white screen...
BaDaB!ng505 said:
Dont want to start another thread, i ran into this problem today and my solution
Assuming you have CWM installed on device and have androidsdk store on computer C: drive
1..Plug Device to Computer.. Reboot Device in CWM recovery/ mount storage/ mount system
2 on computer Shift+Ctrl +right click to open command window
command window type
cd c:/androidsdk/tools
adb shell
su
mke2fs /dev/block/mmcblk0p3
mount -w -t ext4 /dev/block/mmcblk0p3
reboot
this will create a generic EFS files on device
when you reboot you will see your screen with a yellow text..now time to get rid of it
root explorer/efs and delete factorymode(OFF) and replace with factorymode(ON)
reboot in recovery wipedata factory reset...done
you can do this with terminal also but i dont type well so this works best for me...tested only on 8013
Click to expand...
Click to collapse
You made my day bro a lot of thanks its works for me thank u
ques
BaDaB!ng505 said:
Dont want to start another thread, i ran into this problem today and my solution
Assuming you have CWM installed on device and have androidsdk store on computer C: drive
1..Plug Device to Computer.. Reboot Device in CWM recovery/ mount storage/ mount system
2 on computer Shift+Ctrl +right click to open command window
command window type
cd c:/androidsdk/tools
adb shell
su
mke2fs /dev/block/mmcblk0p3
mount -w -t ext4 /dev/block/mmcblk0p3
reboot
this will create a generic EFS files on device
when you reboot you will see your screen with a yellow text..now time to get rid of it
root explorer/efs and delete factorymode(OFF) and replace with factorymode(ON)
reboot in recovery wipedata factory reset...done
you can do this with terminal also but i dont type well so this works best for me...tested only on 8013
Click to expand...
Click to collapse
hi, I sent u a msg, if u dont read msgs on private, qoute me her so i can ask ya her.
bless
BaDaB!ng505 said:
Dont want to start another thread, i ran into this problem today and my solution
Assuming you have CWM installed on device and have androidsdk store on computer C: drive
1..Plug Device to Computer.. Reboot Device in CWM recovery/ mount storage/ mount system
2 on computer Shift+Ctrl +right click to open command window
command window type
cd c:/androidsdk/tools
adb shell
su
mke2fs /dev/block/mmcblk0p3
mount -w -t ext4 /dev/block/mmcblk0p3
reboot
this will create a generic EFS files on device
when you reboot you will see your screen with a yellow text..now time to get rid of it
root explorer/efs and delete factorymode(OFF) and replace with factorymode(ON)
reboot in recovery wipedata factory reset...done
you can do this with terminal also but i dont type well so this works best for me...tested only on 8013
Click to expand...
Click to collapse
perfect
thx a lot
thank you sir, good job.
BaDaB!ng505 said:
Dont want to start another thread, i ran into this problem today and my solution
Assuming you have CWM installed on device and have androidsdk store on computer C: drive
1..Plug Device to Computer.. Reboot Device in CWM recovery/ mount storage/ mount system
2 on computer Shift+Ctrl +right click to open command window
command window type
cd c:/androidsdk/tools
adb shell
su
mke2fs /dev/block/mmcblk0p3
mount -w -t ext4 /dev/block/mmcblk0p3
reboot
this will create a generic EFS files on device
when you reboot you will see your screen with a yellow text..now time to get rid of it
root explorer/efs and delete factorymode(OFF) and replace with factorymode(ON)
reboot in recovery wipedata factory reset...done
you can do this with terminal also but i dont type well so this works best for me...tested only on 8013
Click to expand...
Click to collapse
Hi,
how is the zip to be used?
YOSEFE said:
Hi,
how is the zip to be used?
Click to expand...
Click to collapse
it is just factorymode file set to on
use root enabled file manager and copy to /efs over writing current one. but it's just as easy or easer to just edit current file and change OFF to ON
BaDaB!ng505 said:
Dont want to start another thread, i ran into this problem today and my solution
Assuming you have CWM installed on device and have androidsdk store on computer C: drive
1..Plug Device to Computer.. Reboot Device in CWM recovery/ mount storage/ mount system
2 on computer Shift+Ctrl +right click to open command window
command window type
cd c:/androidsdk/tools
adb shell
su
mke2fs /dev/block/mmcblk0p3
mount -w -t ext4 /dev/block/mmcblk0p3
reboot
this will create a generic EFS files on device
when you reboot you will see your screen with a yellow text..now time to get rid of it
root explorer/efs and delete factorymode(OFF) and replace with factorymode(ON)
reboot in recovery wipedata factory reset...done
you can do this with terminal also but i dont type well so this works best for me...tested only on 8013
Click to expand...
Click to collapse
@YOSEFE and @carl1961
hello
where I find this CWM and ANDROIDSDK ,,,??? ...she said " Assuming you have CWM installed on device and have androidsdk store on computer C: drive "
CWM what exactly is and where to find it ?
same for androidsdk where I find it ??
can you give me the real or good link plz ?? thanks
Hello,
CWM Recovery is found on www.clockworkmod.com
You need the one for your device.
You can Google search this and other file too. Be sure to read about CWM Recovery. It will trip knox on Samsung phones.
Sent from my SM-N910F using XDA Free mobile app
YOSEFE said:
Hello,
CWM Recovery is found on www.clockworkmod.com
You need the one for your device.
You can Google search this and other file too. Be sure to read about CWM Recovery. It will trip knox on Samsung phones.
Sent from my SM-N910F using XDA Free mobile app
Click to expand...
Click to collapse
@YOSEFE
I'm sorry but what this i don't understand where is the link plz direct links for download ?? thanks
I can not go and install apps because the tablet does not open
my device is GT-8010 WIFI ONL
edits
i have downloaded this "recovery-clockwork-6.0.4.6-n8000 ' and "recovery-clockwork-6.0.4.6-n8013" it's ok or no ?? here http://www.clockworkmod.com/rommanager
if yes how to install ??
joan62 said:
@YOSEFE
I'm sorry but what this i don't understand where is the link plz direct links for download ?? thanks
I can not go and install apps because the tablet does not open
my device is GT-8010 WIFI ONL
edits
i have downloaded this "recovery-clockwork-6.0.4.6-n8000 ' and "recovery-clockwork-6.0.4.6-n8013" it's ok or no ?? here http://www.clockworkmod.com/rommanager
if yes how to install ??
Click to expand...
Click to collapse
your best using one for 8013
https://goo.im/devs/Darkman/Recoverys/N8013-CWM-noTouch-6.0.3.6-ODIN.zip/
carl1961 said:
your best using one for 8013
https://goo.im/devs/Darkman/Recoverys/N8013-CWM-noTouch-6.0.3.6-ODIN.zip/
Click to expand...
Click to collapse
+1...
Sent from my SM-N910F using XDA Free mobile app
@YOSEFE @carl1961
please help with the screnns is possible I'm sorry but i don't understand
I enter the ligne but the command not working
he said not find
the ANROIDSDK IN c : drive /android /android-sdk.... it's ok the intallation ?
Install on C:\. Use ODIN to install Recovery. Make sure your device is in download mode.
Sent from my SM-N910F using XDA Free mobile app

[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.

[Q] No write permission infernal storage

Hello ,
i have a problem with my nexus 5.
I have flashed the second preview release of android L to test it. then i decided after a few hours to go back to stock 4.4.4 . i flashed it using linux fastboot and the factory image to make a clean install. but no only some google apps have write permission. the most apps failed. like whatsapp: cant download images or voice notes or make voice notes or sent a file. nothing than wrting.
after this i flashed with fastboot -w flag to erase all data (made a backup before) but the problem is still there. then i have flashed a custom kernel and cm (writing using cm and chrome because tapatalk failed) but the peoblem is still there.
tried to use terminal emulator and used:
su
chmod 755 /sdcard
but nothing happens.
has anyone an idea to figure this out?
The command to fix the internal storage is restorecon -FR /data/media/0
bitdomo said:
The command to fix the internal storage is restorecon -FR /data/media/0
Click to expand...
Click to collapse
i execute the command in the terminal emulator as su but it didnt work. :/
Edit:
Sorry, i have tried
chmod -R 755 /data/media/0
Click to expand...
Click to collapse
and it worked. Now all Apps have the normal write permission on the internal storage.

[HELP] Internal Storage not accessible a.k.a How to clear com.android.providers.media.MediaApplication data

Hi,
Since a few days I'm unable to see any data in my phone via gallery or file manager or any application, and I'm unable to save any data to internal storage. (example: I'm able to use whatsapp for texting, but I can't receive/send any audio/picture and I can't access the old ones).
And I keep getting this error message:"com.android.providers.media.MediaApplication keeps stopping."
I don't know if that's what causing it or if that's just a consequence of not being able to access internal storage.
I can still see all the used storage from settings though.
Phone has unlocked bootloader, but no root/custom rom/recovery.
I saw other Oneplus users started getting the same error these days... (I have a Oneplus 6, but others have different models like Oneplus Nord).
Someone resolved by wiping system and they were able to retrieve storage content and functionality, but they lost apps data, I'm trying to find another way since I have an unlocked bootloader.
An user on stackoverflow suggested I should clean the com.android.providers.media.MediaApplication app data to regenerate the database, but I couldn't figure out how to do it
I tried cleaning media and media.module packages (not media.MediaApplication) from adb but no luck even if successful.
I tried removing "com.android.providers.media" (not media.MediaApplication, I couldn't find that one) folder from data/data with twrp file manager but no luck...
Is there a way to specifically clean "com.android.providers.media.MediaApplication"?
If anyone has any other suggestion on things to try, post it here please.
Thank you in advance
you wrote you already did successfully - obviously that is not the cause. my suspect is broken encryption (you will figure out from recovery.log)
encrypted files look like this +NiZZaTrs3RFzYegpkEk if encryption is not the reason, it could be symlinks messed up. in android enable usb-debugging and check from adb shell.
(repeat this for each result)
Code:
readlink /sdcard
readlink ...
in TWRP recovery check for files like /data/system/uiderrors.txt
/data/log
(don't know exact names) you can adb pull files to PC and inspect with wordpad or Notepad++
last but no least you can capture logcat during boot for further analysis
Code:
adb logcat > logcat.txt
if you're going to factory reset device, install Magisk from TWRP and backup apps to usb flash drive with Migrate-NG beforehand. copy all your pictures + backups to PC
Code:
adb pull -a /sdcard
if you can't install Migrate or can't get usb-otg to work, get a backup to PC at least, I can tell you how to restore single apps from it later (ignore the confirmation request "WARNING adb backup is deprecated... Now Unlock your device and confirm...")
Code:
adb backup --twrp --compress data
alecxs said:
encrypted files look like this +NiZZaTrs3RFzYegpkEk if encryption is not the reason, it could be symlinks messed up. in android enable usb-debugging and check from adb shell.
(repeat this for each result)
Code:
readlink /sdcard
readlink ...
in TWRP recovery check for files like /data/system/uiderrors.txt
/data/log
(don't know exact names) you can adb pull files to PC and inspect with wordpad or Notepad++
last but no least you can capture logcat during boot for further analysis
Code:
adb logcat > logcat.txt
if you're going to factory reset device, install Magisk from TWRP and backup apps to usb flash drive with Migrate-NG beforehand. copy all your pictures + backups to PC
Code:
adb pull -a /sdcard
if you can't install Migrate or can't get usb-otg to work, get a backup to PC at least, I can tell you how to restore single apps from it later (ignore the confirmation request "WARNING adb backup is deprecated... Now Unlock your device and confirm...")
Code:
adb backup --twrp --compress data
Click to expand...
Click to collapse
Hi @alecxs , I really hope you are still active on this forum...
Probably you won't remember this discussion from back in the days (This was the previous part of our exchange if you would like to refresh your memory).
In the end I ended up using my phone in that state for more than one year with the plan of changing phone soon and not have to deal with the wipe and restoration on the same device (if that's not procrastination.... ).
Well, last week I dropped the phone and the screen died. I bought a pixel 7 as a replacement but now I would like to try to save the data of just a few apps. Most important one being Whatsapp, I don't really care about the rest...
So basically:
-the screen is dead but touch is still working and I was able to get scrcpy to work so I can still use it as a "normal' phone from my computer, so that shouldn't be an impediment.
-as previously stated the phone is not able to access internal storage, but I'm able to access it in recovery mode through adb so pulling files should not be an issue.
-I'm able to install and update apks through adb install.
-whatsapp was not able to execute backups during this year since it could not access internal storage, so I have only old ones.
-bootloader is unlocked, I have twrp but no root.
I still need to try your suggestion above, but wanted to ask this before cause maybe you have a different suggestion to extract a single app. Also, I don't really know how migrate works but if it saves the backup on the internal storage I think that's not gonna work cause every app that needs to save something (that isn't data) doesn't work.
Isn't there a way to just copy the data folder of the app on the new phone to transfer data (like what happens for mac apps)?
Thank you in advance
0xCuter said:
-as previously stated the phone is not able to access internal storage, but I'm able to access it in recovery mode through adb so pulling files should not be an issue.
Click to expand...
Click to collapse
yes, if that is true all fine, you can run the Migrate_EMERGENCY_FLASHABLE.zip from recovery and restore app data on other device with Migrate
alecxs said:
yes, if that is true all fine, you can run the Migrate_EMERGENCY_FLASHABLE.zip from recovery and restore app data on other device with Migrate
Click to expand...
Click to collapse
Hey, it's me again... So, I rooted my new phone and I found the emergency_flashable.zip in the migrate thread, now I just need to flash it, but I cannot use scrcpy in recovery mode to see the screen. I guess there is a way to flash the zip from adb without the need to use the screen, but better to ask since I don't want to do stupid stuff...
yes, you can do it from adb. best is MicroSD Card as target directory. copy the zip into the target directory, mount data system vendor product, then install zip. on the first trial it will fail because packages.list needed. but it will create one you can edit. delete unwanted packages before second trial. you can repeat as often you want, existing backups won't created twice.
Code:
adb push Migrate_EMERGENCY_FLASHABLE.zip /sdcard
adb shell
# mount /system_root
# mount /system
# mount /vendor
# mount /product
# mount /external_sd
# mkdir /external_sd/Migrate
# cd /external_sd/Migrate
# mv /sdcard/Migrate_EMERGENCY_FLASHABLE.zip .
# twrp install ./Migrate_EMERGENCY_FLASHABLE.zip
# exit
adb pull /external_sd/Migrate/packages.list
edit the file with editor and push it back
https://twrp.me/faq/openrecoveryscript.html
alecxs said:
yes, you can do it from adb. best is MicroSD Card as target directory. copy the zip into the target directory, mount data system vendor product, then install zip. on the first trial it will fail because packages.list needed. but it will create one you can edit. delete unwanted packages before second trial. you can repeat as often you want, existing backups won't created twice.
Code:
adb push Migrate_EMERGENCY_FLASHABLE.zip /sdcard
adb shell
# mount /system_root
# mount /system
# mount /vendor
# mount /product
# mount /external_sd
# mkdir /external_sd/Migrate
# cd /external_sd/Migrate
# mv /sdcard/Migrate_EMERGENCY_FLASHABLE.zip .
# twrp install ./Migrate_EMERGENCY_FLASHABLE.zip
# exit
adb pull /external_sd/Migrate/packages.list
edit the file with editor and push it back
https://twrp.me/faq/openrecoveryscript.html
Click to expand...
Click to collapse
One thing I forgot to ask: do I need to root my old phone as well or is twrp sufficient?
And to root I would just need to flash Magisk the same way I would flash the emergency flashable.zip right? Or can I just "twrp install [magisk_package]" without going into the shell?
No need to root old phone, TWRP already provides root access for backup purposes. the new phone should be rooted by flashing magisk patched boot.img because the TWRP install method is deprecated. I know I gave only short hints, so don't hesitate to ask for more detailed instructions in case you don't know what to do for some specific step...
alecxs said:
No need to root old phone, TWRP already provides root access for backup purposes. the new phone should be rooted by flashing magisk patched boot.img because the TWRP install method is deprecated. I know I gave only short hints, so don't hesitate to ask for more detailed instructions in case you don't know what to do for some specific step...
Click to expand...
Click to collapse
Thank You... Yes, the new phone is rooted.
One thing that's not needed for the process but I wanted to understand is: Is there a specific reason why we "twrp install" from shell or could in theory be possible to flash the zip file directly from pc storage?
0xCuter said:
or could in theory be possible to flash the zip file directly from pc storage?
Click to expand...
Click to collapse
the reason is, the backup is created locally in the same directory where the zip file is. never tried sideload but I guess it would try to store in /tmp which is RAM.
alecxs said:
yes, you can do it from adb. best is MicroSD Card as target directory. copy the zip into the target directory, mount data system vendor product, then install zip. on the first trial it will fail because packages.list needed. but it will create one you can edit. delete unwanted packages before second trial. you can repeat as often you want, existing backups won't created twice.
Code:
adb push Migrate_EMERGENCY_FLASHABLE.zip /sdcard
adb shell
# mount /system_root
# mount /system
# mount /vendor
# mount /product
# mount /external_sd
# mkdir /external_sd/Migrate
# cd /external_sd/Migrate
# mv /sdcard/Migrate_EMERGENCY_FLASHABLE.zip .
# twrp install ./Migrate_EMERGENCY_FLASHABLE.zip
# exit
adb pull /external_sd/Migrate/packages.list
edit the file with editor and push it back
https://twrp.me/faq/openrecoveryscript.html
Click to expand...
Click to collapse
I'm trying and when I do "mount /system" from the shell I get this:
mount: '/system' not in fstab
Click to expand...
Click to collapse
Is it normal?
it's either /system_root or /system so one of it will fail. I just listed both.
alecxs said:
it's either /system_root or /system so one of it will fail. I just listed both.
Click to expand...
Click to collapse
I suspected that... is it the same for product and external_sd?
Only system_root and vendor went through
/external_sd is the mount point for MicroSD Card, it may have a different name like /sdcard1 or something. if you have enough disk space on /data, no need for external SD.
/product is maybe not needed, just running with /system_root + /vendor is fine.
alecxs said:
/external_sd is the mount point for MicroSD Card, it may have a different name like /sdcard1 or something. if you have enough disk space on /data, no need for external SD.
/product is maybe not needed, just running with /system_root + /vendor is fine.
Click to expand...
Click to collapse
There is no external MicroSD on Oneplus 6... can I put the migrate folder in /sdcard?
Also, I think I should delete some stuff from storage to make space, since I already pulled it on the pc
/sdcard = /data/media can be used. you can split the packages.list file into few parts so it fits in remaining disk space.
alecxs said:
/sdcard = /data/media can be used. you can split the packages.list file into few parts so it fits in remaining disk space.
Click to expand...
Click to collapse
I tried the install and I get this, even though the zip file is in the same folder I'm in (it even autocompletes from terminal)
OnePlus6:/sdcard/Migrate # ls
Migrate_EMERGENCY_FLASHABLE.zip
OnePlus6:/sdcard/Migrate # twrp install Migrate_EMERGENCY_FLASHABLE.zip
Unable to locate zip file 'Migrate_EMERGENCY_FLASHABLE.zip'.
Installing zip file 'Migrate_EMERGENCY_FLASHABLE.zip'
Error installing zip file 'Migrate_EMERGENCY_FLASHABLE.zip'
Done processing script file
Click to expand...
Click to collapse
make sure you give a path to zip file on install, like ./ or full path. it will fail on first execution. check if packages.list was created successfully.
alecxs said:
on the first trial it will fail because packages.list needed. but it will create one you can edit.
Click to expand...
Click to collapse
you can always pull recovery.log afterwards to see what's going on.
Code:
adb pull /tmp/recovery.log
alecxs said:
make sure you give a path to zip file on install, like ./ or full path. it will fail on first execution. check if packages.list was created successfully.
you can always pull recovery.log afterwards to see what's going on.
Code:
adb pull /tmp/recovery.log
[/cod
[/QUOTE]
Click to expand...
Click to collapse
It launched with the full path. I didn't edit the package.list file and I launched it again.
I got a lot of "migrate.sh: failed:..." and just a few "migrate.sh: finish:..." mostly for system apps, but honestly I really only need to backup whatsapp...
...
Click to expand...
Click to collapse
migrate.sh: failed: com.intsig.lic.camscanner
migrate.sh: failed: com.android.theme.icon_pack.ci
migrate.sh: failed: com.google.android.apps.restor
migrate.sh: 397x packages failed / 0x already exist
# MIGRATE_STATUS: backup finished (27/424)
# DONE.
#
# exiting script
#
# # # # # # # # # # # # # # # # # # # # # # # # # #
Updater process ended with ERROR: 1
I:Install took 69 second(s).
Error installing zip file 'sdcard/Migrate/Migrate_EMERGENCY_FLASHABLE.zip'
Done processing script file
Click to expand...
Click to collapse
These are the things that have been backed up:
OnePlus6:/sdcard/Migrate # ls
Backup_android Backup_com.google.android.networkstack
Backup_com.android.bluetooth Backup_com.google.android.packageinstaller
Backup_com.android.cellbroadcastreceiver Backup_com.oneplus.screenshot
Backup_com.android.emergency Backup_com.qualcomm.qti.cne
Backup_com.android.inputdevices Backup_com.qualcomm.qti.poweroffalarm
Backup_com.android.location.fused Backup_com.qualcomm.qti.smq
Backup_com.android.phone Backup_com.qualcomm.qti.uceShimService
Backup_com.android.providers.blockednumber Backup_org.ifaa.aidl.manager
Backup_com.android.providers.settings Backup_se.dirac.acs
Backup_com.android.providers.telephony Backup_vendor.qti.hardware.cacert.server
Backup_com.android.proxyhandler Migrate_EMERGENCY_FLASHABLE.zip
Backup_com.android.server.telecom backup_app_and_data.sh
Backup_com.android.settings busybox
Backup_com.android.shell migrate.log
Backup_com.android.stk migrate.sh
Backup_com.android.systemui packages.list
Backup_com.google.android.ext.shared readme.txt
Click to expand...
Click to collapse

Categories

Resources