Set rollback_index of microdroid_kernel to 1
This index (which will be part of vbmeta footer of kernel image) will be
used as the security_version in Dice node of microdroid_kernel.
Also modify sign_virt_apex.py to include the flag, for signing prod
builds.
TrunkStableCompliance: We create flag_aware_avb_add_hash_footer target
which allows for conditionally including rollback_index for target. We
have enabled it only if release_avf_enable_llpvm_changes is true.
Test: avbtool info_image --image [path_to_built_image]
Bug: 296830692
Change-Id: I64f2732fc0cb405799e523fc7ded772270179986
diff --git a/apex/sign_virt_apex.py b/apex/sign_virt_apex.py
index a42f5ec..8257aae 100644
--- a/apex/sign_virt_apex.py
+++ b/apex/sign_virt_apex.py
@@ -231,6 +231,9 @@
if additional_descriptors:
for image in additional_descriptors:
cmd.extend(['--include_descriptors_from_image', image])
+
+ if 'Rollback Index' in info:
+ cmd.extend(['--rollback_index', info['Rollback Index']])
RunCommand(args, cmd)