Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,731,300 Members 52,878 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Can someone explain to me the Android File System

Tip us?
 
n0xide
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 4
Join Date: Sep 2013
Unhappy [Q] Can someone explain to me the Android File System

So, I'm trying to understand how and why the file system acts the way it does.

Example. I have

/sdcard
and this has a bunch of stuff under it

then i have

/sdcard/0
this has some of the same stuff under it as /sdcard, but is a different file system


Why can I not just have a simple file system that I can understand! I seem to have issues with space because sometimes wiping the phone does not wipe the /sdcard/0 so I am working out of /sdcard/0 as opposed to the base of /sdcard

Any help? I am an idiot so explain like I'm 5, if possible.

Thanks in advance.
 
BadUsername
Old
(Last edited by BadUsername; 20th March 2014 at 02:57 AM.)
#2  
BadUsername's Avatar
Senior Member
Thanks Meter 632
Posts: 1,291
Join Date: Mar 2013
Quote:
Originally Posted by n0xide View Post
So, I'm trying to understand how and why the file system acts the way it does.

Example. I have

/sdcard
and this has a bunch of stuff under it

then i have

/sdcard/0
this has some of the same stuff under it as /sdcard, but is a different file system


Why can I not just have a simple file system that I can understand! I seem to have issues with space because sometimes wiping the phone does not wipe the /sdcard/0 so I am working out of /sdcard/0 as opposed to the base of /sdcard

Any help? I am an idiot so explain like I'm 5, if possible.

Thanks in advance.
5 year old explanation.

4.3 and above Android systems implement a multi user file setup similar to what Windows and OSx uses. The 0 folder is your account, your significant other could be 1, your dog could be 2, this keeps going depending how many users are registered to the device. It's actual intent is to use multi user on a tablet interface, not a phone, but because jellybean is used on both phones and tablets the file structure is the same.

Normally you don't have to worry about much of this, but if you came from 4.1 jellybean then multiuser wasn't implemented yet. This would double up your data in both places.

To me it sounds like you're OK, it's going to show double files because it's essentially reading the exact same folder, the format isn't going to understand what you're trying to do because it doesn't really know where to look for your data files. Basically, leave your 0 folder alone because that's where your data is supposed to be stored.

Was that 5 year old enough?

Edit: if you format your internal SD card in your recovery, then you'll erase the doubled data, and your folder structure will be repopulated under the 0 folder system. If you're running out of internal storage that's what you should do. Then clean flash the rom of your choice following the format.

Sent from my SCH-I535 using Tapatalk 2
The Following User Says Thank You to BadUsername For This Useful Post: [ Click to Expand ]
 
n0xide
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 4
Join Date: Sep 2013
Quote:
Originally Posted by BadUsername View Post
5 year old explanation.

4.3 and above Android systems implement a multi user file setup similar to what Windows and OSx uses. The 0 folder is your account, your significant other could be 1, your dog could be 2, this keeps going depending how many users are registered to the device. It's actual intent is to use multi user on a tablet interface, not a phone, but because jellybean is used on both phones and tablets the file structure is the same.

Normally you don't have to worry about much of this, but if you came from 4.1 jellybean then multiuser wasn't implemented yet. This would double up your data in both places.

To me it sounds like you're OK, it's going to show double files because it's essentially reading the exact same folder, the format isn't going to understand what you're trying to do because it doesn't really know where to look for your data files. Basically, leave your 0 folder alone because that's where your data is supposed to be stored.

Was that 5 year old enough?

Sent from my SCH-I535 using Tapatalk 2

Yeah! That's a pretty solid explanation! I couldn't seem to find anywhere that broke it down that way.

So let me ask one more 5 year old question.

I seem to have TONS of space used up on my SD card, that I cannot free up.

I have a 16Gig GSIII, when I attach my phone to windows, I have 7gb free of 12gb. I just wiped system, cache, and dalvik, and have a clean version of Beanstalk 4.4.2.

How am I using 5gb when the OS itself is only, ~199Mb.

Is there anyway to have a completely clean install? Even when I soft bricked, and then revived w/odin and an old kernal, I don't think it was totally clean.
 
BadUsername
Old
#4  
BadUsername's Avatar
Senior Member
Thanks Meter 632
Posts: 1,291
Join Date: Mar 2013
Quote:
Originally Posted by n0xide View Post
Yeah! That's a pretty solid explanation! I couldn't seem to find anywhere that broke it down that way.

So let me ask one more 5 year old question.

I seem to have TONS of space used up on my SD card, that I cannot free up.

I have a 16Gig GSIII, when I attach my phone to windows, I have 7gb free of 12gb. I just wiped system, cache, and dalvik, and have a clean version of Beanstalk 4.4.2.

How am I using 5gb when the OS itself is only, ~199Mb.

Is there anyway to have a completely clean install? Even when I soft bricked, and then revived w/odin and an old kernal, I don't think it was totally clean.
Yup! I just told you in my post edit, left that out by accident.

Sent from my SCH-I535 using Tapatalk 2
The Following User Says Thank You to BadUsername For This Useful Post: [ Click to Expand ]
 
n0xide
Old
#5  
Junior Member - OP
Thanks Meter 0
Posts: 4
Join Date: Sep 2013
Quote:
Originally Posted by BadUsername View Post
Yup! I just told you in my post edit, left that out by accident.

Sent from my SCH-I535 using Tapatalk 2
Thanks again! Great answers, and just the info I need!

So, to format it in CWM. I would go to

Mounts and Storage

format /data

or

format /data and /data/media (/sdcard)

i assume I don't touch

format /cache or format /system


and.. last thing I promise, how do I make sure I keep a copy of gaaps and a rom on the sdcard, if I format it?
 
BadUsername
Old
#6  
BadUsername's Avatar
Senior Member
Thanks Meter 632
Posts: 1,291
Join Date: Mar 2013
Quote:
Originally Posted by n0xide View Post
Thanks again! Great answers, and just the info I need!

So, to format it in CWM. I would go to

Mounts and Storage

format /data

or

format /data and /data/media (/sdcard)

i assume I don't touch

format /cache or format /system


and.. last thing I promise, how do I make sure I keep a copy of gaaps and a rom on the sdcard, if I format it?
You can't keep anything on the SD card after formatting, it'll be completely wiped clean, but you should do the second option. Also you should always format system when you clean flash a rom anyway.

I'd use an external SD card to flash the rom from. Alternatively, you could sideload the rom (if you know how). I don't know how.

Sent from my SCH-I535 using Tapatalk 2
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Android Wear App Review: EchoWear Song Search – XDA Developer TV

Yesterday on XDA Developer TV, Producer AdamOutler tore down a Samsung … more

Blast Those Flags with Knock the Flags

Lately, we have seen a rather drastic shift in the world of mobile device gaming. The infamous Angry … more

Hide Numbers on Your SMS and Call Logs with Reflection

How many times have you given your device to someone else in order to show them a … more