From 5dbb1ad2ded3fd954a10bc11aa04e6f8c8757639 Mon Sep 17 00:00:00 2001 From: flawedworld Date: Thu, 27 Jan 2022 22:36:56 +0000 Subject: [PATCH] external/extract_android_ota_payload: do not extract partitions built by AOSP --- .../extract_android_ota_payload.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/external/extract_android_ota_payload/extract_android_ota_payload.py b/external/extract_android_ota_payload/extract_android_ota_payload.py index 8844715..41b344e 100644 --- a/external/extract_android_ota_payload/extract_android_ota_payload.py +++ b/external/extract_android_ota_payload/extract_android_ota_payload.py @@ -112,7 +112,24 @@ def main(filename, output_dir): payload = Payload(payload_file) payload.Init() + blacklist_partitions = ["boot", + "dtbo", + "persist", + "product", + "recovery", + "system", + "system_ext", + "userdata", + "vbmeta", + "vbmeta_system", + "vbmeta_vendor", + "vendor", + "vendor_boot", + "vendor_dlkm"] + for p in payload.manifest.partitions: + if p.partition_name in blacklist_partitions: + continue name = p.partition_name + '.img' print("Extracting '%s'" % name) fname = os.path.join(output_dir, name)