From 984997e73b18f9fc4067e1cde1b6bfc0e639c7e4 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sat, 11 Jan 2020 12:37:08 +0800 Subject: [PATCH] Update paths Close #2244 --- app/src/main/java/com/topjohnwu/magisk/Const.kt | 6 +++--- app/src/main/res/raw/utils.sh | 13 +++---------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/Const.kt b/app/src/main/java/com/topjohnwu/magisk/Const.kt index 4ae5299fc..912d87ccb 100644 --- a/app/src/main/java/com/topjohnwu/magisk/Const.kt +++ b/app/src/main/java/com/topjohnwu/magisk/Const.kt @@ -6,7 +6,7 @@ import java.io.File object Const { // Paths - const val MAGISK_PATH = "/sbin/.magisk/img" + const val MAGISK_PATH = "/sbin/.magisk/modules" var MAGISK_DISABLE_FILE = File("xxx") const val TMP_FOLDER_PATH = "/dev/tmp" const val MAGISK_LOG = "/cache/magisk.log" @@ -23,8 +23,8 @@ object Const { val USER_ID = Process.myUid() / 100000 object Version { - const val MIN_VERSION = "v18.0" - const val MIN_VERCODE = 18000 + const val MIN_VERSION = "v19.0" + const val MIN_VERCODE = 19000 const val CONNECT_MODE = 20100 const val PROVIDER_CONNECT = 20102 } diff --git a/app/src/main/res/raw/utils.sh b/app/src/main/res/raw/utils.sh index 6bbeb7b35..0b3f9e87a 100644 --- a/app/src/main/res/raw/utils.sh +++ b/app/src/main/res/raw/utils.sh @@ -89,8 +89,8 @@ EOF add_hosts_module() { # Do not touch existing hosts module - [ -d /sbin/.magisk/img/hosts ] && return - cd /sbin/.magisk/img + [ -d /sbin/.magisk/modules/hosts ] && return + cd /sbin/.magisk/modules mkdir -p hosts/system/etc cat << EOF > hosts/module.prop id=hosts @@ -99,17 +99,10 @@ version=1.0 versionCode=1 author=Magisk Manager description=Magisk Manager built-in systemless hosts module -minMagisk=17000 EOF - if [ -f .core/hosts ]; then - # Migrate old hosts file to new module - mv -f .core/hosts hosts/system/etc/hosts - else - cp -f /system/etc/hosts hosts/system/etc/hosts - fi + cp -f /system/etc/hosts hosts/system/etc/hosts magisk --clone-attr /system/etc/hosts hosts/system/etc/hosts touch hosts/update - touch hosts/auto_mount cd / }