Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP donec

13th January 2013, 04:57 AM   |  #1  
donec's Avatar
OP Senior Member
Thanks Meter: 106
 
694 posts
Join Date:Joined: Aug 2012
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, 01:35 PM   |  #2  
Junior Member
Thanks Meter: 0
 
5 posts
Join Date:Joined: Apr 2013
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, 03:45 PM   |  #3  
Nuu~'s Avatar
Senior Member
Thanks Meter: 118
 
254 posts
Join Date:Joined: Nov 2012
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 03:50 PM.
The Following User Says Thank You to Nuu~ For This Useful Post: [ View ]
6th May 2013, 05:14 PM   |  #4  
spaceman860's Avatar
Senior Member
Thanks Meter: 1,562
 
2,037 posts
Join Date:Joined: Jan 2012
More
They changed it for multi-user feature

Sent from my Nexus 4
The Following User Says Thank You to spaceman860 For This Useful Post: [ View ]
22nd November 2013, 04:19 PM   |  #5  
Junior Member
Thanks Meter: 0
 
1 posts
Join Date:Joined: Nov 2013
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, 04:25 PM   |  #6  
Senior Member
Thanks Meter: 41
 
187 posts
Join Date:Joined: Dec 2012
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, 04:45 PM   |  #7  
Senior Member
Thanks Meter: 93
 
375 posts
Join Date:Joined: Jan 2012
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, 06:31 PM   |  #8  
Senior Member
Thanks Meter: 774
 
2,943 posts
Join Date:Joined: Nov 2009
....
Last edited by eksasol; 26th December 2013 at 07:40 AM.
23rd November 2013, 12:18 AM   |  #9  
opssemnik's Avatar
Senior Member
Flag Porto Alegre,Rio Grande Do Sul,Brasil
Thanks Meter: 778
 
1,204 posts
Join Date:Joined: Jun 2013
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, 07:02 PM   |  #10  
Junior Member
Mumbai
Thanks Meter: 0
 
3 posts
Join Date:Joined: Jun 2012
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes