From 1be984fec3941da1bc823e11b1705da1b63ad54c Mon Sep 17 00:00:00 2001 From: TheHitMan7 Date: Sun, 8 Jan 2023 17:34:10 +0530 Subject: [PATCH] backuptool: Unmount v3 partitions during backup Extracted file /tmp/install/bin/backuptool.functions Extracted file /tmp/install/bin/backuptool.sh Extracted 2 file(s) about to run program [/tmp/install/bin/backuptool.sh] with 5 args [libfs_mgr]Unmapped logical partition system DM_DEV_REMOVE failed for [vendor]: Device or resource busy Cannot unmap vendor before removing group qti_dynamic_partitions. script aborted: assert failed: update_dynamic_partitions(package_extract_file(dynamic_partitions_op_list)) assert failed: update_dynamic_partitions(package_extract_file(dynamic_partitions_op_list))error: 25 Updater process ended with ERROR: 1 Failed to mount '/system_root' (No such file or directory) I:Actual block device: '/dev/block/dm-0', current file system: 'ext4' We can clearly see that after version 3 script is executed with its specific functions. It cannot or don't unmount partitions for successful OTA upgrade. Resulting broken installation, this also affects ROM inbuilt OTA updater app. Signed-off-by: TheHitMan7 Change-Id: Ic2d4e7809e8abd402c2a49188c73c83ea3b4e8df --- prebuilt/common/bin/backuptool.sh | 1 + prebuilt/common/bin/backuptool_ab.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/prebuilt/common/bin/backuptool.sh b/prebuilt/common/bin/backuptool.sh index 2be29860..c814c876 100755 --- a/prebuilt/common/bin/backuptool.sh +++ b/prebuilt/common/bin/backuptool.sh @@ -171,6 +171,7 @@ case "$1" in mkdir -p $C preserve_addon_d run_stages pre-backup backup post-backup + umount_extra $all_V3_partitions fi unmount_system ;; diff --git a/prebuilt/common/bin/backuptool_ab.sh b/prebuilt/common/bin/backuptool_ab.sh index 583a5ab3..0a519352 100755 --- a/prebuilt/common/bin/backuptool_ab.sh +++ b/prebuilt/common/bin/backuptool_ab.sh @@ -177,6 +177,7 @@ case "$1" in mkdir -p $C preserve_addon_d run_stages pre-backup backup post-backup + umount_extra $all_V3_partitions else cleanup fi