I thought it might be helpful to others to document some test results after rooting my Google Pixel (2016) phone with Magisk (v20.4) and Magisk Manager (v8.0.4), and using various commands with a terminal emulator (Termux) on my phone, and with terminal and adb on my Linux (Ubuntu) computer with phone connected.
Command outputs appear to refer to the number (#) of blocks. By presupposing that each of these blocks has 1,024 bytes, I calculated partition sizes in MB and GB, and compared the values to the sizes of the files copied using adb pull /dev/block/bootdevice/by-name. The values matched exactly, and the total size of all of the partitions came to 32 GB, which is the size of my phone’s internal storage.
I found 62 different partitions on my phone, and combining several command outputs enabled me to produce the following table.
The sda partition is the main part of the phone's internal storage, but could sdb, sdc, sdd, sde and sdf partitions be held on separate disks or boards?
Commands used via Phone and Terminal Emulator:
uname (with -a appended)
sudo cat /proc/partitions
tsu
sudo cat /proc/partitions
su
cd /dev/block/bootdevice/by-name
ls -all
Commands used via Computer Terminal and ADB: (I found it easier to temporarily boot TWRP using fastboot boot twrp-3.4.0-0-sailfish.img).
adb ls /dev/block/bootdevice/by-name
adb shell ls /dev/block/bootdevice/by-name
adb shell ls -all /dev/block/bootdevice/by-name
adb pull /dev/block/bootdevice/by-name (see below)
adb shell uname (with -a appended)
adb shell
cat /proc/partitions
The adb pull command copied 34.5 GB files (took 18 mins) into a ‘by-name’ file in my adb folder. The files in 'by-name' included boot (33.6 MB), system (2.1 GB) and vendor (314.6 MB) files (approx 2.5 GB) that were not included in the command outputs, which instead had similarly sized boot_a, boot_b, system_a, system_b, vendor_a and vendor_b files.
Command outputs appear to refer to the number (#) of blocks. By presupposing that each of these blocks has 1,024 bytes, I calculated partition sizes in MB and GB, and compared the values to the sizes of the files copied using adb pull /dev/block/bootdevice/by-name. The values matched exactly, and the total size of all of the partitions came to 32 GB, which is the size of my phone’s internal storage.
I found 62 different partitions on my phone, and combining several command outputs enabled me to produce the following table.
Partition Name | Partition Number | Number of Blocks | Partition Size MB | Partition Size GB |
---|---|---|---|---|
aboot_a | sda17 | 4,096 | 4.2 | |
aboot_b | sda18 | 4,096 | 4.2 | |
apdp_a | sda29 | 256 | 0.3 | |
apdp_b | sda30 | 256 | 0.3 | |
board_info | sdf1 | 16 | 0.0 | |
boot_a | sda19 | 32,768 | 33.6 | |
boot_b | sda20 | 32,768 | 33.6 | |
bootlocker_a | sda1 | 512 | 0.5 | |
bootlocker_b | sda2 | 512 | 0.5 | |
cdt | sdd12 | 4 | 0.0 | |
cmnlib32_a | sda13 | 256 | 0.3 | |
cmnlib32_b | sda14 | 256 | 0.3 | |
cmnlib64_a | sda15 | 256 | 0.3 | |
cmnlib64_b | sda16 | 256 | 0.3 | |
ddr | sdd11 | 1,024 | 1.0 | |
devcfg_a | sda23 | 128 | 0.1 | |
devcfg_b | sda24 | 128 | 0.1 | |
devinfo | sdf4 | 4 | 0.0 | |
devinfobak | sdd5 | 4 | 0.0 | |
dip | sdd7 | 1,024 | 1.0 | |
dpo | sdd6 | 4 | 0.0 | |
frp | sde1 | 512 | 0.5 | |
fsc | sdd8 | 4 | 0.0 | |
fsg | sdf3 | 2,048 | 2.1 | |
hosd_a | sda21 | 32,768 | 33.6 | |
hosd_b | sda22 | 32,768 | 33.6 | |
hyp_a | sda11 | 512 | 0.5 | |
hyp_b | sda12 | 512 | 0.5 | |
keymaster_a | sda3 | 512 | 0.5 | |
keymaster_b | sda4 | 512 | 0.5 | |
metadata | sde5 | 16,384 | 16.8 | |
mfg | sdf2 | 236 | 0.3 | |
misc | sdd1 | 1,024 | 1.0 | |
modem_a | sda25 | 71,680 | 73.4 | |
modem_b | sda26 | 71,760 | 73.4 | |
modemst1 | sdd9 | 2,048 | 2.1 | |
modemst2 | sdd10 | 2,048 | 2.1 | |
msadp_a | sda27 | 256 | 0.3 | |
msadp_b | sda28 | 256 | 0.3 | |
persist | sdd3 | 32,768 | 33.6 | |
pg1fs | sde3 | 4,096 | 4.2 | |
pg2fs | sde4 | 2,048 | 2.1 | |
pmic_a | sda9 | 512 | 0.5 | |
pmic_b | sda10 | 512 | 0.5 | |
ramdump | sde2 | 6,144 | 6.3 | |
reserve0 | sda36 | 4,820 | 4.9 | |
reserve3 | sdd13 | 9,020 | 9.2 | |
reserve4 | sde6 | 7,636 | 7.8 | |
reserve5 | sdf5 | 5,824 | 6.0 | |
rpm_a | sda7 | 512 | 0.5 | |
rpm_b | sda8 | 512 | 0.5 | |
sec | sdd4 | 128 | 0.1 | |
ssd | sdd2 | 8 | 0.0 | |
system_a | sda33 | 2,097,152 | 2,147.5 | 2.1 GB |
system_b | sda34 | 2,097,152 | 2,147.5 | 2.1 GB |
tz_a | sda5 | 2,048 | 2.1 | |
tz_b | sda6 | 2,048 | 2.1 | |
userdata | sda35 | 26,038,272 | 26,663.2 | 26.7 GB |
vendor_a | sda31 | 307,200 | 314.6 | 0.3 GB |
vendor_b | sda32 | 307,200 | 314.6 | 0.3 GB |
xbl_a | sdb1 | 4,052 | 4.1 | |
xbl_b | sdc1 | 4,052 | 4.1 | |
TOTALS | - | 31,248,120 | 31,998.1 | 32 GB |
Partition Name | Partition Number | Number of Blocks | Partition Size MB | Partition Size GB |
---|---|---|---|---|
sda | - | 31,145,984 | 31,893.5 | 31.9 GB |
sdb | - | 4,096 | 4.2 | |
sdc | - | 4,096 | 4.2 | |
sdd | - | 49,152 | 50.3 | |
sde | - | 36,864 | 37.7 | |
sdf | - | 8,192 | 8.4 | |
TOTALS | - | 31,248,384 | 31,998.3 | 32 GB |
The sda partition is the main part of the phone's internal storage, but could sdb, sdc, sdd, sde and sdf partitions be held on separate disks or boards?
Commands used via Phone and Terminal Emulator:
uname (with -a appended)
sudo cat /proc/partitions
tsu
sudo cat /proc/partitions
su
cd /dev/block/bootdevice/by-name
ls -all
Commands used via Computer Terminal and ADB: (I found it easier to temporarily boot TWRP using fastboot boot twrp-3.4.0-0-sailfish.img).
adb ls /dev/block/bootdevice/by-name
adb shell ls /dev/block/bootdevice/by-name
adb shell ls -all /dev/block/bootdevice/by-name
adb pull /dev/block/bootdevice/by-name (see below)
adb shell uname (with -a appended)
adb shell
cat /proc/partitions
The adb pull command copied 34.5 GB files (took 18 mins) into a ‘by-name’ file in my adb folder. The files in 'by-name' included boot (33.6 MB), system (2.1 GB) and vendor (314.6 MB) files (approx 2.5 GB) that were not included in the command outputs, which instead had similarly sized boot_a, boot_b, system_a, system_b, vendor_a and vendor_b files.