AOSP Foundations
2 min read

Dynamic Partitions

Learn how Android solved the rigid storage problem by consolidating physical partitions into a single resizable super partition.

Historically, Android partitions (system, vendor, product) were rigid, physical blocks of flash memory.

If a manufacturer allocated exactly 2.5GB for the system partition during the factory flashing process, that size was permanently locked. If Google later released a massive Android update that required 2.6GB of space, the OTA update would simply fail. The manufacturer could not magically expand the partition without wiping the entire device and re-partitioning the motherboard.

To solve this, Google introduced Dynamic Partitions in Android 10.

The super Partition

Instead of carving the physical flash memory into dozens of tiny, rigid partitions, modern Android devices feature one massive physical partition named super.

The super partition acts as a giant container. Inside this container, the operating system can carve out "logical" partitions (like system, vendor, and product) dynamically at runtime.

How it Works (liblp)

Dynamic Partitions are managed by a specialized framework known as Logical Partition (liblp) volumes, which is conceptually very similar to LVM (Logical Volume Management) used in desktop Linux.

  • Metadata: The very beginning of the super partition contains a metadata block. This block holds a simple table that says: "The system logical partition starts at byte X and ends at byte Y."
  • Resizing: Because the partitions are just software definitions in a metadata table, they are not bound by physical constraints. If an OTA update requires the system partition to grow by 100MB, the update engine simply modifies the metadata table to expand the logical boundary, borrowing free space from the super container.
# You can inspect the logical partitions via ADB on a live device
adb shell lpdump

The Flashing Process (lptools)

Because the standard bootloader is a primitive piece of software, it does not understand how to read the complex logical structure of the super partition.

If you try to run fastboot flash system system.img on an older bootloader, it will fail because there is no physical system partition to write to.

To flash logical partitions, the device must be booted into fastbootd (Userspace Fastboot). This specialized minimal Linux environment has the necessary liblp libraries to understand the super partition metadata, allowing it to resize and flash the logical system.img safely.

# Entering fastbootd to flash logical dynamic partitions
adb reboot fastboot
fastboot flash vendor vendor.img