Learn Android

Android partitions

In the world of Android hacking and modding you will often hear people talk about different partitions such as boot and cache, but what exactly do they all do and what will happen if you decide to wipe them? This guide will explain the most important partitions to watch out for and understand.

Let’s start by listing all the partitions you will come across in your android experience:

/boot

/system

/recovery

/data

/cache

/misc

/sdcard


There are some other partitions within your Android device however you will most likely never come into contact with them and defiently not need to change them.

/boot

This is the partition that enables the phone to boot, as the name suggests. It includes the kernel and the ramdisk. Without this partition, the device will simply not be able to boot. Wiping this partition from recovery should only be done if absolutely required and once done, the device must NOT be rebooted before installing a new one, which can be done by installing a ROM that includes a /boot partition or flashing a new one in bootloader mode. Most of the time a new boot image can be flashed without wiping the previous one.

/system

This partition basically contains the entire operating system, other than the kernel and the ramdisk. This includes the Android user interface as well as all the system applications that come pre-installed on the device. Wiping this partition will remove Android from the device without rendering it unbootable, and you will still be able to put the phone into recovery or bootloader mode to install a new ROM.

/recovery

The recovery partition is an alternate boot mode which allows the different areas of the device to be modified. The recovery partition is also used for OTA updates. In stock Android recovery (The recovery your device came with) there are usually very few options such as ‘Wipe Cache’, ‘Factory Reset’ and ‘Apply Update From SD Card’. This cannot flash .zip files other than ones signed by the manufacturer. A custom recovery such as TWRP or Clockwork Mod allows you to install custom ROMs or create backups. A recovery image can be flashed in bootloader or installed through a custom recovery.

/data

Also called userdata, the data partition contains the user’s data – this is where your contacts, messages, settings and apps that you have installed go. Wiping this partition essentially performs a factory reset on your device, restoring it to the way it was when you first booted it, or the way it was after the last official or custom ROM installation. When you perform a wipe data/factory reset from recovery, it is this partition that you are wiping.

/cache

This is the partition where Android stores frequently accessed data and app components. Wiping the cache doesn’t effect your personal data but simply gets rid of the existing data there, which gets automatically rebuilt as you continue using the device. OTA updates are also stored here, it is therefore recommended to wipe this partition through recovery (stock or custom) after an OTA update in order to remove any leftover files.

/misc

This partition contains miscellaneous system settings in form of on/off switches. These settings may include CID (Carrier or Region ID), USB configuration and certain hardware settings etc. This is an important partition and if it is corrupt or missing, several of the device’s features will will not function normally.

/sdcard

This is not a partition on the internal memory of the device but rather the SD card. In terms of usage, this is your storage space to use as you see fit, to store your media, documents, ROMs etc. on it. Wiping it is perfectly safe as long as you backup all the data you require from it, to your computer first. Though several user-installed apps save their data and settings on the SD card and wiping this partition will make you lose all that data. On devices with an external SD Card slot the name for the external SD Card will be along the lines of /sdcard2 or /sdcard1. Unlike /sdcard, no system or app data whatsoever is stored automatically on this external SD card and everything present on it has been added there by the user. You can safely wipe it after backing up any data from it that you need to save.

Jargon buster

In the world of modding Android a wide range of unusual vocabulary is used but what does it all mean?

OS:

Short for ‘Operating System’. Often the Android ROM will be refered to as the OS. This simply means the system files that make up the user experience. Without ‘Root’ or modifications these files are usually unchangeable.

ROM:

Stands for ‘Read Only Memory’. In the context of Android this refers to the files that make up the Operating System installed on your device. By using fastboot or a Custome Recovery a custom ROM can be installed.

ROOT:

‘Rooting’ your device gives you superuser access allowing you to view and modify parts of the OS usually hidden by manufacturers. This allows you to run more powerful software and edit the system directories that make up the ROM.

ADB:

Stand for ‘Android Debug Bridge’. ADB is mainly used for development, however it also has some uses when hacking your Android device. For example it can be used to push files to your devices system folder. ADB can also be used while your device is in Recovery Mode.