FORUMS

Index Project For XDA Device Subforums

Another ambitious project from the collaborative efforts of Recognized Contributors and Forum … more

The Atlas of XDA

A few weeks ago, we asked you “How Does Your Location Affect Your Life As A Power User?”. In the days that … more

New Snapdragons: Some Context & Contrast

It hasn’t been a good year for Qualcomm so far. Every device featuring the Snapdragon 810 … more

Google To Launch Next Gen Android One On July 14

The first gen of Android One devices to be launched in India in September 2014 were … more

what is /storage/emulated/legacy etc. and /storage/emulated/0 etc.

694 posts
Thanks Meter: 106
 
By donec, Senior Member on 13th January 2013, 03:57 AM
Post Reply Subscribe to Thread Email Thread
I am not rooted.

I have researched and every time someone talks about this topic they start refering to doing things in root. I am a Linux user specifically a Linux Mint 13 KDE. However! I don't work with the terminal and have not since my DOS days, nor do I want to. IMO I'm too old to bother with it.

Now I use ES File Explorer as my file browser and I see there seems to be a duplication of almost everything on my device yet there is not enough room on the Nexus 4 16GB to hold 2 of everything I have loaded onto it.

So I assume the extra stuff I see are sym-links (I don't realy understand what they are just that they are not real). Am I correct?

Why when an app looks for duplicates does it show the stuff in /storage/emulated/legacy etc. and in /storage/emulated/0 etc. and report them as the same size?

Why am I allowed to create a folder in /storage/emulated/0 or /storage/emulated/legacy if they just contain sym-links? IMO I should not have access to those folders without being rooted.

Why when I add a folder in /storage/emulated/0 or /storage/emulated/legacy does it show up in /sdcard?
 
 
6th May 2013, 12:35 PM |#2  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by donec

I use ES File Explorer as my file browser and I see there seems to be a duplication of almost everything on my device yet there is not enough room on the Nexus 4 16GB to hold 2 of everything I have loaded onto it.

So I assume the extra stuff I see are sym-links (I don't realy understand what they are just that they are not real). Am I correct?

Why when an app looks for duplicates does it show the stuff in /storage/emulated/legacy etc. and in /storage/emulated/0 etc. and report them as the same size?

Why am I allowed to create a folder in /storage/emulated/0 or /storage/emulated/legacy if they just contain sym-links? IMO I should not have access to those folders without being rooted.

Why when I add a folder in /storage/emulated/0 or /storage/emulated/legacy does it show up in /sdcard?

I was going to post a simpler version of this question: Why do I have [Android 4.2.2 on a Nexus 7] /storage/emulated/0/, /storage/emulated/legacy/, and /storage/sdcard0/ when they seem to have exactly the same contents? When, if I create something in /storage/emulated/0/ it's duplicated in the other two locations?

But I noticed this thread and decided to check it out. I am shocked that it'' gotten no response in five months.
6th May 2013, 02:45 PM |#3  
Nuu~'s Avatar
Senior Member
Thanks Meter: 122
 
More
Quote:
Originally Posted by Eric Weir

I was going to post a simpler version of this question: Why do I have [Android 4.2.2 on a Nexus 7] /storage/emulated/0/, /storage/emulated/legacy/, and /storage/sdcard0/ when they seem to have exactly the same contents? When, if I create something in /storage/emulated/0/ it's duplicated in the other two locations?

But I noticed this thread and decided to check it out. I am shocked that it'' gotten no response in five months.

They are basically the same thing. 2 mount points pointing to the same storage device and partition.
If you create something in one folder, it will show up in the other. Same applies for deleting stuff.
They do not take away more storage space, as it is only available once but shown twice.

You also don't need to worry about it in any way because file browsers normally set their default directory to one of these locations.

As far as i know, Google changed the mount points in Android 4.2 to /storage/emulated/0/ due to them switching to MTP and EXT4(?) for the sdcard. The other mount points are still there for compatibility.
Don't quote me on that, though.
Last edited by Nuu~; 6th May 2013 at 02:50 PM.
The Following User Says Thank You to Nuu~ For This Useful Post: [ View ]
6th May 2013, 04:14 PM |#4  
spaceman860's Avatar
Senior Member
Thanks Meter: 2,268
 
More
They changed it for multi-user feature

Sent from my Nexus 4
The Following 2 Users Say Thank You to spaceman860 For This Useful Post: [ View ]
22nd November 2013, 03:19 PM |#5  
Junior Member
Thanks Meter: 0
 
More
Can I delete "legacy"
Quote:
Originally Posted by Nuu~

They are basically the same thing. 2 mount points pointing to the same storage device and partition.
If you create something in one folder, it will show up in the other. Same applies for deleting stuff.
They do not take away more storage space, as it is only available once but shown twice.

You also don't need to worry about it in any way because file browsers normally set their default directory to one of these locations.

As far as i know, Google changed the mount points in Android 4.2 to /storage/emulated/0/ due to them switching to MTP and EXT4(?) for the sdcard. The other mount points are still there for compatibility.
Don't quote me on that, though.

Can I delete the legacy folder without harming anything?
22nd November 2013, 03:25 PM |#6  
Senior Member
Thanks Meter: 85
 
More
Quote:
Originally Posted by DEFI4NT

Can I delete the legacy folder without harming anything?

Did you read the post that you quoted ?

"If you create something in one folder, it will show up in the other. Same applies for deleting stuff."
The Following User Says Thank You to lapocompris For This Useful Post: [ View ]
22nd November 2013, 03:45 PM |#7  
Senior Member
Thanks Meter: 94
 
More
Quote:
Originally Posted by DEFI4NT

Can I delete the legacy folder without harming anything?

Why would you even want to delete it in the first place? You wouldn't be gaining anything is just another mount point.

Sent from my Nexus 4 using Tapatalk
22nd November 2013, 05:31 PM |#8  
Senior Member
Thanks Meter: 783
 
More
....
Last edited by eksasol; 26th December 2013 at 06:40 AM.
22nd November 2013, 11:18 PM |#9  
opssemnik's Avatar
Senior Member
Flag Porto Alegre,Rio Grande Do Sul,Brasil
Thanks Meter: 933
 
More
/storage, /sdcard are sym linked folders,that means when you open one of those, it redirects to the original(/data/media/0), as for the 0 is just a multi user feature implemented in android 4.2, but only enabled on tablet androids.
Why do this Sym-Link?: simple so it dosent break apps(not only file explorer type of app, but all apps).
Still dont get, why it would break?.Simple. android api have lots of ways to write/read files from folders, u can do manually,u can get the data path, u can get the sdcard path, etc,etc. so to not break that they just does these sym links, thats why in one app the storage contentents are listed on /sdcard but on others, is /storage, etc,etc. one example of an app that broke because of these changes to android is titanium backup, u need to change the internal storage on it, so it work.
19th July 2014, 06:02 PM |#10  
Junior Member
Mumbai
Thanks Meter: 0
 
More
Post Are they really symlinks?
I want to make sure that they are sym linked files/ folders and not additional copies as it will directly impact the storage.
Emulated storage is the only reason i have not upgraded yet to Android 4.4 yet, despite ROMs being available ages ago..

1. Please let me know for confirmation, if there is no impact on storage space.
2. Can Link2SD be used in 4.4 with emulated storage?
3. If there is a file and its sym link/ copy; are the rights equally assigned to both files/ folders?
I mean to ask if there is a provision to have root previlege on the original file and read only rights on the sym link ? Is it possible??
the main reason for this question is that, if by mistake i do something on the sym lilnk, it should not affect the original file.
and whatever change i wish to operate on, i can do it on the original file itself.


Regards
Dwipen



Quote:
Originally Posted by opssemnik

/storage, /sdcard are sym linked folders,that means when you open one of those, it redirects to the original(/data/media/0), as for the 0 is just a multi user feature implemented in android 4.2, but only enabled on tablet androids.
Why do this Sym-Link?: simple so it dosent break apps(not only file explorer type of app, but all apps).
Still dont get, why it would break?.Simple. android api have lots of ways to write/read files from folders, u can do manually,u can get the data path, u can get the sdcard path, etc,etc. so to not break that they just does these sym links, thats why in one app the storage contentents are listed on /sdcard but on others, is /storage, etc,etc. one example of an app that broke because of these changes to android is titanium backup, u need to change the internal storage on it, so it work.

Post Reply Subscribe to Thread
Previous Thread Next Thread