FORUMS
Remove All Ads from XDA

[Q] /emulated/0 and /emulated/legacy

214 posts
Thanks Meter: 29
 
By ballisticn8, Senior Member on 6th September 2013, 04:54 PM
Post Reply Email Thread
Alright, so I was kinda flipping between ROMs, Hyperdrive, Bonestock, Beanstown, and even a couple of AOSP ROMs. After all that flashing I realized I had a bunch of crap on my internal memory that I didnt need or want in there, so without even thinking about researching it before doing it I booted into recovery (TWRP) and formatted my internal memory.

Oops.

So, since then I have applied the one click return to stock that odins a stock MDK image. I applied the stock MDK recovery. I booted into the stock recovery and wiped and factory reset everything besides doing the reset and delete everything from the settings menu.

Maybe its just me not paying attention but I am noticing something after starting fresh that I dont remember noticing before.

I have moved pictures from my External Memory card back to my internal memory card and I the files show up in two places, /storage/emulated/0 and /storage/emulated/legacy... My pictures in Gallery are also showing up as in two places, even after restoring back to stock mdk, stock recovery, wiping everything, etc. Is this normal? Is it just something that I missed and didnt pay attention to beforehand? I dont remember the internal memory being like this prior to my attempt to format it in TWRP but hey, what do I know... It doesnt look like the files are being duplicated it looks like its a system thing that shows two different locations that are actually the same lcoation but really, I'm too stupid to know better. Is there a way for gallery not to show the same files twice since it doesnt look like the files are actually duplicated but just maybe some sort of internal link from the folders showing two seperate locations?

If I am wanting to restore files from my ext card that I backed up should they be put in /0 or /legacy or does it even matter?

Any help or advice would be greatly appreciated!
 
 
6th September 2013, 05:15 PM |#2  
jd1639's Avatar
Recognized Contributor
Minnesota
Thanks Meter: 5,432
 
Donate to Me
More
I'm pretty sure they are the same thing. I've noticed something similar on my phone.
6th September 2013, 05:43 PM |#3  
/0 folder was created when we went to Android 4.2 (becuase of the ability to have user profiles) So system need a way to install apps on a per user basias.

The /legacy is for olders apps that are still written for Android 4.1.2 and below.

I hope I got that right. lol
The Following 2 Users Say Thank You to Gunthermic For This Useful Post: [ View ] Gift Gunthermic Ad-Free
16th December 2013, 03:55 AM |#4  
ccs86's Avatar
Senior Member
Thanks Meter: 65
 
More
Quote:
Originally Posted by Gunthermic

/0 folder was created when we went to Android 4.2 (becuase of the ability to have user profiles) So system need a way to install apps on a per user basias.

The /legacy is for olders apps that are still written for Android 4.1.2 and below.

I hope I got that right. lol



Not on my HTC One. Those two folders appear to be duplicates of my entire sdcard.

Can I delete the legacy directory without issue?
16th December 2013, 06:52 AM |#5  
MehStrongBadMeh's Avatar
Senior Member
Free Country, USA
Thanks Meter: 60
 
More
Quote:
Originally Posted by ccs86

Not on my HTC One. Those two folders appear to be duplicates of my entire sdcard.

Can I delete the legacy directory without issue?

They are symbolic links that directory. As a result, they take up next to no space. Deleting them would be inviting trouble for, quite literally, no benefit.
The Following User Says Thank You to MehStrongBadMeh For This Useful Post: [ View ] Gift MehStrongBadMeh Ad-Free
16th December 2013, 11:54 AM |#6  
Senior Member
Flag Gillette
Thanks Meter: 137
 
More
Do not delete either one. I did that on my Galaxy nexus and deleted all my files they are linked together somehow

Sent from my SCH-I545 using Tapatalk
16th December 2013, 11:11 PM |#7  
Member
Thanks Meter: 7
 
More
Quote:
Originally Posted by Gunthermic

/0 folder was created when we went to Android 4.2 (becuase of the ability to have user profiles) So system need a way to install apps on a per user basias.

The /legacy is for olders apps that are still written for Android 4.1.2 and below.

I hope I got that right. lol

This is correct. They are simply symbolic links pointing to the same directory. No worries.
29th December 2013, 04:10 AM |#8  
Junior Member
Thanks Meter: 1
 
More
same issue but doubleing the space used on internal memory
So I have the legacy and 0 folders same size same files. The problem is I have this awesome HTC one mini but stupid none expandable memory. I have not put but about five gigs in my phone, but with these two folders showing twice my phone is counting it twice. Basically I ha e no free space on my phone. Only half is actually there. WTF do I do?
30th December 2013, 02:45 AM |#9  
k1mu's Avatar
Senior Member
Flag Virginia
Thanks Meter: 1,623
 
Donate to Me
More
Quote:
Originally Posted by skoobbarnes

So I have the legacy and 0 folders same size same files. The problem is I have this awesome HTC one mini but stupid none expandable memory. I have not put but about five gigs in my phone, but with these two folders showing twice my phone is counting it twice. Basically I ha e no free space on my phone. Only half is actually there. WTF do I do?

No, they're not using the space twice.

/storage/emulated/legacy/ is a pointer to /storage/emulated/0/

Anything in /storage/emulated/legacy also shows up in /storage/emulated/0 but they are the same file.

If you delete something in /0/ it will also be deleted in /legacy/ which means it's gone. Same thing happens if you delete anything from /legacy/.

It's not counting twice, you are. If you try to free space by deleting one of these, you will lose files you need. Look elsewhere for ways to free up space.
31st December 2013, 03:32 AM |#10  
Junior Member
Thanks Meter: 1
 
More
Double files for sure.
Quote:
Originally Posted by k1mu

No, they're not using the space twice.

/storage/emulated/legacy/ is a pointer to /storage/emulated/0/

Anything in /storage/emulated/legacy also shows up in /storage/emulated/0 but they are the same file.

If you delete something in /0/ it will also be deleted in /legacy/ which means it's gone. Same thing happens if you delete anything from /legacy/.

It's not counting twice, you are. If you try to free space by deleting one of these, you will lose files you need. Look elsewhere for ways to free up space.

I used the script SuperWipe_M4_xpirt.zip to completely clean my Phone because after I copied to my pc then deleted all my titanium back up media and DCIM my sdcard only had 1.4gb in on it. On the device all those files still showed under my legacy and /0 folder and I found a third under storage in the device. This is something funky. So after the SuperWipre Script from thread http://forum.xda-developers.com/show....php?t=2423576 I then flashed 4.3 sense 5.5 from thread http://forum.xda-developers.com/show....php?t=2575766 and now I have 11 gb on my phone. I will pay more attention to my storage when installing and changing things so I can see what, where, and/or how that happened. I have never encountered something like this before, nevertheless, i have never settle for a phone without external storage either. I wont ever do that again. But for a free phone plus a $56 credit to my account, I can't complain too much. Just a little. The One Mini is way better than the crappy lame POS LG Nitro HD .
3rd July 2015, 12:47 AM |#11  
Junior Member
Thanks Meter: 15
 
More
I deleted /storage because the only thing inside it was "emulated" which appeared to be a random file, as opposed to a folder with a 0 inside of it. Expectedly, it seems, I lost everything. (Even though it was inside /mnt/sdcard/ with all my other files, i.e. /mnt/sdcard/DCIM, /mnt/sdcard/Music, /mnt/sdcard/storage, etc, so I didn't think it could somehow lead back to my files). Am I totally screwed and everything is gone or is there a way to like recreate the links to the files or something? Not sure if this made things worse too, but I've already restarted the phone somehow hoping it would recreate the directory structure or something.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes