Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

On Android's root (/), what is the purpose of each folder? I am wanting to learn the folder hierarchy structure of Android 2.3 and 4.x, if they have different folders in "/".

share|improve this question
1  
Related, for Jellybean (4.1+) What kind of data is stored in /data/user directory? –  GAThrawn Jul 2 '13 at 12:43

1 Answer 1

up vote 8 down vote accepted

First, you need to be aware of two facts:

  • Android uses more than one file system (think of "multiple drives/partitions" when comparing with your computer
  • while sharing a common base, directory structures might differ between manufacturers

So as starting points, I further recommend the file-system tag-wiki and the partition tag-wiki (you might also want to take a look at the most frequented questions using those tags).

In my answer, I will concentrate on the mentioned "common base". However, there still might be deviations made by some manufacturers.

Partitions

As said, Android makes use of multiple partitions. In the file system, they are represented by "directories", which serve as their mount-points:

┌─────────────┬───────────────────────────┐  
| Partition   | Explanation               |  
├─────────────┼───────────────────────────┤  
| /boot       | kernel & Co.              |  
| /cache      | app cache                 |  
| /data       | user data partition¹      |  
| /data/data  | app data¹                 |  
| /dev        | devices²                  |  
| /mnt/asec   | encrypted apps (App2SD)   |  
| /mnt/emmc   | internal sdcard³          |  
| /mnt/sdcard | external sdcard³          |  
| /proc       | process information²      |  
| /recovery   | used in recovery mode     |  
| /system     | system ROM (read-only)    |  
└─────────────┴───────────────────────────┘

¹ Details below
² virtual file systems
³ these might differ. Often, /mnt/sdcard is the internal SDCard, while the external SDCard is found in /mnd/sdcard/external_sd.

Above list is far from being complete, but should hold the most important partitions.

Directories

Here I again will concentrate of the partitions which are most interesting (or this answer would get far to long and, for most readers, boring.

/data and /data/data

These are in most cases two separate partitions, but there might be cases where this is handled otherwise. One thing they have in common (add /cache here as well): they get wiped on a , while the other partitions are usually left untouched by that.

As for the directories contained, I will again concentrate on a selection; most things here you either cannot touch without having your device rooted.

┌────────────────────┬──────────────────────────────────────────────┐  
| Directory          | Explanation                                  |  
├────────────────────┼──────────────────────────────────────────────┤  
| /data/anr          | traces from app crashes (App Not Responding) |  
| /data/app          | .apk files of apps installed by the user     |  
| /data/backup       | Googles Cloud-Backup stuff                   |  
| /data/dalvik-cache | optimized versions of installed apps¹        |  
| /data/data         | app data²                                    |  
| /data/local        | temporary files from e.g. Google Play³       |  
| /data/misc         | system configuration (WiFi, VPN, etc.)       |  
| /data/system       | more system related stuff (certs, battstat)  |  
| /data/tombstones   | more crash stuff ("core dumps")              |  
└────────────────────┴──────────────────────────────────────────────┘

¹ for details on the Dalvik cache, see:
² each app gets its own data directory assigned here, using the app's package name. There might be a similar directory on your SDCard, mostly used by apps with larger amounts of data.
³ usually, files are stored here temporarily to be installed/executed. Google Play e.g. downloads .apk files to this directory, before installing the downloaded app on your device


Of course, I intentionally skipped several directories. If you really want to go into details, this site might not be the best fitting place (as we deal with end-user questions -- and end-users normally don't touch these things). In that case, several places/ressources might be recommended:

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.