Installing custom rom needs unlocked bootloader. so I unlocked bootloader.
I built a custom android 12 rom with AVB enabled for system and boot partitions and flashed it.
if I Installing apk through recovery to system partition(copy to /system/app), apk will not installed. so AVB is working normally.
But if I flash Magisk in recovery, Magisk will root device.
Also if I flash a disabled vbmeta partition in fastboot and then inject some apk in the system partition, the apk will be installed in the system partition normally.
So the question is
Is there any way to provide integrity of system without using User-settable root of trust in custom roms with unlocked bootloader?