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:
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.
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.
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.
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.
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.
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.
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.
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.