Hi joanxie,
Thanks for your reply.
We are using "android_p9.0.0_2.0.0-ga" release. I have some update in this thread like you said it is enabled by default.
We are using i.MX8MQ custom board. For i.MX8MQ, AVB signing is by-default enabled with "BOARD_AVB_ENABLE := true" to verify kernel and DTB.
DM-Verity is also enabled in kernel configurations. So, the hash of system and vendor images are verified using hashtree descriptor stored in vbmeta.img and both images are mounted as device mapper /dev/block/dm-0 and /dev/block/dm-1 devices.
But, as per "IMX_ANDROID_SECURITY_USERS_GUIDE_v10.pdf" and "Android_Frequently_Asked_Questions.pdf" documents, RSA key (${MY_ANDROID}/build/target/product/security/verity/verity.pk8) is used to sign the DM_verity table to produce a table signature and it is validated first using the public key named "verity_key" at boot time.
However, we have observed that DM_verity table is NOT signed using verity.pk8 when "BOARD_AVB_ENABLE := true". In fact it is not signed at all. The signing scripts are not invoked during build time when "BOARD_AVB_ENABLE := true"
To enable DM_verity signing part, we need to comment/remove "BOARD_AVB_ENABLE := true" and add below lines.
-----------------------------------------------------------------------------------------------------
# dm-verity definitions
ifneq ($(BOARD_AVB_ENABLE), true)
PRODUCT_SYSTEM_VERITY_PARTITION=/dev/block/by-name/system
PRODUCT_VENDOR_VERITY_PARTITION=/dev/block/by-name/vendor
$(call inherit-product, build/target/product/verity.mk)
endif
-------------------------------------------------------------------------------------------------------
Can you please help us to understand, if dm-verity table signing/verification (using RSA keys) is really required if AVB is already enabled (BOARD_AVB_ENABLE := true)?
Thank You for your help.
Regards,
Pratik Manvar