[Samsung Galaxy S22 Ultra] marqwe:
I will re-enter my procedure. It has been completed and corrected - I omitted to specify umount /system_root and changed the size of the partitions to rounded to MB.

If someone would like to try the above, you need to check what blkid has, how big its partitions are... This is a specific procedure on my device. To find out the size of partitions I use superunpack and hex data in brackets: "extent target_data" and "extent num_sectors" - sometimes they need to be specified in MB (/(1024*1024)) or in KB (/1024).

"Universal Mount SystemRW / SuperRW featuring MakeRW (read/write)" doesn't seem to know f2fs. I tried "superunpack" (superrepack.arm64_pie), which also doesn't know f2fs, but it gave me information about what partitions are in super.emmc.win and at what locations.

I made the vendor a bit smaller than the original one in super.emmc.win and didn't take it from super.emmc.win:

cd /sdcard/sunpack
mount -o ro /vendor
truncate -s 2344M vendor-from_dm-3.img
toybox blkid /dev/block/dm-3 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' -o
make_f2fs -g android -O project_quota,extra_attr,inode_checksum,sb_checksum,compression,flexible_inline_xattr,verity,inode_crtime -U a91c0907-76eb-415e-9435-d5b6999be324 -f -l vendor vendor-from_dm-3.img
mkdir -p vendor-from_dm-3
mount vendor-from_dm-3.img vendor-from_dm-3
cp -rp /vendor/* vendor-from_dm-3
umount vendor-from_dm-3
umount /vendor
fsck.f2fs -f vendor-from_dm-3.img

I found that the conversion of ro partition system to rw makes it significantly larger. So I first made a reorganization of partitions under TWRP (via adb):

lptools remove system
lptools remove odm
lptools remove product
lptools remove vendor

lptools create system 8178892800
lptools unmap system
lptools map system
lptools create odm 22020096
lptools unmap odm
lptools map odm
lptools create product 1081081856
lptools unmap product
lptools map product
lptools create vendor 2457862144
lptools unmap vendor
lptools map vendor

dd if=super.emmc.win of=/dev/block/dm-0 bs=1M skip=1 count=5426
dd if=super.emmc.win skip=5557248 count=20888 of=/dev/block/dm-1 bs=1K
dd if=super.emmc.win skip=5448 count=1031 of=/dev/block/dm-2 bs=1M
dd if=vendor-from_dm-3.img of=/dev/block/dm-3 bs=1M

The system modified above works. system is still ro, but the /dev/block/dm-0 partition has 7799MB and is ready to be enlarged.

Subsequently, I took inspiration from the /system/bin/multidisabler script and created the rw partition system as follows:

cd /sdcard/sunpack
mount /system_root
truncate -s 7800M system-rw.img
toybox blkid /dev/block/dm-0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' -o
make_f2fs -g android -O project_quota,extra_attr,inode_checksum,sb_checksum,compression,flexible_inline_xattr,verity,inode_crtime -U 26d6704a-2659-478c-805f-ec7d567357d0 -f -l system system-rw.img
mkdir -p system-rw
mount system-rw.img system-rw
cp -rp /system_root/* system-rw
umount system-rw
umount /system_root
fsck.f2fs -f system-rw.img
dd if=system-rw.img of=/dev/block/dm-0 bs=1M

The result is a rw system (which is a bit bigger than the original ro) that I can modify. However, for unknown reasons, the boot doesn't work. Do you know what the problem might be?