diff --git a/core/src/main/java/com/topjohnwu/core/tasks/MagiskInstaller.java b/core/src/main/java/com/topjohnwu/core/tasks/MagiskInstaller.java index 60a7a7d21..6cf777c16 100644 --- a/core/src/main/java/com/topjohnwu/core/tasks/MagiskInstaller.java +++ b/core/src/main/java/com/topjohnwu/core/tasks/MagiskInstaller.java @@ -285,7 +285,7 @@ public abstract class MagiskInstaller { } protected boolean postOTA() { - SuFile bootctl = new SuFile(Const.MAGISK_PATH + "/.core/bootctl"); + SuFile bootctl = new SuFile("/data/adb/bootctl"); try (InputStream in = App.self.getResources().openRawResource(R.raw.bootctl); OutputStream out = new SuFileOutputStream(bootctl)) { ShellUtils.pump(in, out); diff --git a/core/src/main/res/raw/utils.sh b/core/src/main/res/raw/utils.sh index 8251208d1..81f6c36cb 100644 --- a/core/src/main/res/raw/utils.sh +++ b/core/src/main/res/raw/utils.sh @@ -66,7 +66,7 @@ post_ota() { ./bootctl hal-info || return [ `./bootctl get-current-slot` -eq 0 ] && SLOT_NUM=1 || SLOT_NUM=0 ./bootctl set-active-boot-slot $SLOT_NUM - echo '${0%/*}/../bootctl mark-boot-successful;rm -f ${0%/*}/../bootctl $0' > post-fs-data.d/post_ota.sh + echo "BCTRL=${1}/bootctl;\$BCTRL mark-boot-successful;rm -f \$BCTRL \$0" > post-fs-data.d/post_ota.sh chmod 755 post-fs-data.d/post_ota.sh cd / }