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

Search This thread

ballisticn8

Senior Member
Mar 23, 2010
214
27
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!
 
Last edited:

jd1639

Inactive Recognized Contributor
Sep 21, 2012
16,833
5,404
Minnesota
I'm pretty sure they are the same thing. I've noticed something similar on my phone.
 

Gunthermic

Retired Forum Moderator
Mar 19, 2011
3,534
12,584
/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
 
  • Like
Reactions: rs70 and jd1639

ccs86

Senior Member
Nov 16, 2011
702
65
/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?
 

tshelby73

Senior Member
Dec 18, 2011
810
137
Gillette
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
 

WhoNeedszzz

Senior Member
Sep 19, 2013
83
7
/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.
 

skoobbarnes

Member
Jan 11, 2013
14
1
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?
 

k1mu

Senior Member
Apr 11, 2011
1,945
1,620
Virginia
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.
 

skoobbarnes

Member
Jan 11, 2013
14
1
Double files for sure.

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://xdaforums.com/showthread.php?t=2423576 I then flashed 4.3 sense 5.5 from thread http://xdaforums.com/showthread.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 .
 

sddfdds

Member
Nov 12, 2014
28
15
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.
 

Sharpshank

Member
Mar 16, 2014
5
2
Woodbury Heights
Anyone know how to fix this issue.

Build Number: LMY47X.G928PVPU2AOI6
Model Number: SM-G928P

/storage/emulated/0
/storage/emulated/legacy

They both contain the same files and are linked together. So if I erase something from one it is erased on the other. That's fine I understand they have the same files.

The issue is my phone is counting the space being used twice. Say I have 14 gb's of free space. Then I download a 2 gb file and I go from 14 gb to 10 gb free.

I also noticed that these 2 paths are linked and have the same files /storage/sdcard0 and /sdcard.

Now I've discovered that all 5 of these paths have the same files I have a Galaxy S6 so I only have internal memory.

/storage/emulated/0
/storage/emulated/legacy
/storage/sdcard0
/storage/sdcard
/mnt/sdcard

Please help it's bad enough I only have 25 gb of space to begin with. Having 12.5 is even worse.
 

whowatchlist

Senior Member
Nov 18, 2015
197
27
Build Number: LMY47X.G928PVPU2AOI6
Model Number: SM-G928P

/storage/emulated/0
/storage/emulated/legacy

They both contain the same files and are linked together. So if I erase something from one it is erased on the other. That's fine I understand they have the same files.

The issue is my phone is counting the space being used twice. Say I have 14 gb's of free space. Then I download a 2 gb file and I go from 14 gb to 10 gb free.

I also noticed that these 2 paths are linked and have the same files /storage/sdcard0 and /sdcard.

Now I've discovered that all 5 of these paths have the same files I have a Galaxy S6 so I only have internal memory.

/storage/emulated/0
/storage/emulated/legacy
/storage/sdcard0
/storage/sdcard
/mnt/sdcard

Please help it's bad enough I only have 25 gb of space to begin with. Having 12.5 is even worse.
Dammit this thread screwing with everyone. Every path is like the way to get to a file in your sd card. The two paths are like different sets of directions, but both lead to the same place.
 

Sharpshank

Member
Mar 16, 2014
5
2
Woodbury Heights
I know they are different paths but why the double space

Dammit this thread screwing with everyone. Every path is like the way to get to a file in your sd card. The two paths are like different sets of directions, but both lead to the same place.

I know they are different paths but why are they taking up twice the space? My S4 had the same paths but it didn't count the files twice towards used storage.

/storage/emulated = 7 gb
/storage/emulated/0 = 3.5 gb
/storage/emulated/Legacy =3.5 gb

Shouldn't /storage/emulated = only say 3.5 gb?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    /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
    1
    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.