Skip to content

Instantly share code, notes, and snippets.

@Systemad
Last active January 31, 2024 10:59
Show Gist options
  • Save Systemad/bc665b384a6bcfe3efef7e48e1ebd80d to your computer and use it in GitHub Desktop.
Save Systemad/bc665b384a6bcfe3efef7e48e1ebd80d to your computer and use it in GitHub Desktop.
Remove dm-verity from boot image
Credit: thohac@xda
I took the tools/arm/magiskboot from that git and did it manually.
Here are my steps.
put magiskboot in /data/local/bin
chmod +x /data/local/bin/magiskboot.
put unpacked boot.img on the device and patch with magisk. rename back to boot.img
mkdir unpacked; cd unpacked #make a working dir and switch to it
magiskboot unpack ../boot.img #unpack the image
magiskboot dtb dtb patch #use magiskboot to patch dtb
magiskboot --cpio ramdisk.cpio 'extract fstab.qcom fstab.qcom' #unpack fstab.qcom from ramdisk
edit fstab.qcom and remove avb entries #I hope someone in this forum has the regex skill to come up with a sed for this
magiskboot cpio ramdisk.cpio 'add 0440 fstab.qcom fstab.qcom' #replace the one on the ramdisk
magiskboot repack ../boot.img new-boot.img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment