Commit 3f87f6ae authored by topjohnwu's avatar topjohnwu

Fix output in Magisk Manager if no root exists

parent 04bcd145
...@@ -50,7 +50,7 @@ public class RootUtils extends Shell.Initializer { ...@@ -50,7 +50,7 @@ public class RootUtils extends Shell.Initializer {
job.add(nonroot); job.add(nonroot);
} }
job.add("mount_partitions", "get_flags", "run_migrations").exec(); job.add("mount_partitions", "get_flags", "run_migrations", "export BOOTMODE=true").exec();
Data.keepVerity = Boolean.parseBoolean(ShellUtils.fastCmd("echo $KEEPVERITY")); Data.keepVerity = Boolean.parseBoolean(ShellUtils.fastCmd("echo $KEEPVERITY"));
Data.keepEnc = Boolean.parseBoolean(ShellUtils.fastCmd("echo $KEEPFORCEENCRYPT")); Data.keepEnc = Boolean.parseBoolean(ShellUtils.fastCmd("echo $KEEPFORCEENCRYPT"));
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
#MAGISK_VERSION_STUB #MAGISK_VERSION_STUB
# Detect whether in boot mode # Detect whether in boot mode
ps | grep zygote | grep -qv grep && BOOTMODE=true || BOOTMODE=false [ -z $BOOTMODE ] && BOOTMODE=false
$BOOTMODE || ps | grep zygote | grep -qv grep && BOOTMODE=true
$BOOTMODE || ps -A | grep zygote | grep -qv grep && BOOTMODE=true $BOOTMODE || ps -A | grep zygote | grep -qv grep && BOOTMODE=true
# Presets # Presets
......
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