• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

What is "vbmeta.img" ?

Search This thread

Minh_Huy

New member
May 19, 2019
1
0
Có cùng câu hỏi

---------- Post added at 02:48 PM ---------- Previous post was at 02:44 PM ----------

I have the same question in
 

KaladinSB

Member
Apr 12, 2019
8
2
I have a question regarding vbmeta: I flashed it when I was installing a rom (let's say unofficial los). If I install another rom that doesn't ask me to flash vbmeta (let's say xiaomi.eu), will it flash another vbmeta? Is vbmeta included in xiaomi.eu's .zip?
 
Last edited:

Zipper369

New member
Aug 28, 2013
4
22
Google sent me here — it's the first result when searching "vbmeta.img". Looks like we've entered a recursive function here! Let's add an exit condition.

Further digging led me to the Android Verified Boot 2.0 Readme which by skimming through it answered most of my questions.

So to get this clear, my current understanding is that vbmeta is akin to SecureBoot on PC — it uses hashes for each stage of the boot process to ensure that the final operating environment hasn't been tampered with at any stage of the startup process. Now since vbmeta actually contains the hashes/keys for the boot, system, and vendor partitions, that does mean that every ROM build will need a unique vbmeta.img if we wanted AVB to verify successfully, right? Also, I still don't understand how a vbmeta.img can disable AVB... does it simply set the hashes to zeros? And if we wanted to disable AVB, then where would THAT vbmeta.img come from? I presume we would need an image that is specific for our device, or would a generic vbmeta.img work across multiple devices (maybe with the limitation of being for A-only or A/B devices)?

I've been away from the custom ROM scene for a long time, so I'm trying to catch up with all these new features (AVB, A/B partitions, SafetyNet, etc.). :eek:
 

flamedrops

Senior Member
Dec 9, 2014
601
191
Ortigas
AFAIK, you need to flash vbmeta.img if you are going from an Miui ROM to a custom ROM.
And there is only one version of it.

your right, vbmeta is responsible for checking initial boot to enter into boot or in recovery mode. thats why make sure you flash or restore system with its own vbmeta or you will end up bootloop or stock on fastboot mode.
 
  • Like
Reactions: rossarnie

Elmarigo

Senior Member
Jun 13, 2014
194
73
So is the vbmeta.img the same file for all phones?
Or is it vendor specific?
Or is it phone specific?
Thank you!
 

WoKoschekk

Senior Member
Feb 25, 2019
779
1
209
Cologne
Moto G9 Plus
So is the vbmeta.img the same file for all phones?
Or is it vendor specific?
Or is it phone specific?
Thank you!

As a part of a custom ROM or your firmware images it must be unique for your device model. It's like a boot.img for example.
A vbmeta.img contains checksums of the most important partitions to verify them.

A checksum is a small-sized datum derived from a block of digital data for the purpose of detecting errors that may have been introduced during its transmission or storage. By themselves, checksums are often used to verify data integrity but are not relied upon to verify data authenticity. (Wikipedia)


vbmeta=
verified boot metadata
 
Last edited:

Elmarigo

Senior Member
Jun 13, 2014
194
73
Thank you!
I know what a checksum is, but didn't know that the vbmeta image contained checksums - which arised more questions:
When every partition is checksummed against vbmeta, wouldn't the phone need a different vbmeta everytime, depeding on Magisk being installed, or TWRP, or both combined?
 

WoKoschekk

Senior Member
Feb 25, 2019
779
1
209
Cologne
Moto G9 Plus
Thank you!
I know what a checksum is, but didn't know that the vbmeta image contained checksums - which arised more questions:
When every partition is checksummed against vbmeta, wouldn't the phone need a different vbmeta everytime, depeding on Magisk being installed, or TWRP, or both combined?

1. Not every partition, only /system, /vendor and /boot in most cases. But this could vary depending on your manufacturer.
2. Magisk is a systemless root solution. Have a look at /sbin/.magisk and you will see, that /system and /vendor were mounted as mirrors with all modifications that are needed, e.g. Magisk modules.

Only TWRP does some changes on /system.
 
  • Like
Reactions: duttyend

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    Google sent me here — it's the first result when searching "vbmeta.img". Looks like we've entered a recursive function here! Let's add an exit condition.

    Further digging led me to the Android Verified Boot 2.0 Readme which by skimming through it answered most of my questions.

    So to get this clear, my current understanding is that vbmeta is akin to SecureBoot on PC — it uses hashes for each stage of the boot process to ensure that the final operating environment hasn't been tampered with at any stage of the startup process. Now since vbmeta actually contains the hashes/keys for the boot, system, and vendor partitions, that does mean that every ROM build will need a unique vbmeta.img if we wanted AVB to verify successfully, right? Also, I still don't understand how a vbmeta.img can disable AVB... does it simply set the hashes to zeros? And if we wanted to disable AVB, then where would THAT vbmeta.img come from? I presume we would need an image that is specific for our device, or would a generic vbmeta.img work across multiple devices (maybe with the limitation of being for A-only or A/B devices)?

    I've been away from the custom ROM scene for a long time, so I'm trying to catch up with all these new features (AVB, A/B partitions, SafetyNet, etc.). :eek:
    21
    Funny... I just did that and here I am.
    I would like to know what is vbmeta as well...

    Sent from my MI 9 using Tapatalk
    10
    After Android 8 they implemented Verified Boot. That's why you need vbmeta.img for some tasks (mostly to disable verified boot). In some cases, TWRP will not install if Verified Boot is on. Read more Here
    9

    This is the 2nd reply on google rofl, got any better ideas genius