From 630b6d70c8f55fc794c9418a6de2602443d710be Mon Sep 17 00:00:00 2001 From: Muhammad Asif Date: Mon, 29 Jun 2026 23:26:34 +0500 Subject: [PATCH 1/2] utils/partitions: handle partitions ending in .bin too Signed-off-by: Muhammad Asif --- dumpyara/utils/partitions.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/dumpyara/utils/partitions.py b/dumpyara/utils/partitions.py index fbfd4dd..9c09f05 100644 --- a/dumpyara/utils/partitions.py +++ b/dumpyara/utils/partitions.py @@ -133,19 +133,23 @@ def prepare_raw_images(files_path: Path, raw_images_path: Path): def fix_aliases(images_path: Path): """Move aliased partitions to their generic name.""" for alt_name, name in ALTERNATIVE_PARTITION_NAMES.items(): - alt_path = images_path / f"{alt_name}.img" + alt_paths = [ + images_path / f"{alt_name}.img", + images_path / f"{alt_name}.bin", + ] partition_path = images_path / f"{name}.img" - if not alt_path.exists(): - continue + for alt_path in alt_paths: + if not alt_path.exists(): + continue - if partition_path.exists(): - LOGI(f"Ignoring {alt_name} ({name} already extracted)") - alt_path.unlink() - continue + if partition_path.exists(): + LOGI(f"Ignoring {alt_name} ({name} already extracted)") + alt_path.unlink() + continue - LOGI(f"Fixing alias {alt_name} -> {name}") - move(alt_path, partition_path) + LOGI(f"Fixing alias {alt_name} -> {name}") + move(alt_path, partition_path) def get_filename_suffixes(file: Path): From 987071178a51a1d434126718381bad091a8974aa Mon Sep 17 00:00:00 2001 From: Muhammad Asif Date: Mon, 29 Jun 2026 23:26:49 +0500 Subject: [PATCH 2/2] dumpyara: encode all-files.txt in utf-8 Fixes dumping OPPO and/or OnePlus stock firmwares that use Chinese characters for app paths Signed-off-by: Muhammad Asif --- dumpyara/dumpyara.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dumpyara/dumpyara.py b/dumpyara/dumpyara.py index 4707de4..53d0c3d 100644 --- a/dumpyara/dumpyara.py +++ b/dumpyara/dumpyara.py @@ -77,7 +77,8 @@ def dumpyara(file: Path, output_path: Path, debug: bool = False): # Create all_files.txt LOGI("Creating all_files.txt") (output_path / "all_files.txt").write_text( - "\n".join([str(file) for file in files_list]) + "\n" + "\n".join([str(file) for file in files_list]) + "\n", + encoding="utf-8" ) return output_path