Official instructions don't say that you need to get vbmeta.img

Search This thread


Oct 12, 2015
HTC One (m7)
I followed the official instructions you can find here.
My device has a boot ramdisk so I grabbed the boot.img as requested by the instructions. I also checked if it has a separate vbmeta partition and it does.
I followed all steps in section "Patching Images", but when I get to the line saying
  • (Optional) If your device has a separate vbmeta partition, you can patch the vbmeta partition with command:
    fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
I don't know from where I was supposed to get vbmeta.img. The instructions never mentioned getting vbmeta.img. Maybe it doesn't matter because the step is optional, and it says "you can patch the vbmeta partition", not "you should" or "you must".

When extracting boot.img from my phone's firmware I also got vbmeta.img, but I don't know if I should flash it as it is, or if I should have Magisk patch it first. Anyway I skipped that optional step and Magisk works, but it would be nice if the instructions were more clear.

I also don't know if the fact that Magisk works despite me skipping that step has anything to do with the fact that before installing Magisk I had dirty flashed LineageOS 19 over LineageOS 18.1, where I had already installed Magisk some months ago by flashing the apk from recovery. The reason I had to reinstall Magisk is that after the upgrade to LOS 19 apps with root permissions would complain about not having root permissions, and the Magisk app would say Magisk was not installed.
Last edited:


Recognized Contributor / Inactive Recognized Dev
fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img

The vbmeta.img that they are talking about is the original vbmeta that you copied.
Of course, you need to be rooted or using a ROM bootloader to copy that.
That's a bit of a Catch 22.

That command just alters byte 0x7b from 0x00 to 0x03.
That's the flags.

The minimal vbmeta.img is 256 bytes with the correct header and 0x03 at 0x7b
I just tried this:
C:\>fastboot erase vbmeta
C:\>fastboot flash vbmeta vbmeta_empty.img
C:\>fastboot reboot
This worked fine for me. No guarantees for you. You don't need to erase, I just wanted to make sure.

I believe that the vbmeta is normally verified in the init process in the boot image.
Since Magisk has a custom init it probably just ignores vbmeta.
If you went to flash a modified boot image that had a stock init this would make a difference.


  • vbmeta_empty.img
    256 bytes · Views: 68