mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-21 23:00:46 -08:00
Always check mounts to detect legacy SAR on bootmode
This commit is contained in:
@@ -335,17 +335,21 @@ get_flags() {
|
|||||||
PATCHVBMETAFLAG=true
|
PATCHVBMETAFLAG=true
|
||||||
ui_print "- No vbmeta partition, patch vbmeta in boot image"
|
ui_print "- No vbmeta partition, patch vbmeta in boot image"
|
||||||
fi
|
fi
|
||||||
local IS_DYNAMIC=false
|
LEGACYSAR=false
|
||||||
if grep -q 'androidboot.super_partition' /proc/cmdline; then
|
if $BOOTMODE; then
|
||||||
IS_DYNAMIC=true
|
grep ' / ' /proc/mounts | grep -q '/dev/root' && LEGACYSAR=true
|
||||||
elif [ -n "$(find_block super)" ]; then
|
|
||||||
IS_DYNAMIC=true
|
|
||||||
fi
|
|
||||||
if $SYSTEM_AS_ROOT && ! $IS_DYNAMIC; then
|
|
||||||
LEGACYSAR=true
|
|
||||||
ui_print "- Legacy SAR, force kernel to load rootfs"
|
|
||||||
else
|
else
|
||||||
LEGACYSAR=false
|
# Recovery mode, assume devices that don't use dynamic partitions are legacy SAR
|
||||||
|
local IS_DYNAMIC=false
|
||||||
|
if grep -q 'androidboot.super_partition' /proc/cmdline; then
|
||||||
|
IS_DYNAMIC=true
|
||||||
|
elif [ -n "$(find_block super)" ]; then
|
||||||
|
IS_DYNAMIC=true
|
||||||
|
fi
|
||||||
|
if $SYSTEM_AS_ROOT && ! $IS_DYNAMIC; then
|
||||||
|
LEGACYSAR=true
|
||||||
|
ui_print "- Legacy SAR, force kernel to load rootfs"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Overridable config flags with safe defaults
|
# Overridable config flags with safe defaults
|
||||||
|
|||||||
Reference in New Issue
Block a user