With TWRP/OFRP
adb shell
lptools resize product_a 335872 # Do not change this value
lptools resize system_a 5368709120 #4617089843 or 5368709120 (4.3GB or 5GB system)
With Fastbootd
fastboot resize-logical-partition system_a 5368709120 #(For 5GB)
- Reboot Recovery/Fastbootd after this
- Flash product_gsi
e2fsck -f /dev/block/by-name/system
resize2fs /dev/block/by-name/system 5G
e2fsck -E unshare_blocks /dev/block/by-name-system