# 4.2 /0 folder question



## Mikesevenfold (May 6, 2012)

I just installed Jakeday's 4.2 ROM. When I went to restore my TiBu files it told me I had 0 apps backed up. Everything is in the /0 folder on my phone. When I went to locate the folder in ASTRO it now tells me I have 4 local storage locations when I used to only have one. The first local storage is empty and all my files are in the last two storages. How do I move everything safely back into local storage 1 using just my phone and not a computer? Thanks.


----------



## bouchigo (Jun 9, 2011)

Mikesevenfold said:


> I just installed Jakeday's 4.2 ROM. When I went to restore my TiBu files it told me I had 0 apps backed up. Everything is in the /0 folder on my phone. When I went to locate the folder in ASTRO it now tells me I have 4 local storage locations when I used to only have one. The first local storage is empty and all my files are in the last two storages. How do I move everything safely back into local storage 1 using just my phone and not a computer? Thanks.


http://rootzwiki.com/topic/36446-twrp-and-42/#entry1024758


----------



## GatorsUF (Oct 14, 2011)

So I assume everyone who has tried 4.2 noticed that your SDcard contents were moved into a folder named "0". This I assume will be the new norm because of multiple users in 4.2 (even though its not available on phones..)

- Should we move everything all of our contents out of the "0" folder? (Titanium Backup, TWRP/CWM, App data) so that they are found by their respective apps?

-Should we keep all the files in the "0" folder for now and just move what we NEED until the apps update to locating items in their respective folders?

-If we move items out of "0" to root, will the items in root be deleted during a factory reset? Or will items in "0" be deleted? Or neither?

I know we are all new to this, but figured maybe a dev on here has done some research already.


----------



## tiny4579 (Oct 21, 2011)

It's weird, but I'm using mmuzzy's ROM from xda and I started from CM10. Did a factory reset and wiped system in TWRP then flashed the ROM without a second wipe. I didn't get a 0 folder in /sdcard but I do have a /data/media/0 folder. I'd refrain from doing factory resets on 4.2 for now as a new factory reset could move everything into the 0 folder, even the contents of the 0 folder.


----------



## trebills (Jan 7, 2012)

tiny4579 said:


> It's weird, but I'm using mmuzzy's ROM from xda and I started from CM10. Did a factory reset and wiped system in TWRP then flashed the ROM without a second wipe. I didn't get a 0 folder in /sdcard but I do have a /data/media/0 folder. I'd refrain from doing factory resets on 4.2 for now as a new factory reset could move everything into the 0 folder, even the contents of the 0 folder.


I also installed mmuzzys and there is no '0' folder when I'm in root explorer or connected to PC via mtp, however, when I'm in cwm recovery it shows everything in sdcard/0. Not sure why

Sent from my Galaxy Nexus


----------



## nunyazz (Jun 6, 2011)

http://rootzwiki.com/topic/36456-42-0-folder-question/


----------



## craigacgomez (Jan 17, 2012)

To support multi-user capabilities this will be the norm... for each user, there will be a sequentially numbered folder in /data/media (/data/media/0, /data/media/10)...

And for each user, within Android, this will be symlinked to /sdcard & /storage/sdcard0... for user 1, /sdcard = /storage/sdcard0 = /data/media/10... for user 2, /sdcard = /storage/sdcard0 = /data/media/1...

These are emulated storage points... /data/media/0 = /storage/emulated/0, /data/media/1 = /storage/emulated/1

Without root access, each user will just see /sdcard/ and will not be able to access the other emulated storage points...

In the recovery mode, however, /sdcard is mapped to /data/media which is why you need to navigate to the "0" folder to see your files!


----------



## codesplice (Oct 21, 2011)

craigacgomez said:


> To support multi-user capabilities this will be the norm... for each user, there will be a sequentially numbered folder in /data/media (/data/media/0, /data/media/1)...
> 
> And for each user, within Android, this will be symlinked to /sdcard & /storage/sdcard0... for user 1, /sdcard = /storage/sdcard0 = /data/media/0... for user 2, /sdcard = /storage/sdcard0 = /data/media/0...
> 
> ...


Very good, concise explanation on this. Thanks


----------



## GatorsUF (Oct 14, 2011)

Thanks for the explanation!

So if I understand correctly, we shouldn't move anything from the "0" folder because it will basically be the root folder for us. However we may need to navigate to it for nandroid backups (until cwm/twrp fix this). However apps and such will see "0" as our root folder. Correct?

That said is it safe to do a factory reset with the current versions of twrp/cwm if you are already on a 4.2 rom with current structure?


----------



## tiny4579 (Oct 21, 2011)

GatorsUF said:


> Thanks for the explanation!
> 
> So if I understand correctly, we shouldn't move anything from the "0" folder because it will basically be the root folder for us. However we may need to navigate to it for nandroid backups (until cwm/twrp fix this). However apps and such will see "0" as our root folder. Correct?
> 
> That said is it safe to do a factory reset with the current versions of twrp/cwm if you are already on a 4.2 rom with current structure?


I heard that creates a second 0 folder inside of 0 by moving the folders in the root of sdcard to 0. I could be wrong but I think I noticed that on my N7 by wiping after flashing 4.2.


----------



## GatorsUF (Oct 14, 2011)

Welp I kinda answered my own question:

Installed "Groupers" Pure Android AOSP 4.2 ROM and all seemed well, but as soon as I flashed it I realized Jakeday had a 4.2 ROM so I wanted to try it instead. I wiped and installed Jakeday ROM and all my files were there still, no problem. Well once launching jakeday realized there were a few bugs (exchange FC and some lockscreen widgets missing) so I decided to flash back to "Groupers" rom. Wiped again and went to flash it, everything was gone this time. Hmmm...

