'AOSP: How to change size of file systems?

When i do df -h, I can see that /dev/block/dm-2 is mounted on vendor, /dev/block/dm-0 on /(system, i guess?) etc. as shown below.

Filesystem                   Size  Used Avail Use% Mounted on
tmpfs                        978M  816K  978M   1% /dev
tmpfs                        978M     0  978M   0% /mnt
/dev/block/mmcblk2p11         11M  144K   11M   2% /metadata
/dev/block/dm-0              934M  931M  2.8M 100% /
/dev/block/dm-2              228M  227M  708K 100% /vendor

As it can be seen, both the vendor and system partitions are almost full. How can i increase the size of both the file systems?



Solution 1:[1]

It may have enable dynamic partitions. Have a look at: https://source.android.com/devices/tech/ota/dynamic_partitions/implement?hl=en.

With dynamic partitions, vendors no longer have to worry about the individual sizes of partitions such as system, vendor, and product. Instead, the device allocates a super partition, and sub-partitions can be sized dynamically within it. Individual partition images no longer have to leave empty space for future OTAs. Instead, the remaining free space in super is available for all dynamic partitions.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Yong