From dc3d57deba433986071a42e6e87a8f94be086528 Mon Sep 17 00:00:00 2001 From: Mohd Faraz Date: Sun, 8 Nov 2020 18:40:18 +0530 Subject: [PATCH] utils_functions: Added a check for the system_root now on addon while flashing recovery usign mount point /system_root by which this is causing a flashing error. Let's first check and unmount /system_root if mounted Signed-off-by: Mohd Faraz --- scripts/util_functions.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index 501702804..101dea80b 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -252,6 +252,10 @@ mount_partitions() { [ -z $SLOT ] || ui_print "- Current boot slot: $SLOT" # Mount ro partitions + if is_mounted /system_root; then + umount /system 2&>/dev/null + umount /system_root 2&>/dev/null + fi mount_ro_ensure "system$SLOT app$SLOT" /system if [ -f /system/init -o -L /system/init ]; then SYSTEM_ROOT=true