Some basic facts:
This one for example.
I have no words for thanking you.
All these years of flashing ,i want to pass to next level so i can make my own builds only according my tastes
Your POCO F3 uses A/B slots
and in this context your OTA files are merged in a payload.bin
. A payload.bin is a special container format. To unpack a payload.bin you could use the UKA or a tool called payload_dumper
. It's available for Android (Termux), Linux and Windows.
It's not possible (or much too complicated) to unpack a payload.bin, modify the images and repack it again. So, you have to work with the unpacked raw images in ext4
format and at the end you have to flash them via a custom recovery or fastboot.
Work with raw images:
The ext4 file system is used by Linux and Android. Windows is not able to open this format except you are using some special tools. But it's not recommended.
A raw image is like an ISO file in Windows and exactly the same as having a hard drive. You could mount (plug in) a hard drive on a Linux/Android machine or mount a raw image by using the machine's shell. Both methods let you modify its contents.
I wouldn't recommend to unpack a system.img, modify it and repack it again to a system.img. That's not the common way to deal with ext4 images. Mounting a ext4 image on a Linux machine is much, much better.
I don't know what your goal is when modifying the content of your update files. But booting TWRP, mounting /system and do your changes is at the end of all the same as modifying the raw system.img and flash it. But it's much easier.
Problems with modifying system.img:
When modifying /system you encounter a lot of problems that all lead to a non bootable system. The reason is AVB (Android verified boot) or better known as vbmeta.img. The partition /vbmeta stores hashes (checksums) to validate critical system partitions to avoid any corruption of their content. A modified content will change the hash of a partition and as a result of this your system will not boot. To avoid AVB will refuse booting your system you need to patch the vbmeta partition. UKA could do this for you. Maybe it's already done by you when installing a custom recovery since it requires a patched vbmeta, too.
BTW: That's also the reason for using Magisk modules. Magisk is a systemless rooting method. Magisk will never ever touch /system! But to be able to modify system related files or parts Magisk mounts only a mirror of /system. While mounting this mirror Magisk will load all its modules to modify this mirror. But not to modify /system!
Repacking a OTA is not possible. To make changes on /system you only need a custom recovery and a patched vbmeta.
Depending on what to modify it could be better to use a Magisk module, e.g. when (un)installing some system apps.