parent
b39f407596
commit
984997e73b
@ -6,7 +6,7 @@ import java.io.File
|
|||||||
object Const {
|
object Const {
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
const val MAGISK_PATH = "/sbin/.magisk/img"
|
const val MAGISK_PATH = "/sbin/.magisk/modules"
|
||||||
var MAGISK_DISABLE_FILE = File("xxx")
|
var MAGISK_DISABLE_FILE = File("xxx")
|
||||||
const val TMP_FOLDER_PATH = "/dev/tmp"
|
const val TMP_FOLDER_PATH = "/dev/tmp"
|
||||||
const val MAGISK_LOG = "/cache/magisk.log"
|
const val MAGISK_LOG = "/cache/magisk.log"
|
||||||
@ -23,8 +23,8 @@ object Const {
|
|||||||
val USER_ID = Process.myUid() / 100000
|
val USER_ID = Process.myUid() / 100000
|
||||||
|
|
||||||
object Version {
|
object Version {
|
||||||
const val MIN_VERSION = "v18.0"
|
const val MIN_VERSION = "v19.0"
|
||||||
const val MIN_VERCODE = 18000
|
const val MIN_VERCODE = 19000
|
||||||
const val CONNECT_MODE = 20100
|
const val CONNECT_MODE = 20100
|
||||||
const val PROVIDER_CONNECT = 20102
|
const val PROVIDER_CONNECT = 20102
|
||||||
}
|
}
|
||||||
|
@ -89,8 +89,8 @@ EOF
|
|||||||
|
|
||||||
add_hosts_module() {
|
add_hosts_module() {
|
||||||
# Do not touch existing hosts module
|
# Do not touch existing hosts module
|
||||||
[ -d /sbin/.magisk/img/hosts ] && return
|
[ -d /sbin/.magisk/modules/hosts ] && return
|
||||||
cd /sbin/.magisk/img
|
cd /sbin/.magisk/modules
|
||||||
mkdir -p hosts/system/etc
|
mkdir -p hosts/system/etc
|
||||||
cat << EOF > hosts/module.prop
|
cat << EOF > hosts/module.prop
|
||||||
id=hosts
|
id=hosts
|
||||||
@ -99,17 +99,10 @@ version=1.0
|
|||||||
versionCode=1
|
versionCode=1
|
||||||
author=Magisk Manager
|
author=Magisk Manager
|
||||||
description=Magisk Manager built-in systemless hosts module
|
description=Magisk Manager built-in systemless hosts module
|
||||||
minMagisk=17000
|
|
||||||
EOF
|
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
|
cp -f /system/etc/hosts hosts/system/etc/hosts
|
||||||
fi
|
|
||||||
magisk --clone-attr /system/etc/hosts hosts/system/etc/hosts
|
magisk --clone-attr /system/etc/hosts hosts/system/etc/hosts
|
||||||
touch hosts/update
|
touch hosts/update
|
||||||
touch hosts/auto_mount
|
|
||||||
cd /
|
cd /
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user