mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-13 13:47:44 +02:00
Update dtb patch to not use in-place modification
This commit is contained in:
@ -158,7 +158,7 @@ rm -f ramdisk.cpio.orig config
|
||||
|
||||
if ! $KEEPVERITY; then
|
||||
for dt in dtb kernel_dtb extra recovery_dtbo; do
|
||||
[ -f $dt ] && ./magiskboot dtb-patch $dt && ui_print "- Removing dm(avb)-verity in $dt"
|
||||
[ -f $dt ] && ./magiskboot dtb $dt patch && ui_print "- Removing dm(avb)-verity in $dt"
|
||||
done
|
||||
fi
|
||||
|
||||
|
@ -280,11 +280,13 @@ patch_dtbo_image() {
|
||||
find_dtbo_image
|
||||
if [ ! -z $DTBOIMAGE ]; then
|
||||
ui_print "- DTBO image: $DTBOIMAGE"
|
||||
if $MAGISKBIN/magiskboot --dtb-test $DTBOIMAGE; then
|
||||
local PATCHED=$TMPDIR/dtbo
|
||||
if $MAGISKBIN/magiskboot dtb $DTBOIMAGE patch $PATCHED; then
|
||||
ui_print "- Backing up stock DTBO image"
|
||||
$MAGISKBIN/magiskboot --compress $DTBOIMAGE $MAGISKBIN/stock_dtbo.img.gz
|
||||
$MAGISKBIN/magiskboot compress $DTBOIMAGE $MAGISKBIN/stock_dtbo.img.gz
|
||||
ui_print "- Patching DTBO to remove avb-verity"
|
||||
$MAGISKBIN/magiskboot --dtb-patch $DTBOIMAGE
|
||||
cat $PATCHED /dev/zero > $DTBOIMAGE
|
||||
rm -f $PATCHED
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user