# Format sd card? Messing around with 4.2 used up space that doesn't exist?



## HobHayward (Nov 18, 2012)

So I was playing around with upgrading from 4.1 to 4.2 and forgot to do a titanium backup, also didn't update to the latest TWRP which prevents the /0/0/0/0/0 issues, tom foolery and wahtnot. Anyways, I struggled to restore my backup due to the non-updated TWRP looking in the wrong place for the recovery yada yada ended up installing 4.2 a few times before finally updating TWRP through goo manager restoring my previous ROM, doing a titanium backup, flashing back to 4.2 and then wiping out the /0 directories.

Now here's my problem: despite wiping everything off the card my memory usage indicates that I have 11 gigs free, am using less than 5 gigs total and the total space is 28 gigs. Wait that doesn't add up does it... no it doesn't. So somewhere on my phone I have phantom files using up space without actually using up space? Looking through the fs using TWRP's file manager I see the contents of the sd card as exactly the same as I see them in astro and on my computer via mtp. Pictures to show what my phone thinks is being used.. (those misc 3 gigs are the titanium backup).

















Now I did erase a bunch of the contents of the sd card via usb in debug mode, not sure if that's bad to do, or if that could mess with the file system but its about the only thought I have at the moment, other than the possibility that there's something weird higher up in the fs. Is there a way to do a file system cleanup? Any other thoughts suggestions? I would ideally like to wipe out the entire internal memory card (just so I can feel good inside knowing I started fresh) but I don't really know if that's feasible or if risk of bricking goes up exponentially..

Any and all thoughts are most appreciated!


----------



## Barf (Sep 26, 2011)

The command "fastboot -w" will erase everything on your phone, SD card and installed ROM. Then just adb push a ROM to /sdcard/ and flash in recovery.


----------



## binglejellsx2 (Jun 22, 2011)

^That's exactly what I had to do when JB 4.1 came out. I had the same issue with space when it created sdcard0 (not sdcard/0/0/0... etc, of 4.2). Make sure to back up everything in data/media (or wherever your sdcard is) first. Only thing is, all your files are going to have the same "modified" date now - the items in your Gallery won't be in the same order they used to be.

I hear the new recoveries have fixed the nested 0 folders, but, due to my experiences on loading up 4.1, I'm going to hold out on 4.2 until it matures a little more.


----------



## HobHayward (Nov 18, 2012)

Yeah I'm thinking I may revert to 4.1, its hard though because 4.2 really adds some cool new stuff.

One thing I'm slightly concerned over is that despite the fact that I have deleted basically everythong in the sd card (all /0 folders are gone) astro still thinks I have 4 sd cards..










Reading another thread in which people reported that they were unable to properly wipe their sd cards because of the /0/0 4.2 weirdness fucking with the file system in unreasonable (??) ways (booting them up into 4.2 even after wiping the entire internal memory) kinda spooked me. I'm hoping I don't have some phantom partition that is un-seeable and un-erasable. I'm tempted to leave the phone as is for now and come back when people have worked out whats going on with 4.2.


----------



## Schoat333 (Jun 14, 2011)

What do you see in root explorer when you go to the storage folder?


----------



## HobHayward (Nov 18, 2012)

I see:

/emulated
/sdcard0

inside emulated there are two folders:

/0
/legacy

Both contain various home folder related stuff

/sdcard0 contains a home folder as well, these home folders all look roughly the same.


----------



## Schoat333 (Jun 14, 2011)

HobHayward said:


> I see:
> 
> /emulated
> /sdcard0
> ...


Thats definitely the way it should be. the /sdcard0 is just another symlink to data/media/0 (Like sdcard)


----------



## HobHayward (Nov 18, 2012)

Haha ok thats good, still though the phantom use of space somewhat concerns me.


----------



## fused2explode (Jan 6, 2012)

HobHayward said:


> Haha ok thats good, still though the phantom use of space somewhat concerns me.


Have you updated your recovery yet which will fix additional symlink issues? Every time you flash another 4.2 ROM without an updated recovery you will add more "sdcards"


----------



## HobHayward (Nov 18, 2012)

I have but I didn't until after installing 4.2 a couple times..


----------



## manigma77 (Jun 11, 2011)

just wondering, have you checked /data/media/0 etc for more 0 folders?


----------



## fused2explode (Jan 6, 2012)

HobHayward said:


> I have but I didn't until after installing 4.2 a couple times..


Your real data is in the folder /data/media folder... Everything else is just a shortcut to this folder


----------



## throwbot (Jan 2, 2012)

Weird, had this happen to me. Said I had a lot more space than I did. Everything worked fine, no phantom files, just an inaccurate free space reading that kept me from knowing how much space I really had left.

Edit: sorry, it didn't say I had more space, it said I had used so much, but then when I subtracted that from the free space it told me i had, it would up adding up to like 23-24 instead of 32.

Sent from my Galaxy Nexus using Tapatalk 2


----------



## HobHayward (Nov 18, 2012)

manigma77 said:


> just wondering, have you checked /data/media/0 etc for more 0 folders?


Yeah I erased all of those folders but I did it via USB debug so I'm not sure if that could have confused things somehow.


----------



## Barf (Sep 26, 2011)

Dude, seriously. Fastboot update -w or use the revert to stock guide and either go back to 4.1 or install another 4.2. No point in reviving this thread if you aren't going to try anything that might solve it.....


----------



## HobHayward (Nov 18, 2012)

Sorry boot that, fastboot update -w is giving me an error though: failed to load '-w' Google didn't bring anything up when I searched the error. Probably me doing something stupid...

Running 'fastboot devices' does show that the phone is connected and the driver is installed.


----------



## tiny4579 (Oct 21, 2011)

HobHayward said:


> Sorry boot that, fastboot update -w is giving me an error though: failed to load '-w' Google didn't bring anything up when I searched the error. Probably me doing something stupid...
> 
> Running 'fastboot devices' does show that the phone is connected and the driver is installed.


You have to add the stock image zip file to the command. The syntax is:
fastboot update [-w] googleimagefromfactorydownload.zip. the -w option wipes sdcard and is not required but recommended by google when flashing factory images.

Or, you could simply do fastboot erase userdata to fully wipe /data including sdcard.


----------

