File System Hierarchy and Common Directories

This section describes file systems, file system hierarchy and common directories used on Android systems.

What Is a File System? A file system is a large chunk (referred as partition) of a storage device formatted in a specific way to store data.

What Is the File System Hierarchy? The File System Hierarchy is the logical representation of multiple file systems organized in a tree structure. Each file system (or partition) is attached (or mounted) to a specific named node (referred as director or folder) in the tree. The file system attached to the root node is called the root partition.

One advantage of the File System Hierarchy is that any directory or file in any attached partition can be identified in a uniform path name format: /directory/directory/.../directory(file).

For example, the following diagram illustrates how file systems (partitions) created on a storage device are attached to different nodes in the file system hierarchy.

Partitions and File System Hierarchy
Partitions and File System Hierarchy

File "123.jpg" as shown in the file system hierarchy can be identified as "/sdcard/DCIM/Camera/123.jpg", which is picture file created by the camera on the device.

Different Android devices produced by different vendors all have similar file system hierarchies with the following common top level directories:

/         - Mounting point of the root partition
|- acct   - Mounting point for the acct cgroup (control group)
|           partition to store user account information
|- cache  - Mounting point for the cache partition used as
|           a scratch pad by the system
|- data   - Mounting point for the data partition to store apps data
|  |- media     -
|  |- ...
|- dev    - Directory contains pseudo files representing devices
|- etc    - Directory to store system configurations
|- mnt    - Directory contains mounting points of other file systems
|  |- runtime   -
|  |- vendor    -
|  |- ...
|- proc   - Mounting point for the proc pseudo file system to access
|	 |				system kernel data structures.
|  |- cpuinfo   - File linked to current CPU information
|  |- diskstats - File linked to disk statuses
|  |- version   - File linked to system kernel version
|  |- ...
|- product - Directory for product specific system files
|- root   - Home directory for the root user
|- sbin   - Directory for system binary executable programs
|- sdcard - Directory as a logical SD (Secure Digital) card
|  |- Alarms    - Directory for custom ringtone audio files
|  |- Android   - Directory as a shared storage for all apps
|  |  |- data
|  |  |- media
|  |  |- obb
|  |- Audiobooks
|  |- DCIM      - Directory for Digital Camera IMage files
|  |- Documents - Directory for user documents
|  |- Download  - Directory for downloaded files
|  |- Movies    - Directory for video files
|  |- Music     - Directory for audio files
|  |- Notifications - Directory for custom ringtone audio files
|  |- Pictures  - Directory for pictures
|  |- Podcasts  - Directory for post cast files
|  |- Recordings
|  |- Ringtones - Directory for custom ringtone audio files
|- storage - Directory contains mounting points external storages
|  |- emulated  - Directory contains emulated external storages
|  |- sdcard0   - Symbolic link to /sdcard
|  |- self      -
|- sys    - Mounting point for sysfs pseudo file system to access
|           system kernel objects
|- system - Directory for Android operating system files
|  |- app       - Directory for pre-installed application packages
|  |- bin       - Directory for system binary executable codes
|  |- build.prop - File containing configuration settings
|  |- fonts     - Directory for font files
|  |- framework - Directory for JAR and ODEX files of Android framework
|  |- lib       - Directory contains binary code libraries like
|  |- media     - Directory for system media files
|  |- ...
|- vendor - Directory for vendor specific system files

Table of Contents

 About This Book

 Installing JDK 1.8 on Windows System

 Installation of Android SDK R24 and Emulator

 Installing Apache Ant 1.9 on Windows System

 Developing First Android Application - HelloAndroid

 Android Application Package (APK) Files

 Android Debug Bridge (adb) Tool

Android File Systems

File System Hierarchy and Common Directories

 "df -H" - Display Mounted File Systems

 "mount" - Display Mounted File Systems

 "find -L . -name" - Search Files on Android System

 AboutAndroid - Application to Retrieve System Information Class and Activity Lifecycle

 View Objects and Layout Resource Files

 Using "adb logcat" Command for Debugging

 Build Process and Package File Content

 Building Your Own Web Browser

 Android Command Line Shell

 Samsung Galaxy Tab 3 Mini Tablet

 USB Debugging Applications on Samsung Tablet

 Android Tablet - LG-V905R

 USB Debugging Applications on LG-V905R Tablet

 Android Phone - LG-P925g

 USB Debugging Applications on LG-P925g Phone

 Archived Tutorials


 Full Version in PDF/EPUB