Good thing I just backed up my pictures before doing this. Shouldn't have lost too much.

Edit: Just saw the post above mine, he is right. The 0 folder is now in data/media/0/0. Everything is still there, guess it is something that will be ironed out in the coming days.

So it seems it is safe to do factory reset right now and try out all the 4.2 ROMs you want, just know that your files will be moved into a new "0" folder each time. I'd suggest it might be a good idea to backup anything you deem important to your computer though (Pictures, Nandroid, TiBu, App data) just in case.


----------



## craigacgomez (Jan 17, 2012)

tiny4579 said:


> I heard that creates a second 0 folder inside of 0 by moving the folders in the root of sdcard to 0. I could be wrong but I think I noticed that on my N7 by wiping after flashing 4.2.


This happens with a wipe/factory reset with the current custom recoveries... but if you do a full data wipe (format the full internal storage) it works fine!

EDIT: TWRP 2.3.2.0 fixes this issue!!


----------



## Joesyr (Feb 7, 2012)

GatorsUF said:


> So if I understand correctly, we shouldn't move anything from the "0" folder because it will basically be the root folder for us.


According to TeamWin, you should move them back, because migrating them was a bug in the first place. I have not tried a 4.2 rom so I'm not speaking from experience. though.
Link


----------



## GatorsUF (Oct 14, 2011)

how to heck do I move files from "/data/media/0/0" to "/data/media/0"? I've tried moving with root explorer and it just sticks on "past in progress forever. I've tried just a few small folders at once and it still is taking forever.


----------



## M4570D0N (Jun 7, 2012)

The fix was merged in CM today by Koush and I believe he added it in the update today in the Play Store for CWM.
https://github.com/CyanogenMod/android_bootable_recovery/commit/8e40f42d2e0b21a8ed02cd66c825f913876917cd


----------



## MR H3LLMAN (Oct 20, 2011)

tiny4579 said:


> I heard that creates a second 0 folder inside of 0 by moving the folders in the root of sdcard to 0. I could be wrong but I think I noticed that on my N7 by wiping after flashing 4.2.


No joke, I have 4 '0' folders. I'm backing everything up tonight and reformatting everything.


----------



## trter10 (Jan 4, 2012)

craigacgomez said:


> To support multi-user capabilities this will be the norm... for each user, there will be a sequentially numbered folder in /data/media (/data/media/0, /data/media/1)...
> 
> And for each user, within Android, this will be symlinked to /sdcard & /storage/sdcard0... for user 1, /sdcard = /storage/sdcard0 = /data/media/0... for user 2, /sdcard = /storage/sdcard0 = /data/media/1...
> 
> ...


thank you ????

Sent from my Nexus 4 using Tapatalk 2


----------



## 3thereal (Apr 25, 2012)

Excuse my ignorance, still a little confused after reading this thread. I just now noticed this on my phone, and I have /storage/emulated/0/0/, so is anything in that folder being used at all or is it just a backup that I can delete from when I upgraded to 4.2?


----------



## razorloves (Jun 7, 2011)

3thereal said:


> Excuse my ignorance, still a little confused after reading this thread. I just now noticed this on my phone, and I have /storage/emulated/0/0/, so is anything in that folder being used at all or is it just a backup that I can delete from when I upgraded to 4.2?


Additional 0 folders are created and used when using an outdated recovery. need to update it and then move all your stuff from 0/0 to 0


----------



## 3thereal (Apr 25, 2012)

razorloves said:


> Additional 0 folders are created and used when using an outdated recovery. need to update it and then move all your stuff from 0/0 to 0


Gotcha. Thanks!


----------



## LoH_Mobius (Jun 6, 2012)

Not to dredge this topic up from the depths (of a week...)...but it is better than posting a new one...having /sdcard/0 is how 4.2 is supposed to work, or is it supposed to keep at /sdcard? Thanks!


----------



## ERIFNOMI (Jun 30, 2011)

The 0 is supposed to be there.


----------



## Bretski169 (Jul 26, 2011)

razorloves said:


> Additional 0 folders are created and used when using an outdated recovery. need to update it and then move all your stuff from 0/0 to 0


 What about if I am on 4.1.2 rom and I have an updated recovery, and I want to flash a 4.2+ rom..will I have any issues with my fies?


----------



## shiznu (Jun 14, 2012)

Bretski169 said:


> What about if I am on 4.1.2 rom and I have an updated recovery, and I want to flash a 4.2+ rom..will I have any issues with my fies?


As long as your on the newest version of you're recovery of choice no.

Sent from my Galaxy Nexus using RootzWiki


----------



## LoH_Mobius (Jun 6, 2012)

Bretski169 said:


> What about if I am on 4.1.2 rom and I have an updated recovery, and I want to flash a 4.2+ rom..will I have any issues with my fies?


I still did... But you can transfer files pretty easy... Mine went to data/media for some reason, on the newest twrp and flashed atom 4.2.1 v1. Foldersync was very helpful on that front.

Sent from my Galaxy Nexus using RootzWiki


----------



## tiny4579 (Oct 21, 2011)

LoH_Mobius said:


> I still did... But you can transfer files pretty easy... Mine went to data/media for some reason, on the newest twrp and flashed atom 4.2.1 v1. Foldersync was very helpful on that front.
> 
> Sent from my Galaxy Nexus using RootzWiki


From recovery in adb shell:
mv /data/media/* /data/media/0/

Easy as pie and almost instant.


----------



## LoH_Mobius (Jun 6, 2012)

tiny4579 said:


> From recovery in adb shell:
> mv /data/media/* /data/media/0/
> 
> Easy as pie and almost instant.


Thanks i couldn't figure out the wildcard to move the whole directory. Still learning ADB.

Sent from my Galaxy Nexus using RootzWiki


----------

