Only set set_hashtree_disabled_flag in top-level vbmeta.img.
It's sufficient to have the flag in top-level vbmeta.img, and libavb
expects no disable flag in chained vbmeta.img.
Bug: 118115607
Test: `m vbmetaimage` with an -eng target using vbmeta_system.img. Check
the flag in the generated image
(`avbtool info_image --image vbmeta_system.img`).
Change-Id: Ia429dd8a5cf0243e16ae305da210d3ea27c68abf
diff --git a/core/Makefile b/core/Makefile
index fe728d6..da1fbc2 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -2779,9 +2779,8 @@
BOARD_AVB_MAKE_VBMETA_VENDOR_IMAGE_ARGS += --padding_size 4096
ifeq (eng,$(filter eng, $(TARGET_BUILD_VARIANT)))
+# We only need the flag in top-level vbmeta.img.
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --set_hashtree_disabled_flag
-BOARD_AVB_MAKE_VBMETA_SYSTEM_IMAGE_ARGS += --set_hashtree_disabled_flag
-BOARD_AVB_MAKE_VBMETA_VENDOR_IMAGE_ARGS += --set_hashtree_disabled_flag
endif
ifdef BOARD_AVB_ROLLBACK_INDEX