2
0
mirror of https://github.com/topjohnwu/Magisk synced 2025-08-31 12:15:15 +00:00

Tone down our DTB patching

- Do not attempt to patch DTB anywhere outside of boot images as they
are no longer essential. This makes Magisk installation to only modify
strictly boot/recovery partitions again.
- The only required patch for DTB is to strip verity out of partitions
This commit is contained in:
topjohnwu
2020-05-05 01:22:40 -07:00
parent 02dc1172be
commit 85755e3022
7 changed files with 1 additions and 121 deletions

View File

@@ -420,27 +420,6 @@ flash_image() {
return 0
}
patch_dtb_partitions() {
local result=1
cd $MAGISKBIN
for name in dtb dtbo dtbs; do
local IMAGE=`find_block $name$SLOT`
if [ ! -z $IMAGE ]; then
ui_print "- $name image: $IMAGE"
if ./magiskboot dtb $IMAGE patch dt.patched; then
result=0
ui_print "- Backing up stock $name image"
cat $IMAGE > stock_${name}.img
ui_print "- Flashing patched $name"
cat dt.patched /dev/zero > $IMAGE
rm -f dt.patched
fi
fi
done
cd /
return $result
}
# Common installation script for flash_script.sh and addon.d.sh
install_magisk() {
cd $MAGISKBIN
@@ -478,7 +457,6 @@ install_magisk() {
./magiskboot cleanup
rm -f new-boot.img
patch_dtb_partitions
run_migrations
}