[HTC U12+ Guides, News, & Discussion] 5m4r7ph0n36uru:
[INFORMATION] Partitions on an A/B-Android device

Partitions on an A/B-Android device

A partition is simply a discrete area on the internal memory of the smartphone where the data is stored. You want to know what's behind it? Then read my article about firmware or ROM, the chicken-egg question. Which data is stored on each partition depends on the hardware, the operating system and many other factors. The bootloader has one, the system (Android OS) one, the user data one..... and so on and so on. When you see people talking about "/system" and "/cache", they refer to the names for these partitions. For example, the HTC U12+ has 92 partitions:

lrwxrwxrwx 1 root root 15 1970-01-30 10:42 abl_a -> /dev/block/sde9
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 abl_b -> /dev/block/sde30
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 aop_a -> /dev/block/sde1
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 aop_b -> /dev/block/sde22
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 apdp -> /dev/block/sde46
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 avb_rec -> /dev/block/sde56
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 bluetooth_a -> /dev/block/sde6
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 bluetooth_b -> /dev/block/sde27
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 board_info -> /dev/block/sdf1
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 boot_a -> /dev/block/sde13
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 boot_b -> /dev/block/sde34
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 carrier -> /dev/block/sda16
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 cdt -> /dev/block/sdd2
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 cmnlib64_a -> /dev/block/sde16
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 cmnlib64_b -> /dev/block/sde37
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 cmnlib_a -> /dev/block/sde15
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 cmnlib_b -> /dev/block/sde36
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 control -> /dev/block/sda13
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 cota -> /dev/block/sda17
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 ddr -> /dev/block/sdd3
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 devcfg_a -> /dev/block/sde17
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 devcfg_b -> /dev/block/sde38
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 devinfo -> /dev/block/sde44
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 devlog -> /dev/block/sda10
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 dip -> /dev/block/sde45
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 dpo -> /dev/block/sde48
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 dsp_a -> /dev/block/sde10
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 dsp_b -> /dev/block/sde31
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 dtbo_a -> /dev/block/sde21
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 dtbo_b -> /dev/block/sde42
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 extra -> /dev/block/sda12
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 fataldevlog -> /dev/block/sda11
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 frp -> /dev/block/sda14
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 fsc -> /dev/block/sdf4
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 fsg -> /dev/block/sdf3
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 hosd_a -> /dev/block/sde14
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 hosd_b -> /dev/block/sde35
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 hvbmeta -> /dev/block/sda4
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 hyp_a -> /dev/block/sde3
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 hyp_b -> /dev/block/sde24
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 keymaster_a -> /dev/block/sde11
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 keymaster_b -> /dev/block/sde32
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 limits -> /dev/block/sde50
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 local -> /dev/block/sda15
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 lockbooter_a -> /dev/block/sde12
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 lockbooter_b -> /dev/block/sde33
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 logdump -> /dev/block/sde54
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 logfs -> /dev/block/sde52
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 mdtp_a -> /dev/block/sde8
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 mdtp_b -> /dev/block/sde29
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 mdtpsecapp_a -> /dev/block/sde7
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 mdtpsecapp_b -> /dev/block/sde28
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 mfg -> /dev/block/sdf2
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 misc -> /dev/block/sda6
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 modemst1 -> /dev/block/sdf5
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 modemst2 -> /dev/block/sdf6
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 msadp -> /dev/block/sde47
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 oem_misc -> /dev/block/sda7
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 padding0 -> /dev/block/sda1
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 padding3 -> /dev/block/sdd1
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 persist -> /dev/block/sda3
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 pg1fs -> /dev/block/sda5
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 pmic_a -> /dev/block/sde4
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 pmic_b -> /dev/block/sde25
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 qupfw_a -> /dev/block/sde18
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 qupfw_b -> /dev/block/sde39
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 radio_a -> /dev/block/sde5
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 radio_b -> /dev/block/sde26
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 ramdump -> /dev/block/sda8
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 reserve0 -> /dev/block/sda21
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 reserve4 -> /dev/block/sde57
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 reserve5 -> /dev/block/sdf7
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 sec -> /dev/block/sde43
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 sp1 -> /dev/block/sde49
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 ssd -> /dev/block/sda2
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 sti -> /dev/block/sde53
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 storsec -> /dev/block/sde55
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 system_a -> /dev/block/sda18
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 system_b -> /dev/block/sda19
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 tool_diag -> /dev/block/sda9
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 toolsfv -> /dev/block/sde51
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 tz_a -> /dev/block/sde2
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 tz_b -> /dev/block/sde23
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 userdata -> /dev/block/sda20
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 vbmeta_a -> /dev/block/sde20
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 vbmeta_b -> /dev/block/sde41
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 vendor_a -> /dev/block/sde19
lrwxrwxrwx 1 root root 16 1970-01-30 10:42 vendor_b -> /dev/block/sde40
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 xbl_a -> /dev/block/sdb1
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 xbl_b -> /dev/block/sdc1
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 xbl_config_a -> /dev/block/sdb2
lrwxrwxrwx 1 root root 15 1970-01-30 10:42 xbl_config_b -> /dev/block/sdc2

There are many partitions on one device that I will never have to worry about you as users. Many of these partitions are never changed when flashing custom ROMs, kernels, recoveries or mods - like Magisk or Xposed - i.e. most partitions will either remain unused for our purposes or it is simply too risky to experiment with them unless you know exactly what you are doing - XLOADER and OEMINFO on Huawei/Honor devices come to my mind first. For the vast majority of Android users, the partitions we mainly deal with are /system, /boot, /recovery, /userdata and more recently /vendor and /vbmeta. Here is a short explanation of the purpose of each of these partitions:

/system - contains the Android operating system, system libraries, system applications and other system media such as boot animations, background images, ringtones, etc.

/boot - contains the kernel, the ramdisk and on A/B devices also the recovery.

/recovery - contains recovery, where TWRP is most commonly flashed on A-only devices, whereas A/B devices no longer have a dedicated /recovery partition.

/userdata - contains all data of your application, your system and your internal memory.

/vendor - contains platform- and device-specific HALs, the files required by the Android operating system to communicate with the underlying hardware.

/vbmeta - the partition for Android Verified Boot 2.0 that checks the integrity of the boot process.