[Q] Internal Storage "lost" after flashing custom ROM - LG Optimus G Pro

My phone was on stock ROM. Installed FreeGee and used CWM to make a backup and flash a 5.1 ROM.
Appeared to be successful but I noticed that the files on my internal storage were gone when checking using File Manager. Tried ES File Explorer and set to show hidden files but still cant find them at /storage/emulated which appeared to be the new directory of internal storage for 5.1.
But checking free space from Settings>Storage shows that the files should still be somewhere in my phone. So I tried to reboot into recovery and from there I can see the files at /storage/sdcard0. On the other hand, from recovery mode I can't find the files located at /storage/emulated which is where my newly downloaded gapps zip went after downloading it using the 5.1 ROM.
I can't figure out what to do so I decided to flash back to stock ROM using my backup. I was able to do so and I can see my files now again at /storage/sdcard0. But I decided to try to flash a custom ROM again and used TWRP App to install recovery. I tried to reboot and my phone went stuck with message "LG E985 Optimus Pro Secure Booting Error! Cause: boot certification verify". Did some research and used LG Flash Tools to flash the stock KDZ. Phone is running again now but my files are still missing from internal storage.
I used ES File Explorer and see the following directories:
storage/emulated/0 - contains some files after I flash the stock ROM again - newly taken pictures,videos, and downloaded files - 124.86 MB
storage/sdcard0 - appears to be now a shortcut directory pointing to the same contents of storage/emulated/0 - 124.86 MB
external_SD - contains files from my micro SD
Settings>Storage shows Im using more than 8 GB space so I'm pretty sure my old files are still in the internal storage. I suspect this has something to do with storage/sdcard0 now pointing to storage/emulated/0 instead of going to where my previous internal storage files was. I want to recover the files from my internal storage. Any fix for this? Run out of ideas and decided to post here. Thanks!

Are you on stock 4.4.2 or on stock 4.1.2? Which variant?

ShadySquirrel said:
Are you on stock 4.4.2 or on stock 4.1.2? Which variant?
Click to expand...
Click to collapse
I was using the stock 4.1 E980 then used CWM by FreeGee to flash 5.1 SlimLP (thanks for the rom btw ).
Everything seems fine except 2 things: I lost access to "storage/sdcard0". Files that I download while using the 5.1 ROM are being put to "storage/emulated/0" instead; and a WiFI access point that I can see while using 4.1 is no longer available while using 5.1
I have a couple of soft bricks and flashing afterwards . 4.1 to 5.1 and returned to 4.1. Tried to flash TWRP recovery instead and got a soft brick which I assume was due to bootloader still being locked. Did some more flash. Able to flash stock 4.4 KDZ and from there, restored my backup of stock 4.1. From there, I can see again the contents of "storage/sdcard0" but then I cant find the files I downloaded while using 5.1 stored on "storage/emulated/0".
I backup the contents of my internal storage while using 4.1 and flashed again the 5.1 SlimLP. I regain access to "storage/emulated/0"" and lost access to contents of "storage/sdcard0" in return. Can't really figure out the exact cause of this.

Directory symlinks differ between android versions; 4.4 onwards expects everything to be under /storage/emulated/0 (which is symlinked to /storage/sdcard0/0 or something like that), while 4.1 expects stuff to be under /storage/sdcard0 or /storage/sdcard, on some ROMs even under /mnt/sdcard or directly in /sdcard. Everything on your internal is there, just 4.4+ ROMs think that your internal memory is fixed in /storage/emulated/0... I know, mess. Had same dillema first time I've flashed mine 3yrs ago, took me some time to understand where the heck my files went
I think that all ROMs have common /sdcard symlink, check that one. It should contain all your data. If there isn't anything under /sdcard, snoop around /data.. Everything you saved while on lollipop should be under '0' folder somewhere (/data/media perhaps? just a blind guess).

