From d85ef902759ab0c40a150d245655932df6b9603c Mon Sep 17 00:00:00 2001 From: RikkaW Date: Fri, 21 May 2021 18:42:05 +0800 Subject: [PATCH] Refuse to install if Riru is disabled or will be removed --- core/magisk_module/riru.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/magisk_module/riru.sh b/core/magisk_module/riru.sh index ece9f1c6..c5d3c52e 100644 --- a/core/magisk_module/riru.sh +++ b/core/magisk_module/riru.sh @@ -58,6 +58,13 @@ if [ ! -d $MAGISK_CURRENT_RIRU_MODULE_PATH ]; then abort "*********************************************************" fi +if [ -f "$MAGISK_CURRENT_RIRU_MODULE_PATH/disable" ] || [ -f "$MAGISK_CURRENT_RIRU_MODULE_PATH/remove" ]; then + ui_print "*********************************************************" + ui_print "! Riru is not enabled or will be removed" + ui_print "! Please enable Riru in Magisk first" + abort "*********************************************************" +fi + if [ -f $MAGISK_CURRENT_RIRU_MODULE_PATH/util_functions.sh ]; then ui_print "- Load $MAGISK_CURRENT_RIRU_MODULE_PATH/util_functions.sh" # shellcheck disable=SC1090