build/fix-store-build-prop-zip.patch
nyyu 47f59bc420
All checks were successful
ci/woodpecker/push/sync Pipeline was successful
fix: changelog
2023-05-28 08:47:33 +02:00

39 lines
1.6 KiB
Diff

From 497ae885d6a92d473ec3c603bd39e4510380240d Mon Sep 17 00:00:00 2001
From: nyyu <mail@nyyu.dev>
Date: Sat, 7 Jan 2023 10:54:05 +0100
Subject: [PATCH] XXXHIDEXXX releasetools: Store the build.prop file in the OTA zip
Change-Id: I81825a8a4633dff294a372ccf4de8e3aef99750c
---
tools/releasetools/non_ab_ota.py | 3 +++
tools/releasetools/ota_utils.py | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/releasetools/non_ab_ota.py b/tools/releasetools/non_ab_ota.py
index ad9cbcc82..91492ad76 100644
--- a/tools/releasetools/non_ab_ota.py
+++ b/tools/releasetools/non_ab_ota.py
@@ -308,6 +308,9 @@ endif;
script.AddToZip(input_zip, output_zip, input_path=OPTIONS.updater_binary)
metadata.required_cache = script.required_cache
+ common.ZipWriteStr(output_zip, "system/build.prop",
+ input_zip.read("SYSTEM/build.prop").decode())
+
# We haven't written the metadata entry, which will be done in
# FinalizeMetadata.
common.ZipClose(output_zip)
diff --git a/tools/releasetools/ota_utils.py b/tools/releasetools/ota_utils.py
index ff98ba9fb..1fb78db61 100644
--- a/tools/releasetools/ota_utils.py
+++ b/tools/releasetools/ota_utils.py
@@ -39,7 +39,7 @@ OPTIONS.boot_variable_file = None
METADATA_NAME = 'META-INF/com/android/metadata'
METADATA_PROTO_NAME = 'META-INF/com/android/metadata.pb'
-UNZIP_PATTERN = ['IMAGES/*', 'INSTALL/*', 'META/*', 'OTA/*', 'RADIO/*']
+UNZIP_PATTERN = ['IMAGES/*', 'INSTALL/*', 'META/*', 'OTA/*', 'RADIO/*', 'SYSTEM/build.prop']
SECURITY_PATCH_LEVEL_PROP_NAME = "ro.build.version.security_patch"