Commit 0f910f2d authored by osm0sis's avatar osm0sis Committed by John Wu

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
parent 15f15510
...@@ -78,6 +78,7 @@ chmod -R 755 $MAGISKBIN ...@@ -78,6 +78,7 @@ chmod -R 755 $MAGISKBIN
# addon.d # addon.d
if [ -d /system/addon.d ]; then if [ -d /system/addon.d ]; then
ui_print "- Adding addon.d survival script" ui_print "- Adding addon.d survival script"
blockdev --setrw /dev/block/mapper/system$SLOT 2>/dev/null
mount -o rw,remount /system mount -o rw,remount /system
ADDOND=/system/addon.d/99-magisk.sh ADDOND=/system/addon.d/99-magisk.sh
cp -af $COMMONDIR/addon.d.sh $ADDOND cp -af $COMMONDIR/addon.d.sh $ADDOND
......
...@@ -483,6 +483,7 @@ sign_chromeos() { ...@@ -483,6 +483,7 @@ sign_chromeos() {
remove_system_su() { remove_system_su() {
if [ -f /system/bin/su -o -f /system/xbin/su ] && [ ! -f /su/bin/su ]; then if [ -f /system/bin/su -o -f /system/xbin/su ] && [ ! -f /su/bin/su ]; then
ui_print "- Removing system installed root" ui_print "- Removing system installed root"
blockdev --setrw /dev/block/mapper/system$SLOT 2>/dev/null
mount -o rw,remount /system mount -o rw,remount /system
# SuperSU # SuperSU
if [ -e /system/bin/.ext/.su ]; then if [ -e /system/bin/.ext/.su ]; then
......
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