external/extract_android_ota_payload: do not extract partitions built by AOSP

This commit is contained in:
flawedworld 2022-01-27 22:36:56 +00:00 committed by Daniel Micay
parent 9b3c5bbeeb
commit 5dbb1ad2de

View file

@ -112,7 +112,24 @@ def main(filename, output_dir):
payload = Payload(payload_file) payload = Payload(payload_file)
payload.Init() 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: for p in payload.manifest.partitions:
if p.partition_name in blacklist_partitions:
continue
name = p.partition_name + '.img' name = p.partition_name + '.img'
print("Extracting '%s'" % name) print("Extracting '%s'" % name)
fname = os.path.join(output_dir, name) fname = os.path.join(output_dir, name)