From 298cb73638ceddd70c2862f1dd13550f3531b9e4 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Mon, 24 Aug 2020 18:41:28 +0200 Subject: [PATCH] CommonInstaller: Magisk Mode - always use MAGSIKBASE/modules_update on upgrade and MAGISKBASE/modules on clean install --- CommonInstaller | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CommonInstaller b/CommonInstaller index b8e6144..2f87b82 100644 --- a/CommonInstaller +++ b/CommonInstaller @@ -436,8 +436,6 @@ detect_mode () { magisk_install_preinst ;; esac - - ${BOOTMODE} || rm -rf "${MODPATH}" ;; esac @@ -733,10 +731,6 @@ magisk_install_setup () { if [ ${MAGISK_VER_CODE} -gt 18100 ]; then MAGIKSBASE=/data/adb - ${BOOTMODE} && \ - MODPATH=${MAGIKSBASE}/modules_update/${MODID} || \ - MODPATH=${MAGIKSBASE}/modules/${MODID} - recovery_setup_env else error "Magisk version 19.0 or newer is required" @@ -777,6 +771,10 @@ magisk_install_setup () { esac [ -d ${MODPATH} -o -d ${OVERLAYPATH} ] && NANODROID_UPGRADE=1 + + [ "${NANODROID_UPGRADE}" -eq 1 ] && \ + MODPATH=${MAGIKSBASE}/modules_update/${MODID} || \ + MODPATH=${MAGIKSBASE}/modules/${MODID} } magisk_install_preinst () {