2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-10-31 09:20:23 +00:00

CommonInstaller, nandoroid-overlay:

- fix /system mode installation
- allow installation directly after Magisk without reboot
This commit is contained in:
Christopher Roy Bratusek 2020-10-17 23:02:23 +02:00
parent 8e37704061
commit 88ac502aba
2 changed files with 15 additions and 9 deletions

View File

@ -254,6 +254,7 @@ mount_partitions () {
rm -rf /system_root
mkdir -p /system_root
fi
is_mounted /system_root && mount -o rw,remount /system_root
! is_mounted /system_root && mount -o rw /system_root
! is_mounted /system_root && mount -o rw ${SYSTEM_BLOCK} /system_root
mount -o bind /system_root/system /system
@ -751,9 +752,13 @@ detect_mode () {
0 | *)
MODE_DETECT=detected
MODE=SYSTEM
MAGISK_VER_CODE=0
if [ -f /data/adb/magisk/util_functions.sh ]; then
. /data/adb/magisk/util_functions.sh
elif [ -f /data/magisk/util_functions.sh ]; then
. /data/magisk/util_functions.sh
fi
if [ ${MAGISK_VER_CODE} -ge 19000 ]; then
MODE=MAGISK
@ -764,7 +769,6 @@ detect_mode () {
print_info " "
MODE=SYSTEM
fi
fi
;;
esac

View File

@ -3,6 +3,8 @@
export MODID=@MODID@
export MODE=@MODE@
[ -f /dev/tmp/install/CommonInstaller ] && MODE=INSTALL
error () {
echo "!! ${@}"
exit 1