From 16b400964b4051cf3c489473e65a420bb63e0cfc Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 22 Sep 2019 06:45:23 -0400 Subject: [PATCH] Update vars for 2SI --- native/jni/magiskboot/dtb.cpp | 2 +- native/jni/magiskboot/main.cpp | 1 + scripts/boot_patch.sh | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/native/jni/magiskboot/dtb.cpp b/native/jni/magiskboot/dtb.cpp index 3025810d2..5755c9862 100644 --- a/native/jni/magiskboot/dtb.cpp +++ b/native/jni/magiskboot/dtb.cpp @@ -125,7 +125,7 @@ static void dtb_print(const char *file, bool fstab) { static void dtb_patch(const char *in, const char *out) { bool keepverity = check_env("KEEPVERITY"); - bool redirect = check_env("REDIRSYSMNT"); + bool redirect = check_env("TWOSTAGEINIT"); vector fdt_list; size_t dtb_sz ; diff --git a/native/jni/magiskboot/main.cpp b/native/jni/magiskboot/main.cpp index 645c446fb..e848f2442 100644 --- a/native/jni/magiskboot/main.cpp +++ b/native/jni/magiskboot/main.cpp @@ -80,6 +80,7 @@ Supported actions: patch [OUT] Search for fstab and remove verity/avb If [OUT] is not specified, it will directly output to + Configure with env variables: KEEPVERITY TWOSTAGEINIT compress[=method] [outfile] Compress with [method] (default: gzip), optionally to [outfile] diff --git a/scripts/boot_patch.sh b/scripts/boot_patch.sh index 2d00c2934..148e22aca 100644 --- a/scripts/boot_patch.sh +++ b/scripts/boot_patch.sh @@ -124,8 +124,8 @@ case $((STATUS & 3)) in esac if [ $((STATUS & 8)) -ne 0 ]; then - ui_print "- 2 Stage Init ramdisk detected" - export REDIRSYSMNT=true + # Possibly using 2SI, export env var + export TWOSTAGEINIT=true fi ##########################################################################################