# Sdcard 0 folder?



## GatorsUF

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?










Sent from my Nexus 7 using Tapatalk 2


----------



## tiny4579

GatorsUF said:


> 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?
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Sent from my Nexus 7 using Tapatalk 2


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


----------



## TwinShadow

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.


----------



## yarly

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.


----------



## wdswds

I must have really screwed something up then. I've got emulated/0/0/0/0










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


----------



## Mustang302LX

If you have numerous /0 folders you tried flashing a 4.2+ ROM with an older CWM or TWRP version not meant for 4.2+. Simply go to the last /0 folder and move all of the contents back to /sdcard/0 and all will be fine. Then you can delete the extra /0 folders.


----------



## tiny4579

We need a flashable script to move the files back. I was thinking of creating one next week.

Sent from my Galaxy Nexus using Tapatalk 2


----------



## Mustang302LX

tiny4579 said:


> We need a flashable script to move the files back. I was thinking of creating one next week.
> 
> Sent from my Galaxy Nexus using Tapatalk 2


That would be nice so we could sticky it and have less threads regarding this issue.


----------



## xbdarkman

so i have a different issue.. all of my sd card contents from 4.1 are now in data/media and didn't get moved to data/media/0. i've tried moving them from data/media to data/media/0 with solid explorer and root browser and both failed to move them.

got any ideas?


----------



## masully84

xbdarkman said:


> so i have a different issue.. all of my sd card contents from 4.1 are now in data/media and didn't get moved to data/media/0. i've tried moving them from data/media to data/media/0 with solid explorer and root browser and both failed to move them.
> 
> got any ideas?


Storage/emulated/0, then select the folder. Try that

Sent from my Nexus 7


----------



## tiny4579

tiny4579 said:


> We need a flashable script to move the files back. I was thinking of creating one next week.
> 
> Sent from my Galaxy Nexus using Tapatalk 2


I haven't gotten around to this yet. There are fewer complaints now than there were but it'd still be nice to simplify backwards migrations. My script wouldn't handle anything other than a simple migration and not handle multiple 0 folders as trying to script it may mess things up.


----------



## Bretski169

So how does one locate the 0 folder on a pc, without adb? like just normally plugging it in and looking for it in "Internal storage" is that not possible?


----------



## Sandman007

Bretski169 said:


> So how does one locate the 0 folder on a pc, without adb? like just normally plugging it in and looking for it in "Internal storage" is that not possible?


 The 0 folder is on your virtual SD. So just plug in and the first thing you should see is the 0 folder. I don't understand why this is so difficult for some people to grasp.

Sent from my Galaxy Nexus using Tapatalk 2


----------



## erockk13

Sandman007 said:


> The 0 folder is on your virtual SD. So just plug in and the first thing you should see is the 0 folder. I don't understand why this is so difficult for some people to grasp.


I hardly ever noticed it.. Ive had my galaxy nexus since 4.0 and moving up to 4.2, hardly noticed it on that or the nexus 7.. Everything works fine as long as long as your recovery is up to date.. Im not quite sure why so many ppl are having issues and confusion either..

Sent from my Galaxy Nexus using RootzWiki


----------



## Deyna

Mustang302LX said:


> If you have numerous /0 folders you tried flashing a 4.2+ ROM with an older CWM or TWRP version not meant for 4.2+. Simply go to the last /0 folder and move all of the contents back to /sdcard/0 and all will be fine. Then you can delete the extra /0 folders.


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.


----------

