Commit dc3d57de authored by Mohd Faraz's avatar Mohd Faraz Committed by John Wu

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: 's avatarMohd Faraz <androiabledroid@gmail.com>
parent d0896984
...@@ -252,6 +252,10 @@ mount_partitions() { ...@@ -252,6 +252,10 @@ mount_partitions() {
[ -z $SLOT ] || ui_print "- Current boot slot: $SLOT" [ -z $SLOT ] || ui_print "- Current boot slot: $SLOT"
# Mount ro partitions # 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 mount_ro_ensure "system$SLOT app$SLOT" /system
if [ -f /system/init -o -L /system/init ]; then if [ -f /system/init -o -L /system/init ]; then
SYSTEM_ROOT=true SYSTEM_ROOT=true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment