diff --git a/jni/resetprop b/jni/resetprop index 6b77de934..96949566f 160000 --- a/jni/resetprop +++ b/jni/resetprop @@ -1 +1 @@ -Subproject commit 6b77de934dd13f77f3e1f8345d77a520d2e9b491 +Subproject commit 96949566fb99b2b74b9bb80398ea45ee90ceb592 diff --git a/scripts/magic_mask.sh b/scripts/magic_mask.sh index 36c9d3d93..c649b2fb9 100644 --- a/scripts/magic_mask.sh +++ b/scripts/magic_mask.sh @@ -203,6 +203,7 @@ merge_image() { done $TOOLPATH/cp -afc .core/. /cache/data_img/.core 2>/dev/null log_print "Merge complete" + cd / fi umount /cache/data_img @@ -232,11 +233,22 @@ case $1 in # No more cache mods! # Only for multirom! - # log_print "** Magisk post-fs mode running..." - + log_print "** Magisk post-fs mode running..." + # Cleanup previous stuffs... rm -rf /cache/magisk /cache/magisk_merge /cache/magiskhide.log + if [ -d "/cache/magisk_bootanim" ]; then + log_print "Mounting custom Boot Animation" + find /cache/magisk_bootanim -type f 2>/dev/null | while read ITEM ; do + chmod 644 "$ITEM" + chcon "u:object_r:system_file:s0" "$ITEM" + TARGET="${ITEM#/cache/magisk_bootanim}" + bind_mount "$ITEM" "$TARGET" + done + fi + + unblock ;; @@ -379,9 +391,20 @@ case $1 in run_scripts post-fs-data # Bind hosts for Adblock apps - [ ! -f "$COREDIR/hosts" ] && $TOOLPATH/cp -afc /system/etc/hosts $COREDIR/hosts - log_print "Enabling systemless hosts file support" - bind_mount $COREDIR/hosts /system/etc/hosts + if [ -f "$COREDIR/hosts" ]; then + log_print "Enabling systemless hosts file support" + bind_mount $COREDIR/hosts /system/etc/hosts + fi + + # Expose busybox + if [ -f "$COREDIR/busybox/enable" ]; then + log_print "Enabling BusyBox" + $TOOLPATH/cp -afc /data/busybox/. $COREDIR/busybox + $TOOLPATH/cp -afc /system/xbin/. $COREDIR/busybox + chmod 755 $COREDIR/busybox + chcon "u:object_r:system_file:s0" $COREDIR/busybox + bind_mount $COREDIR/busybox /system/xbin + fi # Stage 3 log_print "Bind mount system mirror" @@ -412,7 +435,7 @@ case $1 in log_print "** Magisk late_start service mode running..." run_scripts service - # Hide Safety Net + # Magisk Hide if [ -f "$COREDIR/magiskhide/enable" ]; then log_print "** Removing tampered read-only system props"