|
|
 |
12-13-2012, 05:39 PM
|
#1
|
|
Elite Member
Join Date: Jul 2002
Posts: 8,760
|
Android: Can someone explain to me its folder structures?
The whole root, system partition, sdcard thing confuse me. As you will see I am a total noob in this area so please bear with me and hopefully someone will educate me.
I have heard some people talking about moving their applications to sdcard to save space in the system partition (is that the correct term?). I do not know what that means so I decided to see for myself, and gained root access in my Nexus 7. Browsing the folder structure, I am completely lost because I have no idea which is which. I tried to draw what I am trying to learn about;
1. /sdcard/ (along with /root/ directory and other system-level directory)
2. /storage/emulated/0/
3. /storage/emulated/legacy/
4. /storage/sdcard0/
Prior to root access, I believe I was looking at #2, which would be /storage/emulated/0/. That's where I saw some application folders as well as data folders. Upon gaining root access, however, I found three more folders that seem to contain identical contents.. I suppose they are not duplicates (four copies of everything?), but I am terribly confused.
My questions (for now):
- What are these 4 for? And which one is "real" in a physical sense? (does it even make sense to refer it as "real" instead of "shortcuts" or "aliases"?)
- Which one is the system partition, or ROM? Are they referring to the same thing?
- Which one is "external storage"? Do "external storage" and "sdcard" mean the same thing? And which is "internal storage"?
- When people talk about moving stuff to sdcard (e.g. "app to sdcard"), which one is the starting point and which one is the end point?
Obviously appreciated.
Last edited by lopri; 12-13-2012 at 07:19 PM.
|
|
|
12-13-2012, 06:17 PM
|
#2
|
|
Lifer
Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 32,397
|
That's different from my current, and previous tablets. Both of mine have /mnt/sdcard and /mnt/extsd
/mnt/sdcard is builtin(extra) storage, and /mnt/extsd is a removable sdcard. I'd guess /sdcard is the proper place, but I don't know for sure.
Edit:
BTW, if you want to manipulate files on the device itself, GhostCommander will let you manipulate files as root as long as you have root access. It gives a nice dual pane commander-like interface
http://f-droid.org/repository/browse...ander&fdpage=7
^^^That's the main repository I use for apps. It's sparse compared to Play store, but it's all libre apps that have source code available. Most are completely clean, but three's a couple that have hindrances. They either track, or have ads. Those are very few, and clearly marked though. I guess someone just has to rip out the offending bits.
__________________
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
Last edited by lxskllr; 12-13-2012 at 06:25 PM.
|
|
|
12-13-2012, 06:20 PM
|
#3
|
|
Elite Member
Join Date: Jul 2002
Posts: 8,760
|
I have a Nexus 7, and it doesn't have any slots for external/removable sd cards. Yet people refer certain part as "internal storage" (system partition, or ROM?) and "external storage" (which was another confusion that I understood quickly)
Last edited by lopri; 12-13-2012 at 06:23 PM.
|
|
|
12-13-2012, 06:28 PM
|
#4
|
|
Lifer
Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 32,397
|
Quote:
Originally Posted by lopri
I have a Nexus 7, and it doesn't have any slots for external/removable sd cards. Yet people refer certain part as "internal storage" (system partition, or ROM?) and "external storage" (which was another confusion that I understood quickly)
|
My "internal" storage is /data/app
__________________
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
|
|
|
12-13-2012, 06:28 PM
|
#5
|
|
Diamond Member
Join Date: Jul 2006
Location: Midwest USA
Posts: 5,735
|
Quote:
Originally Posted by lopri
I have a Nexus 7, and it doesn't have any slots for external/removable sd cards. Yet people refer certain part as "internal storage" (system partition, or ROM?) and "external storage" (which was another confusion that I understood quickly)
|
there's separate partition where apps are installed by default, and that is never on external card but on the internal.
__________________
i7-3770, Intel DZ77SL-50K, VisionTek HD 7850, Dell 2707WFP, X25-M, X-Fi * PC Gamer Since 1991 *
|
|
|
12-13-2012, 06:30 PM
|
#6
|
|
Elite Member
Join Date: Jul 2002
Posts: 8,760
|
Thank you for the suggestion but I do have a file/folder manager. I am not trying to manipulate files (yet), but rather trying to understand what I see.. Right now I don't even understand what exactly /sdcard/ means. (internal? external? emulated?)
|
|
|
12-13-2012, 06:32 PM
|
#7
|
|
Elite Member
Join Date: Jul 2002
Posts: 8,760
|
Quote:
Originally Posted by postmortemIA
there's separate partition where apps are installed by default, and that is never on external card but on the internal.
|
Which one would it be, among the 4 I found? Is it #1? (system partition) Where is the line drawn? And why "emulated"?
The thing is, I see exact same contents in all 4 folders I listed. (I could be wrong since I did not check one by one, but they looked the same to me)
|
|
|
12-13-2012, 06:47 PM
|
#8
|
|
Lifer
Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 32,397
|
I spoke wrong earlier. My root apps(ROM) are in /system/app, and downloaded apps are in /data/app
I still don't know about the rest of your setup :^D
__________________
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
|
|
|
12-13-2012, 07:06 PM
|
#9
|
|
Elite Member
Join Date: Jul 2002
Posts: 8,760
|
OK I took screenshots. Big pictures below.
This is as deep as I can go with root privilege. Note /sdcard/ and /storage/ are here together, as well as /system/. (is /sdcard/ system partition, and /storage/ external storage?)
And from here, when I go to /sdcard/, I see this (which is #1 in my origianl thread. Check the top tree).
#1 [ /sdcard/]
If I go to /storage/ from the first screen, I see this.
Then
#2 [ /storage/emulated/0/]: 
#3 [ /storage/emulated/legacy/]: 
#4 [ /storage/sdcard0/]:
Last edited by lopri; 12-13-2012 at 07:09 PM.
|
|
|
12-13-2012, 08:03 PM
|
#10
|
|
Lifer
Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 32,397
|
I dunno man. Android is a different beast than GNU/Linux. I was starting to get into it early this year, but broke my tablet, so I quit playing with it. I never got to understanding how it all goes together. I'm wondering how much it varies per manufacturer, because my setup isn't like that.
If you don't get any love here, you may want to read some Android specific forums. If you go that route, take some time to learn before you ask questions. There's a lot of noobs with Android devices, and they get in the forums and ask questions that were answered on the same page they were asking on. It's easy to burn out the people with knowledge when they get asked the same questions over and over. I knew almost nothing, and I was getting burned out repeating what little I did know. You should be able to find some good stuff here...
https://www.xda-developers.com/
__________________
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
|
|
|
12-13-2012, 10:17 PM
|
#11
|
|
Lifer
Join Date: Sep 2003
Location: Pittsburgh
Posts: 17,696
|
all the weird /emulated/0 stuff is a result of the new multi user profiles in 4.2.
you'll see what appear to be the same files in several different places. i think it's using a lot of symlinks or something, and it swaps them out when you swap user profiles.
of course, the multi user profiles aren't enabled on the Nexus 4, only the Nexus 10. so us N4 users just get stuck with the weird folder structure.
__________________
Intel Core i7 920 || Asus P6T Deluxe V2 || Noctua NH-U12P|| 12GB DDR3-1600
GTX 670 || Intel x-25m 80gb || 1TB Caviar Black || Antec 902 ||Antec 550w
HEAT
XBL: the4ner85
|
|
|
12-13-2012, 11:42 PM
|
#12
|
|
Elite Member
Join Date: Jul 2002
Posts: 8,760
|
vshah, could you enlighten me as to the following?
- When people talk about "internal storage" and "external storage" (think of an app like app2SD), which folder is "internal storage" and which folder is "external storage" in Jelly Bean? Of course we're not talking about removable disks or SD slots.
- Is it correct to view that some of these folders are indeed partitions on the volume? In other words, unlike alphabets in Windows (e.g. C: drive, E: drive, etc,.) Android uses folders to denominate partitions (mounted, perhaps?)? (but they are actually partition on the disk of Android device?)
- Is it correct to view, both the internal storages and external strages exist on same physical disk, just in different partitions? Or perhaps they are separated by different NAND memory chips? Do you happen to know how much internal storage is reserved in Android?
- Is it correct to view, the folders that I had access to prior to root access (in my case that was /storage/emulated/0/ ) is an external storage, considering that I had the total control of it? So if I use a tool such as "app2sd," that is where the app2sd will try to move stuff to?
Last edited by lopri; 12-14-2012 at 03:25 AM.
|
|
|
12-13-2012, 11:53 PM
|
#13
|
|
Elite Member
Join Date: Jul 2002
Posts: 8,760
|
Or is it the opposite? If you look at the first screenshot I posted earlier,
You can see
/sdcard/
/storage/
/system/
Again, the screen seen above is the highest at the folder hierarchy with root access in my Nexus 7. If you were to guess, which one is which (a partition, a folder, an internal, an external, etc,.?)
If I were to guess that /sdcard/ is external storage partition, and /system/ is a folder residing in /storage/, which is an internal storage partition - does it sound plausible?
|
|
|
12-14-2012, 09:08 AM
|
#14
|
|
Lifer
Join Date: Sep 2003
Location: Pittsburgh
Posts: 17,696
|
on nexus devices since the nexus S, there is only one partition.
/sdcard, /storage/emulated/0 etc. are all pointing to the same place, and that is the "sdcard" or "External storage" as far as apps are concerned.
"internal" storage is everything else you see at the top level:
/data - apps are installed to /data/app and store their data in /data/app-asec among other subfolders.
/system contains components of the android OS. /system/app contains system apps like the launcher. you'll find your SU binary in /system/xbin
it doesn't make any sense to use apps2sd on a nexus device, since it's all one partition. you can fill up the "internal storage" part, or you can fill up the "external storage" part, it makes no difference.
__________________
Intel Core i7 920 || Asus P6T Deluxe V2 || Noctua NH-U12P|| 12GB DDR3-1600
GTX 670 || Intel x-25m 80gb || 1TB Caviar Black || Antec 902 ||Antec 550w
HEAT
XBL: the4ner85
|
|
|
12-14-2012, 09:45 AM
|
#15
|
|
Diamond Member
Join Date: Feb 2003
Location: Chicagoland, IL
Posts: 3,542
|
Quote:
Originally Posted by lopri
I have heard some people talking about moving their applications to sdcard to save space in the system partition (is that the correct term?).
|
This function is built in to Android. You do it in the app management section of the GUI. You don't have to root the system or do anything in the file system.
App management -> click the app -> "Move to SDCard."
As for the rest... Android FS is a maze and I can't offer anything there.
|
|
|
12-14-2012, 01:20 PM
|
#16
|
|
Lifer
Join Date: Sep 2003
Location: Pittsburgh
Posts: 17,696
|
Quote:
Originally Posted by imagoon
This function is built in to Android. You do it in the app management section of the GUI. You don't have to root the system or do anything in the file system.
App management -> click the app -> "Move to SDCard."
As for the rest... Android FS is a maze and I can't offer anything there.
|
while it is built in, OP won't see it on his Nexus 7 since there's only one partition so moving an app to "sdcard" would have no effect on storage utlization.
__________________
Intel Core i7 920 || Asus P6T Deluxe V2 || Noctua NH-U12P|| 12GB DDR3-1600
GTX 670 || Intel x-25m 80gb || 1TB Caviar Black || Antec 902 ||Antec 550w
HEAT
XBL: the4ner85
|
|
|
12-14-2012, 02:26 PM
|
#17
|
|
Diamond Member
Join Date: Feb 2003
Location: Chicagoland, IL
Posts: 3,542
|
Quote:
Originally Posted by vshah
while it is built in, OP won't see it on his Nexus 7 since there's only one partition so moving an app to "sdcard" would have no effect on storage utlization.
|
Well ok, then what is the point of the OP request? Also I think the proper term is "one mount point." My Nexus has 1 partition with /sdcard mounted to the internal storage chip.
Anyway my original question stands. I would be interested to see the fdisk list out from a terminal emulator.
|
|
|
12-14-2012, 02:44 PM
|
#18
|
|
Lifer
Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 32,397
|
Quote:
Originally Posted by imagoon
Well ok, then what is the point of the OP request? Also I
|
I think it gets slow if the file system gets too full, but I don't know how much "too full" is. I've been moving my apps to the root partition. Deleting a bunch of default apps, and putting my own in.
__________________
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
|
|
|
12-14-2012, 05:57 PM
|
#19
|
|
Elite Member
Join Date: Jul 2002
Posts: 8,760
|
I did some reading today and vshah, I thank you very much. Your post (#14 specifically) cleared a lot of things that I was confused about. And your explanation totally makes sense. (obviously, since you're stating facts) No wonder I did not see any kind of physical partitions with those low-level diagnostic tools.
I am still digesting and "indoctrinate" myself on this new knowledge. I am likely to have more questions, but I want to thank everyone trying to help me. Again, I am not done and will probably (more like definitely) have further questions.
|
|
|
12-15-2012, 07:42 AM
|
#20
|
|
Lifer
Join Date: Sep 2003
Location: Pittsburgh
Posts: 17,696
|
Quote:
Originally Posted by lopri
I did some reading today and vshah, I thank you very much. Your post (#14 specifically) cleared a lot of things that I was confused about. And your explanation totally makes sense. (obviously, since you're stating facts) No wonder I did not see any kind of physical partitions with those low-level diagnostic tools.
I am still digesting and "indoctrinate" myself on this new knowledge. I am likely to have more questions, but I want to thank everyone trying to help me. Again, I am not done and will probably (more like definitely) have further questions.
|
No worries, the new folder structure threw me for a loop when I first encountered it as well
__________________
Intel Core i7 920 || Asus P6T Deluxe V2 || Noctua NH-U12P|| 12GB DDR3-1600
GTX 670 || Intel x-25m 80gb || 1TB Caviar Black || Antec 902 ||Antec 550w
HEAT
XBL: the4ner85
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:50 AM.
|