From 3b548b0302018c75076258a1f2864d38e51099e9 Mon Sep 17 00:00:00 2001 From: xunchang Date: Tue, 19 Feb 2019 14:52:33 -0800 Subject: [PATCH] Dump a copy of metadata file for full OTA When building the full OTA file, write a copy of the metadata to the dist dir. Then it will show up in the artifact of the build page for users to parse. Bug: 124783265 Test: make dist and check the output metadata Change-Id: I2eb06bbf3cbb9f3653ca3352f3d601b09403d59d --- core/Makefile | 6 +++++- core/main.mk | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index 97cb75214..99148aee7 100644 --- a/core/Makefile +++ b/core/Makefile @@ -4069,6 +4069,8 @@ name := $(name)-ota-$(FILE_NAME_TAG) INTERNAL_OTA_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip +INTERNAL_OTA_METADATA := $(PRODUCT_OUT)/ota_metadata + $(INTERNAL_OTA_PACKAGE_TARGET): KEY_CERT_PAIR := $(DEFAULT_KEY_CERT_PAIR) ifeq ($(AB_OTA_UPDATER),true) @@ -4077,10 +4079,12 @@ else $(INTERNAL_OTA_PACKAGE_TARGET): $(BROTLI) endif +$(INTERNAL_OTA_PACKAGE_TARGET): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_OTA_METADATA) + $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) \ build/make/tools/releasetools/ota_from_target_files @echo "Package OTA: $@" - $(call build-ota-package-target,$@,-k $(KEY_CERT_PAIR)) + $(call build-ota-package-target,$@,-k $(KEY_CERT_PAIR) --output_metadata_path $(INTERNAL_OTA_METADATA)) .PHONY: otapackage otapackage: $(INTERNAL_OTA_PACKAGE_TARGET) diff --git a/core/main.mk b/core/main.mk index 610ab2890..3f916ae89 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1454,6 +1454,7 @@ else # TARGET_BUILD_APPS $(call dist-for-goals, droidcore, \ $(INTERNAL_UPDATE_PACKAGE_TARGET) \ $(INTERNAL_OTA_PACKAGE_TARGET) \ + $(INTERNAL_OTA_METADATA) \ $(INTERNAL_OTA_RETROFIT_DYNAMIC_PARTITIONS_PACKAGE_TARGET) \ $(BUILT_OTATOOLS_PACKAGE) \ $(SYMBOLS_ZIP) \