From 40b5b327b0ea887183b219c59e081f109499523e Mon Sep 17 00:00:00 2001 From: nyyu Date: Sat, 7 Jan 2023 10:57:41 +0100 Subject: [PATCH] fix: store build prop zip --- fix-store-build-prop-zip.patch | 38 ++++++++++++++++++++++++++++++++++ sync.sh | 4 ++++ 2 files changed, 42 insertions(+) create mode 100644 fix-store-build-prop-zip.patch diff --git a/fix-store-build-prop-zip.patch b/fix-store-build-prop-zip.patch new file mode 100644 index 0000000..a8504ef --- /dev/null +++ b/fix-store-build-prop-zip.patch @@ -0,0 +1,38 @@ +From 497ae885d6a92d473ec3c603bd39e4510380240d Mon Sep 17 00:00:00 2001 +From: nyyu +Date: Sat, 7 Jan 2023 10:54:05 +0100 +Subject: [PATCH] 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" + + diff --git a/sync.sh b/sync.sh index 403c2f8..58b7331 100644 --- a/sync.sh +++ b/sync.sh @@ -43,6 +43,10 @@ for i in "${tmp[@]}"; do done cat "${changelog}" +cd build/tools +git am $CI_WORKSPACE/fix-store-build-prop-zip.patch || git am --abort +cd $TOPDIR + cd packages/apps/LineageParts git am $CI_WORKSPACE/fix-always-enable-taskbar-toggle.patch || git am --abort