2
0
mirror of https://github.com/topjohnwu/Magisk synced 2025-08-31 03:55:11 +00:00

Add boot actions

This commit is contained in:
topjohnwu
2017-08-12 16:44:58 +08:00
parent 29895ff474
commit 750872cc37
3 changed files with 17 additions and 5 deletions

View File

@@ -83,6 +83,12 @@ ui_print "- Constructing environment"
is_mounted /data && MAGISKBIN=/data/magisk || MAGISKBIN=/cache/data_bin
if $BOOTMODE; then
# Cleanup binary mirrors
umount -l /dev/magisk/mirror/bin 2>/dev/null
rm -rf /dev/magisk/mirror/bin 2>/dev/null
fi
# Copy required files
rm -rf $MAGISKBIN 2>/dev/null
mkdir -p $MAGISKBIN
@@ -103,10 +109,7 @@ fi
# Magisk Image
##########################################################################################
$BOOTMODE || recovery_actions
# Fix SuperSU.....
$BOOTMODE && $MAGISKBIN/magisk magiskpolicy --live "allow fsck * * *"
$BOOTMODE && boot_actions || recovery_actions
if (is_mounted /data); then
IMG=/data/magisk.img