Skip to content

Commit 2093aa1

Browse files
committed
extract_utils: fix extraction of alternate partitions
The current code checks if partition is in list of normal partitions before deciding whether to extract it using normal route or firmware route. If you want to extract system_ext, but system_ext is not a separate partition, and it's contained inside system, after trying to extract system_ext, code will pick system as an alternate partition for system_ext. Normal partitions will not contain system because we're either only trying to extract system_ext or because we don't extract any blob from system so firmware route will be picked, failing to extract it. Firmware partitions have no alternate partitions, so flip the condition. Change-Id: I3b3a65495d8b136a6163d0caee59f9b482bffe2c
1 parent 8cff4bb commit 2093aa1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

extract_utils/extract.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,10 +539,10 @@ def extract_all_partitions(dump_dir: str, ctx: ExtractCtx):
539539
while partitions:
540540
with ProcessPoolExecutor() as exe:
541541
for partition in partitions:
542-
if partition in normal_partitions:
543-
fn = extract_partition
544-
else:
542+
if partition in firmware_partitions:
545543
fn = extract_firmware_partition
544+
else:
545+
fn = extract_partition
546546

547547
exe.submit(fn, partition, dump_dir)
548548

0 commit comments

Comments
 (0)