ShadySquirrel said:
Directory symlinks differ between android versions; 4.4 onwards expects everything to be under /storage/emulated/0 (which is symlinked to /storage/sdcard0/0 or something like that), while 4.1 expects stuff to be under /storage/sdcard0 or /storage/sdcard, on some ROMs even under /mnt/sdcard or directly in /sdcard. Everything on your internal is there, just 4.4+ ROMs think that your internal memory is fixed in /storage/emulated/0... I know, mess. Had same dillema first time I've flashed mine 3yrs ago, took me some time to understand where the heck my files went
I think that all ROMs have common /sdcard symlink, check that one. It should contain all your data. If there isn't anything under /sdcard, snoop around /data.. Everything you saved while on lollipop should be under '0' folder somewhere (/data/media perhaps? just a blind guess).
Click to expand...
Click to collapse
Many thanks. Found my lost data in a directory in Storage folder using Root explorer.

Related

[Q] Storage space issues after updating from CM 10 to 10.1 M2

I just updated from cyanogenmod 10 (stable) to 10.1 M2 using goomanager to flash the rom and the 20130301 gapps (didn't set it to make backup or wipe anything). Phone seems to be running everything fine but my storage space is wrong. It shows 2.17 available, 2.20 for Apps, 2.23 for picture and video an negligible everything else. Total space 13.33. Using an app called "Storage Analyser" I can see that in /data/media I have 9.3GB and it has all the old info in it from CM10 as well as the new info in the new "0" folder (which will include the 2.2GB picture and video data above) and 4.85GB in a folder called ".dumpster".
So, I guess the questions are:
did I do something wrong when updating the app that it kept all this old information? When I updated from stock to CM10 it put all the old info into a folder called "0" I think, but I could see that in normal file explorers/windows and delete it easily. Not the case here - I had to go into root mode etc to see the files.
can I / should I be deleting every folder in data/media except for the "0" folder? If not, what should I be doing?
Appreciate any help. Would like to avoid messing my phone up by deleting things I shouldn't and also don't want to have to full wipe and reinstall CM10.1 just to get arround this issue
/data/media should have three folders in it once you're on Android 4.2: 0, legacy, and obb. The "0" folder is what, after fuse mounts and symlinks, ends up as /sdcard and read by Windows via MTP. That's why you couldn't see the other files in /data/media on Windows.
If all of your data is in /data/media/0, then anything other than the three folders listed above can be deleted from /data/media. If you're unsure, don't hesitate to transfer the files to your PC as a failsafe backup (zip, move to /data/media/0, and copy it off via MTP; adb pull it; etc) before deleting.

[Q] ANY method to clean up the "0" directories?

Hi,
I know that for some ROMs that when you flash them, you will get a "0" directory (I forgot the exact reason, but something to do with multiuser?)
I have been playing around with various ROMs lately, and they have been creating "0" directories inside my currently existing "0" directories (eg. sdcard0/0/0)
This was not a big issue for me back when I had just one 0 directory, but now that I have a couple inside each other, titanium backup restores app data to directories that is not visible to some of my apps like S Note. (Plus it is eating up my internal sd card memory) Temporarily, I currently just cut and pasted my .snb files for my S Note to the working directory so I can view them on my phone for now.
Does anyone know of ANY method (I mean ANY method. I don't mind having to do factory reset/wipe, flashing the ROM again, etc) to clean up my internal sd card?
I've already tried flashing stock ROM and unrooting, then rooting and flashing a new ROM again, but that did not work.
Thanks!
A full reflash with odin will do it otherwise I think theres a cleanup zip somewhere in one of the cm 10.1 threads
mrevankyle said:
A full reflash with odin will do it otherwise I think theres a cleanup zip somewhere in one of the cm 10.1 threads
Click to expand...
Click to collapse
I tried flashing the stock ROM with Odin, and rooting it again with Odin, but it still left the 0 files there.
Can you tell me a little bit more about the cleanup zip for CM10.1?
Wipe Data with TWRP. Backup everything you need and remove your external SD card first.
jmapark91 said:
Hi,
I know that for some ROMs that when you flash them, you will get a "0" directory (I forgot the exact reason, but something to do with multiuser?)
I have been playing around with various ROMs lately, and they have been creating "0" directories inside my currently existing "0" directories (eg. sdcard0/0/0)
This was not a big issue for me back when I had just one 0 directory, but now that I have a couple inside each other, titanium backup restores app data to directories that is not visible to some of my apps like S Note. (Plus it is eating up my internal sd card memory) Temporarily, I currently just cut and pasted my .snb files for my S Note to the working directory so I can view them on my phone for now.
Does anyone know of ANY method (I mean ANY method. I don't mind having to do factory reset/wipe, flashing the ROM again, etc) to clean up my internal sd card?
I've already tried flashing stock ROM and unrooting, then rooting and flashing a new ROM again, but that did not work.
Thanks!
Click to expand...
Click to collapse
First of all take a nandroid backup. Save it on sdcard and on your pc/laptop. Than copy all in folder 0 to root of int sdcard amd then delere folder 0. Restart your phone and all is now ok. Tips++ instal Omega rom 43.1 the mostly stabile rom ever.
Not forget to allways read OP before flash something.. have a nice evening..
Sent from my GT-I9300 using xda premium
I had luck changing the permissions of the 0 folder in TWRP to 755, rebooting, and deleting the 0 folder in Root Explorer. Everything defaulted back to /sdcard after that. Make sure to copy anything you don't want to lose out of the 0 folder before deleting it.

Internal storage semi corrupted

Yesterday went from liquid smooth to miui, then decided to go back to 4.2 well when I formated system and data in twrp and I went to install 4.2 again I noticed that I literally had no files to flash no back up to restore. So I downloaded LS and put it on my external and all was well. I noticed that my internal had no access to my previous files but said I was still using 6GB of storage. I had to format in recovery which sucked but all is well.
I was just wondering why and how could I prevent this in the future. I am assuming has to do with going from 4.2 to 4.1. BTW when I had miui I could still access files just in the "0" folder I used root browser to put those folders back in the root of SD card. It wasn't till I went went into recovery that this happened you know after I had formated the system :-s
Sent from my SGH-T999 using xda premium
md1008 said:
Yesterday went from liquid smooth to miui, then decided to go back to 4.2 well when I formated system and data in twrp and I went to install 4.2 again I noticed that I literally had no files to flash no back up to restore. So I downloaded LS and put it on my external and all was well. I noticed that my internal had no access to my previous files but said I was still using 6GB of storage. I had to format in recovery which sucked but all is well.
I was just wondering why and how could I prevent this in the future. I am assuming has to do with going from 4.2 to 4.1. BTW when I had miui I could still access files just in the "0" folder I used root browser to put those folders back in the root of SD card. It wasn't till I went went into recovery that this happened you know after I had formated the system :-s
Sent from my SGH-T999 using xda premium
Click to expand...
Click to collapse
Did you check the data/media after reinstalling 4.2 (mnt/shell/emulated works too; it's a mount of data/media)? Some of my old pre-rooted files are still there.
4.2 exclusively uses the "0" directory. Meaning, once you move your files elsewhere, they won't be found by default (just like 0 wasn't set as your sdcard directory in 4.1) until you move your files back (or TWRP does it for you).
Based on lines like:
Code:
#ifdef RECOVERY_SDCARD_ON_DATA
if (PartitionManager.Mount_By_Path("/data", false) && TWFunc::Path_Exists("/data/media/0"))
SetValue(TW_INTERNAL_PATH, "/data/media/0");
#endif
in the commit from twrp here: https://github.com/TeamWin/Team-Win-Recovery-Project/commit/16b74353d99615b4acbb60f3fbe49f4443e0365f
as long as you have a data/media/0 folder, TWRP won't migrate your older stuff to "0" (which fixes the old multiple "0" files problem [mnt/shell/emulated/0/0/0/0]), instead it just sets the path to data/media/0 if it already exists (which I'm assuming in your case was empty, because you moved your files).
I did not check and as of now too late to check. Good info though
Sent from my SGH-T999 using xda premium

[Q] Beanstalk 4.3 - help accesing old userdata

Hi folks, so yesterday I flashed this awesome rom beanstalk 4,3 but made the mistake of not backing up the data from the internal memory such as dcim folder and other folders I had in the root of the drive. Since I had done the same before when installing 4.2 I thought it wouldn't be a problem, lo and behold I cant find my folders anywhere anymore, but I know that my data is there because when I go to storage it shows that I have 2 gig free under my internal memory and there is no other data on the phone- pictures or otherwise to be found. I was able to recover most of my pictures and videos by using diskdigger (awesome app) under diskdigger my data is here /dev/block/platform/msm_sdcc.1/by-name/userdata showing the full 12 gigs of my device. Is there any way to mount this and then copy my data from there? I have tried finding my lost folders there by using root browser but there is nothing to be found, please help kind people of XDA. Thank you.
From your root browser try going to /storage/sdcard0/
Sent from my SGH-T999L using Tapatalk 4
under sdcard0 there is only the files and folders that beanstalk created, I was on dandroid 4.6 which is 4.1.2 I believe. Those folders and files that I had under that install are the ones missing and are nowhere to be found. The reason I suspect that they are there is because under storage there is only a small amount of data that the system actually created. I have attached a picture that will hopefully explain it better. My phone is a T999 by the way. Thank you for your help.
Update!!! I installed CWM recovery and when I select install zip/ choose zip from sdcard I can see that all my folders and hopefully files are there...any ideas on how to mount this on windows or even on android so I can copy it into the external sdcard. On the bottom it says /storage/sdcard1: Mounted....anyone? Please help. Thank you.
Solved CWM recovery did the trick in my attempt to back up the data through CWM it made a recovery zip instead under mnt/shell/emulated when I went to delete this zip I found all my folders and files. Before there was nothing in that folder I guess that CWM gave it rights to be read...go figure????

[Q] Strange file directory structure

I’m rooted and using CW for my recovery. I’m using a pre-owned phone that I (thought) I wiped before rooting. I am running stock 4.2.2, baseband MDL.
Initially all I wanted to do was nandroid to my SD card in preparation for flashing a custom ROM. I have a 32GB card that my phone recognizes just fine, so I thought it would make sense to put the backup there. So I enabled Use External Storage in ROM Manager settings and tried to begin the backup process.
First I tried it using the ROM Manager itself. Got this error message:
Unknown volume for path [/external_sd/clockworkmod/backup/name of the backupfile here]
/tmp/recovery.log was copied to /sdcard/clockworkmod/recovery.log
Please open ROM Manager to report the issue​
Then I tried doing it by going straight into Recovery and initiating it myself. That was in the Backup and Restore menu. The Backup location options were
/sdcard
/storage/sdcard1
Neither of those is the external card. Then I looked at the Advanced menu but there was no option that mentioned the external card. So it seems that the Recovery doesn’t see my external card. And the subdirectory options that Recovery wants to use do not exist on my phone.
At first I thought it was my SD card. I removed it, re-formatted it (non-Quick) on my computer, etc. I was still not able to save my recovery to my SD card. Again I see that CW want to put the recovery in a subdirectory that does not exist.
I was able to nandroid to the internal memory, so at least there’s that. But the file directories on my card are a mess that make no sense and don’t seem to match what I’ve seen on multiple forums.
Using ES File Explorer I see this from the root directory -
/storage/emulated/0
/storage/emulated/legacy
/storage/extSdCard
/storage/sdcard0 – this one has a little arrow at the start of the pathname. Does that make it a shortcut?
/storage/container – this one has a little arrow at the start of the pathname. Does that make it a shortcut?
Also from the root directory I see this –
/sdcard/ – this one has a little arrow at the start of the pathname
Then there are these –
/mnt which seems to have copies of sdcard and extSdCard
/mnt_1 which just has extSdCard, sdcard_1, sdcard_2, and sdcard_3
I’m running 4.2.2, baseband MDL. What I would like to do is get the directory structure back to stock and remove all the multiples of data and folders that I am seeing.
1. If I totally wipe the phone, will the stock file structure be restored?
2. If the answer to #1 is “yes”, what happens if I do an Advanced Restore, restoring Data from a nandroid created with the screwy structure? Does the screwy structure return?
Thanks,
Veronica
re: nandroid backup/restore
verngator said:
I’m rooted and using CW for my recovery. I’m using a pre-owned phone that I (thought) I wiped before rooting. I am running stock 4.2.2, baseband MDL.
Initially all I wanted to do was nandroid to my SD card in preparation for flashing a custom ROM. I have a 32GB card that my phone recognizes just fine, so I thought it would make sense to put the backup there. So I enabled Use External Storage in ROM Manager settings and tried to begin the backup process.
First I tried it using the ROM Manager itself. Got this error message:Unknown volume for path [/external_sd/clockworkmod/backup/name of the backupfile here]
/tmp/recovery.log was copied to /sdcard/clockworkmod/recovery.log
Please open ROM Manager to report the issue​Then I tried doing it by going straight into Recovery and initiating it myself. That was in the Backup and Restore menu. The Backup location options were
/sdcard
/storage/sdcard1
Neither of those is the external card. Then I looked at the Advanced menu but there was no option that mentioned the external card. So it seems that the Recovery doesn’t see my external card. And the subdirectory options that Recovery wants to use do not exist on my phone.
At first I thought it was my SD card. I removed it, re-formatted it (non-Quick) on my computer, etc. I was still not able to save my recovery to my SD card. Again I see that CW want to put the recovery in a subdirectory that does not exist.
I was able to nandroid to the internal memory, so at least there’s that. But the file directories on my card are a mess that make no sense and don’t seem to match what I’ve seen on multiple forums.
Using ES File Explorer I see this from the root directory -
/storage/emulated/0
/storage/emulated/legacy
/storage/extSdCard
/storage/sdcard0 – this one has a little arrow at the start of the pathname. Does that make it a shortcut?
/storage/container – this one has a little arrow at the start of the pathname. Does that make it a shortcut?
Also from the root directory I see this –
/sdcard/ – this one has a little arrow at the start of the pathname
Then there are these –
/mnt which seems to have copies of sdcard and extSdCard
/mnt_1 which just has extSdCard, sdcard_1, sdcard_2, and sdcard_3
I’m running 4.2.2, baseband MDL. What I would like to do is get the directory structure back to stock and remove all the multiples of data and folders that I am seeing.
1. If I totally wipe the phone, will the stock file structure be restored?
2. If the answer to #1 is “yes”, what happens if I do an Advanced Restore, restoring Data from a nandroid created with the screwy structure? Does the screwy structure return?
Thanks,
Veronica
Click to expand...
Click to collapse
If you wipe the phone using it's internal "factory data reset"
(settings>accounts>backup and reset>factory data reset)
It will restore the stock phone's internal sdcard's structures, directories and folders.
But what I would suggest is to download and odin flash the TWRP custom recovery,
that way you will not loose any data or user files and you will not have any problems
making or restoring nandroid backups.
TWRP is really easy to use and basically self-explanatory.
Here is the direct download link for TWRP: http://techerrata.com/get/twrp2/jfltetmo/openrecovery-twrp-2.6.3.1-jfltetmo.tar
Good luck!
Misterjunky said:
If you wipe the phone using it's internal "factory data reset"
(settings>accounts>backup and reset>factory data reset)
It will restore the stock phone's internal sdcard's structures, directories and folders.
But what I would suggest is to download and odin flash the TWRP custom recovery,
that way you will not loose any data or user files and you will not have any problems
making or restoring nandroid backups.
TWRP is really easy to use and basically self-explanatory.
Here is the direct download link for TWRP: http://techerrata.com/get/twrp2/jfltetmo/openrecovery-twrp-2.6.3.1-jfltetmo.tar
Good luck!
Click to expand...
Click to collapse
Thanks!
Are you saying that using TWRP will preserve the file structures and that CW has some kind of effect on them...or that CW is the reason I can't put my backup on my SD card?
verngator said:
Thanks!
Are you saying that using TWRP will preserve the file structures and that CW has some kind of effect on them...or that CW is the reason I can't put my backup on my SD card?
Click to expand...
Click to collapse
CWM or TWRP do not effect the file structures.
All I am saying is create a nandroid backup using TWRP and then restore
the backup. Then if it works properly for you then keep using twrp.
You will be pleasantly surprised how well twrp works and how easy it is to use.
Good luck!

Categories

Resources