From 0f910f2d40698e74d91a9b69788c4d6828b6feb3 Mon Sep 17 00:00:00 2001 From: osm0sis Date: Mon, 20 Apr 2020 01:20:19 -0300 Subject: [PATCH] scripts: ensure system is able to be mounted rw before attempting - this is needed for installations on Lineage 17.1 Recovery (AOSP Q) for logical partition devices, which uses /dev/block/mapper to stage the partitions Thanks LuK1337 & erfanoabdi @ Lineage --- scripts/flash_script.sh | 1 + scripts/util_functions.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/flash_script.sh b/scripts/flash_script.sh index f1648cbb7..1f00fe705 100644 --- a/scripts/flash_script.sh +++ b/scripts/flash_script.sh @@ -78,6 +78,7 @@ chmod -R 755 $MAGISKBIN # addon.d if [ -d /system/addon.d ]; then ui_print "- Adding addon.d survival script" + blockdev --setrw /dev/block/mapper/system$SLOT 2>/dev/null mount -o rw,remount /system ADDOND=/system/addon.d/99-magisk.sh cp -af $COMMONDIR/addon.d.sh $ADDOND diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index 0b001c8e2..b12b6776e 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -483,6 +483,7 @@ sign_chromeos() { remove_system_su() { if [ -f /system/bin/su -o -f /system/xbin/su ] && [ ! -f /su/bin/su ]; then ui_print "- Removing system installed root" + blockdev --setrw /dev/block/mapper/system$SLOT 2>/dev/null mount -o rw,remount /system # SuperSU if [ -e /system/bin/.ext/.su ]; then