mirror of
https://gitlab.com/Nanolx/NanoDroid
synced 2024-11-02 03:40:13 +00:00
CommonInstaller: fix installation with Magisk 16.7 without reboot into System first time
This commit is contained in:
parent
f1dfcb2e9c
commit
77c4667d4b
@ -227,6 +227,19 @@ detect_mode () {
|
|||||||
0 | *)
|
0 | *)
|
||||||
if [ -f /data/adb/magisk/magisk ]; then
|
if [ -f /data/adb/magisk/magisk ]; then
|
||||||
MODE=MAGISK
|
MODE=MAGISK
|
||||||
|
MAGISKBIN=/data/adb/magisk
|
||||||
|
MODE_TEXT=" > Mode | Magisk | detected"
|
||||||
|
elif [ -f /data/.magisk/magisk ]; then
|
||||||
|
if [ ! -d /data/adb/ ]; then
|
||||||
|
mkdir -p /data/adb/
|
||||||
|
chown root:root /data/adb
|
||||||
|
chmod 0644 /data/adb
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -r /data/.magisk /data/adb/magisk
|
||||||
|
|
||||||
|
MODE=MAGISK
|
||||||
|
MAGISKBIN=/data/adb/magisk
|
||||||
MODE_TEXT=" > Mode | Magisk | detected"
|
MODE_TEXT=" > Mode | Magisk | detected"
|
||||||
elif ! ${BOOTMODE}; then
|
elif ! ${BOOTMODE}; then
|
||||||
MODE=SYSTEM
|
MODE=SYSTEM
|
||||||
@ -401,10 +414,9 @@ magisk_install_setup () {
|
|||||||
ui_print " "
|
ui_print " "
|
||||||
ui_print " > setup Magisk environment"
|
ui_print " > setup Magisk environment"
|
||||||
|
|
||||||
MAGISKBIN=/data/adb/magisk
|
|
||||||
MOUNTPATH=${TMPDIR}/magisk_img
|
MOUNTPATH=${TMPDIR}/magisk_img
|
||||||
|
|
||||||
[ -d ${MAGISKBIN} -a -f ${MAGISKBIN}/magisk -a -f ${MAGISKBIN}/util_functions.sh ] || \
|
[ -f ${MAGISKBIN}/util_functions.sh ] || \
|
||||||
error " !! Magisk version 15.0 or newer is required"
|
error " !! Magisk version 15.0 or newer is required"
|
||||||
|
|
||||||
. ${MAGISKBIN}/util_functions.sh
|
. ${MAGISKBIN}/util_functions.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user