Update several scripts

- Update backup format as we might be patching multiple partitions
- Update uninstaller to remove files in persist (sepolicy.rule)
- Better handling for dtb/dtbo partition patching
This commit is contained in:
topjohnwu
2020-01-01 14:02:44 +08:00
parent 2db1e5cb74
commit 3049a81c3b
9 changed files with 129 additions and 101 deletions

View File

@ -53,7 +53,7 @@ ui_print "- Target image: $BOOTIMAGE"
# Detect version and architecture
api_level_arch_detect
[ $API -lt 17 ] && abort "! Magisk is only for Android 4.2 and above"
[ $API -lt 17 ] && abort "! Magisk only support Android 4.2 and above"
ui_print "- Device platform: $ARCH"
@ -108,9 +108,8 @@ $BOOTMODE || recovery_actions
# Boot/DTBO Patching
##########################################################################################
patch_boot_image
install_magisk
cd /
# Cleanups
$BOOTMODE || recovery_cleanup
rm -rf $TMPDIR