Professional Documents
Culture Documents
Unit-V File System
Unit-V File System
Most of the Android user are using their Android phone just for calls, SMS, browsing and
basic apps, But form the development prospective, we should know about Android internal
structure.
Android uses several partitions (like boot,system, recovery , data etc) to organize files and
folders on the device just like Windows OS.
Each of these partitions has its own functionality, But most of us don’t know the
significance of each partition and its contents.
There are mainly 6 partitions in Android phones, tablets and other Android devices.
Under the Android file system, there are usually six main partitions found on every device.
Some devices may come with a couple of additional partitions, those differ from model to
model, but there are six primary partitions that are found on every single Android device.
These include /boot, /system, /recovery, /data, /cache, and /misc. Additionally, for external
Android smartphone, there are two file system partitions — /sdcard and /sd-ext. So, let’s
break down each partition separately and explore the Android File system hierarchy.
/boot
This partition consists of the Android kernel and the ramdisk. Basically, every single thing
that is needed to boot your Android device when powered on. You should only proceed to
wipe this partition from recovery if it is absolutely necessary. If you do, once the partition is
wiped, ensure to reboot the phone only after installing a new boot partition. The new partition
can be a /boot partition found in a ROM.
/system
The system partition accommodates the entire Android OS. This includes the Android GUI as
well as the system apps that come pre-installed on Android devices. So, what happens if you
wipe this partition? Well, you can still boot the device. We will only be able to put our device
into recovery or bootloader mode.
/recovery
This partition is designed for backup and can be considered the alternative boot option or
partition in an Android device. It lets the device boot into recovery mode where backing up
data, wiping data, restoring phone to factory settings, and performing other maintenance
operations.
/data
Also known as user data partition, this partition consists of all of the user’s data, including
contacts, settings, apps and messages. Wiping the data partition will lead to storing your
phone to factory settings, having removed all of the apps, messages, and user settings from
the Android device.
/cache
This partition stores the frequently accessed app data and components. Wiping this partition
will just clear the built-up cache, and the device will simply go back to rebuilding it as you
continue using it. Clearing cache also frees up some space in your device and can also fix
certain issues at times.
/misc
This partition contains all the miscellaneous system settings, usually on/off switches. The
settings may include carrier or region ID, USB configuration, and certain hardware setting.
This partition is very important since it can cause several device features to malfunction if the
partition becomes corrupt or goes missing. A missing /misc partition can also cause the
Android device to not boot at all.
/sdcard
This partition is the space that is available to users to store their files and data. Depending on
your device, you could even have more than one sdcard partition. If your device has an
external SD card slot, then the /sdcard partition refers to the internal storage device, and the
external SD card will be assigned a different partition, either a new partition called /sdcard2
or a separate directory within the /sdcard partition itself such as /sdcard/sd.
There are many users who think that external storage means SD cards and external hard
disks. However, it is totally their misconception. Let’s clear that misconception.
When you install an app on your device you will find that it has created a unique private
folder. That private folder can be accessed by only that app. The space where these files are
stored is called Internal Storage and files stored in this space cannot be accessed by the other
apps and users. All the Android system files, OS and app files that users are not allowed to
access are stored in the Internal Storage. In order to access these files, you need to download
an app that gives you access to these internal files or root your Android device.
On the other hand, all the media files or documents can also be stored on the external storage.
The files stored in the external storage can be accessed by the user and other apps easily. For
example – the app settings of the music player of your smartphone resides in internal storage,
but MP3 files that you download using that app are stored in external storage.
saving and loading a file
Internal storage allows you to read and write to files that are associated with each
application’s internal memory.These files cannot be accessed by other applications or
users.When the application is uninstalled, these files are automatically removed as well.