From ddb968dce02e01eeedb8c1c1aba7ff05ef54e023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kan=20Kvist?= Date: Fri, 9 Jun 2023 11:59:22 +0200 Subject: [PATCH] Supply apex_info.pb as parameter to delta_generator if file exists Supply generator with parameter --apex_info_file=META/apex_info.pb if the file exists. This ensures that apex_info is included in payload header. This is identical to the behaviour of brillo_update_payload which is not being used since: Invoke delta_generator directly fcd731e3d69baa70f3ee84fd86970d4c3a2ac32e Issue: 286253576 Test: Manual, confirm that apex_info is included in payload header Change-Id: Ic096c5f8966beec8686f918aba462c955290a6c5 --- tools/releasetools/ota_utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/releasetools/ota_utils.py b/tools/releasetools/ota_utils.py index 63a863e95c..466cafb1cb 100644 --- a/tools/releasetools/ota_utils.py +++ b/tools/releasetools/ota_utils.py @@ -846,6 +846,11 @@ class PayloadGenerator(object): if os.path.exists(dynamic_partition_info): cmd.extend(["--dynamic_partition_info_file", dynamic_partition_info]) + apex_info = os.path.join( + target_dir, "META", "apex_info.pb") + if os.path.exists(apex_info): + cmd.extend(["--apex_info_file", apex_info]) + major_version, minor_version = ParseUpdateEngineConfig( os.path.join(target_dir, "META", "update_engine_config.txt")) if source_file: