Add dtbo.img patch support

This commit is contained in:
topjohnwu
2017-11-11 01:33:50 +08:00
parent e9d0f615ba
commit 912c188b53
5 changed files with 88 additions and 37 deletions

View File

@@ -115,14 +115,21 @@ cd $MAGISKBIN
# Source the boot patcher
. $COMMONDIR/boot_patch.sh "$BOOTIMAGE"
if [ -f stock_boot* ]; then
rm -f /data/stock_boot* 2>/dev/null
mv stock_boot* /data
fi
flash_boot_image new-boot.img "$BOOTIMAGE"
rm -f new-boot.img
if [ -f stock_boot* ]; then
rm -f /data/stock_boot* 2>/dev/null
is_mounted /data && mv stock_boot* /data
fi
patch_dtbo_image
if [ -f stock_dtbo* ]; then
rm -f /data/stock_dtbo* 2>/dev/null
is_mounted /data && mv stock_dtbo* /data
fi
cd /
# Cleanups
$BOOTMODE || recovery_cleanup