Android OS Forum banner

Sdcard 0 folder?

43K views 14 replies 12 participants last post by  Deyna  
#1 ·
So this new 0 folder is killing me, I understand where it came from with the new multiple user system. However I don't understand where my data is supposed to be stored. It seems there are multiple addresses for the same location (mnt/data/media/0=sdcard/emulated/0).

This picture shows kind of what I mean, I searched for a random file and it found that file 8 times. How many of those are the same thing? Where should that and all app data files actually be? What is the easiest/fastest way to move them?

Image


Sent from my Nexus 7 using Tapatalk 2
 
#2 · (Edited by Moderator)
In short in 4.1 and earlier the sdcard is physically at /data/media. In 4.2 its located at /data/media/0 or 1 or 2 and so on depending on the user. Their is one sdcard location mounted with fuse on all android versions for this phone and the rest of the locations are symlinks meaning you only have one copy of the data.

/storage/emulated/0 is the actual location in 4.2 that android and the PC look at and /storage/sdcard0 was for 4.1. Any other location than these and /data/media/0 or /data/media are symlinks.

And the interesting thing is that it wouldn't confuse anyone who is less knowledgeable but only those with some techie knowledge without a full grasp of the change. This is not against you but just an observation. I was a bit confused at first.

Sent from my Galaxy Nexus using Tapatalk 2
 
#3 ·
Peering around, I did find something interesting, at least where CWM is looking for its nandroids.. That caught me off guard a bit since it wasn't the standard location I was used to, hence I'm still having problems restoring my Nexus 7 right now. (hard to find 5 hours in my day because apparently I can't restore my 4.1.2 nandroid even though I reinstalled PA 2.54, which makes no sense)

This was the location: /mnt/storage/emulated - /storage may be a symlink maybe, but I wasn't paying attention to that much. Wonder if my nandroid got corrupt somewhere because even my earlier ones don't work.. only the 4.2 one does for some reason.
 
#4 · (Edited by Moderator)
You shouldnt even be playing around with stuff in /data/media as it's not emulating a fat32 filesystem there and changing filenames results in them acting as they do on ext4 (which is case sensitive).

Android uses fuse (http://en.wikipedia....em_in_Userspace) to emulate fat32 and mounts /data/media to /sdcard (well /sdcard for the current user, which is really pointing to the /mnt directory, but that's all a bit messy and not too important).

Use /sdcard (or /storage) like a user should and avoid /data/media. Anywhere else is just a symbolic link to the actual fuse mount located in /mnt so you're fine there.

Also you should only have one /0 dir and not two (as you have /0/0) so somewhere along the ways you installed something that screwed that up.
 
#5 · (Edited by Moderator)
I must have really screwed something up then. I've got emulated/0/0/0/0

Image


This is really bothering me because if i wanted to access a file I downloaded and I don't remember when I downloaded it, I have to search through 4 different files called download for it. I think this is a result from flashing different 4.2 Roms completely from cwm... And yes, its the latest cwm. 6.0.1.6

Sent from my Galaxy Nexus using Tapatalk 2
 
#15 · (Edited by Moderator)
Got to be careful when doing this. I tried doing it with Root Explorer when I realized that I had done the same thing and something messed up. Basically, I was left with the vast majority of my files gone. (There were 0KB files with their names in the places they should be.) Also, no recovery programs that I could find work with mtp.

Everything is fixed now and I had semi-recent backups to fall back on but be warned.