mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-28 04:25:27 +00:00
parent
b39f407596
commit
984997e73b
@ -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
|
||||
}
|
||||
|
@ -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 /
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user