mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 20:15:29 +00:00
Properly handle KEEPVERITY and HIGHCOMP
This commit is contained in:
parent
baff9256c5
commit
942c870981
2
app
2
app
@ -1 +1 @@
|
||||
Subproject commit 96eaa833f561e645ba99f87ec9d376fc338b0861
|
||||
Subproject commit c461fc6daa7096398f9227a10bcb4cec271cb5e7
|
@ -88,7 +88,6 @@ case $? in
|
||||
;;
|
||||
2 )
|
||||
ui_print "! Insufficient boot partition size detected"
|
||||
ui_print "- Enable high compression mode"
|
||||
HIGHCOMP=true
|
||||
;;
|
||||
3 )
|
||||
@ -104,6 +103,13 @@ case $? in
|
||||
abort "! Stock kernel cannot be patched, please use a custom kernel"
|
||||
esac
|
||||
|
||||
if [ -f /sdcard/ramdisk-recovery.img ]; then
|
||||
HIGHCOMP=true
|
||||
ui_print "- Detected ramdisk-recovery.img"
|
||||
fi
|
||||
|
||||
$HIGHCOMP && ui_print "- Enable high compression mode"
|
||||
|
||||
##########################################################################################
|
||||
# Ramdisk restores
|
||||
##########################################################################################
|
||||
@ -139,8 +145,6 @@ esac
|
||||
|
||||
ui_print "- Patching ramdisk"
|
||||
|
||||
[ -f /sdcard/ramdisk-recovery.img ] && HIGHCOMP=true
|
||||
|
||||
./magiskboot --cpio-add ramdisk.cpio 750 init magiskinit
|
||||
./magiskboot --cpio-backup ramdisk.cpio ramdisk.cpio.orig $HIGHCOMP $KEEPVERITY $KEEPFORCEENCRYPT $SHA1
|
||||
|
||||
|
@ -123,7 +123,7 @@ if [ -f stock_boot* ]; then
|
||||
is_mounted /data && mv stock_boot* /data
|
||||
fi
|
||||
|
||||
patch_dtbo_image
|
||||
$KEEPVERITY || patch_dtbo_image
|
||||
|
||||
if [ -f stock_dtbo* ]; then
|
||||
rm -f /data/stock_dtbo* 2>/dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user