Home Forum Blog Private Support Courses
Our courses are now on YouTube! Start Watching
Hovatek Forum OPERATING SYSTEMS Android [Tutorial] How to verify the contents of a vbmeta image

[Tutorial] How to verify the contents of a vbmeta image

[Tutorial] How to verify the contents of a vbmeta image

Pages (5): 1 2 3 4 5 Next
hovatek
hovatek
hovatek
Administrator
50,891
12-03-2020, 11:05 PM
#1



This is a step by step guide showing how to verify the contents of a vbmeta image. This will come handy if you need certain information from your original vbmeta such as partition names, algorithm e.t.c.

Requirements



Steps on how to verify the contents of a vbmeta image


Follow the steps below to verify the contents of a vbmeta image

  1. Copy your vbmeta.img and the avbtool.py into the same folder location

    [Image: how-to-verify-the-contents-of-a-vbmeta-image-1.jpg]

  2. If you're using a windows PC, right click on any empty space in the folder then click Open CMD or Powershell window here

    [Image: how-to-verify-the-contents-of-a-vbmeta-image-2.jpg]

  3. When the command window opens, type and input the command below then press Enter key
    Code:

    python avbtool.py info_image --image vbmeta-sign.img

    [Image: how-to-verify-the-contents-of-a-vbmeta-image-3.jpg]

  4. The info contained within the vbmeta image will be displayed. This includes useful information such as algorithm, partition names, partition roll back index location, public key hashes

    [Image: how-to-verify-the-contents-of-a-vbmeta-image-4.jpg]


Here's a sample of the content of the vbmeta image used in this guide


Note that the same contents has been confirmed on 3 different SPD / Unisoc phones, all from different non-related OEMs. Therefore, the chances are that your device will have the same vbmeta contents


Code:

Minimum libavb version:  1.0 Header Block:            256 bytes Authentication Block:    576 bytes Auxiliary Block:          13504 bytes Algorithm:                SHA256_RSA4096 Rollback Index:          0 Flags:                    0 Release String:          'avbtool 1.1.0' Descriptors:     Chain Partition descriptor:       Partition Name:          boot       Rollback Index Location: 1       Public key (sha1):      ea410c1b46cdb2e40e526880ff383f083bd615d5     Chain Partition descriptor:       Partition Name:          system       Rollback Index Location: 3       Public key (sha1):      e2c66ff8a1d787d7bf898711187bff150f691d27     Chain Partition descriptor:       Partition Name:          vendor       Rollback Index Location: 4       Public key (sha1):      9885bf5bf909e5208dfd42abaf51ad9b104ee117     Chain Partition descriptor:       Partition Name:          product       Rollback Index Location: 10       Public key (sha1):      766a95798206f6e980e42414e3cb658617c27daf     Chain Partition descriptor:       Partition Name:          dtbo       Rollback Index Location: 9       Public key (sha1):      ea410c1b46cdb2e40e526880ff383f083bd615d5     Chain Partition descriptor:       Partition Name:          recovery       Rollback Index Location: 2       Public key (sha1):      d9093b9a181bdb5731b44d60a9f850dc724e2874     Chain Partition descriptor:       Partition Name:          l_modem       Rollback Index Location: 5       Public key (sha1):      e93e7d91ba1a46b81a5f15129b4dc5769bf41f26     Chain Partition descriptor:       Partition Name:          l_ldsp       Rollback Index Location: 6       Public key (sha1):      e93e7d91ba1a46b81a5f15129b4dc5769bf41f26     Chain Partition descriptor:       Partition Name:          l_gdsp       Rollback Index Location: 7       Public key (sha1):      e93e7d91ba1a46b81a5f15129b4dc5769bf41f26     Chain Partition descriptor:       Partition Name:          pm_sys       Rollback Index Location: 8       Public key (sha1):      e93e7d91ba1a46b81a5f15129b4dc5769bf41f26     Chain Partition descriptor:       Partition Name:          dtb       Rollback Index Location: 11       Public key (sha1):      ea410c1b46cdb2e40e526880ff383f083bd615d5


Important Notice
  • If you encounter the error "avbtool.py: Given image does not look like a vbmeta image" then see this guide
  • If you encounter any errors while trying to use avbtool.py on windows, then install and add openssl into PATH if the problem persists then you might want to consider using a linux OS instead. See this guide for how to live boot a linux OS on a windows PC
  • If you verified the contents of your vbmeta and it matches with the contents of the one we used for this guide, and you intend to extract public keys from your vbmeta, then you can simply download the public keys @ https://mega.nz/#!uCwHyAYA!FLiwcSaSLpAl6...Gtgpe28kEA . It'll be the same as what you'll get if you manually extract the public keys yourself
  • Credits goes to Petercxy
This post was last modified: 07-09-2024, 07:17 PM by hovatek.

Learn MediaTek, Unisoc / Spreadtrum (SPD) and Qualcomm Software Repairs @ https://www.hovatek.com/training
Note!
We have a reply schedule for Forum Support. Please try Private Support if you can't wait.
kvas
kvas
kvas
Newbie
1
10-06-2020, 07:51 AM
#2
Yours "avbtool.py" not working, not on windows not on linux
update it https://android.googlesource.com/platfor...avbtool.py
hovatek
hovatek
hovatek
Administrator
50,891
10-06-2020, 12:08 PM
#3
(10-06-2020, 07:51 AM)kvas Yours "avbtool.py" not working, not on windows not on linux
update it https://android.googlesource.com/platfor...avbtool.py

the guide was written using the same avbtool and you can clearly see the screenshots indicates i used powershell in windows / linux for other guides and others have successfully used it as well, so you might want to be specific when you say does not work

Learn MediaTek, Unisoc / Spreadtrum (SPD) and Qualcomm Software Repairs @ https://www.hovatek.com/training
Note!
We have a reply schedule for Forum Support. Please try Private Support if you can't wait.
Mufor
Mufor
Mufor
Enthusiastic Member
9
10-06-2020, 05:38 PM
#4
I can't verify the contents of a vbmeta image
I got this message ''Given image does not look like a vbmeta image" (same on Windows)
1- I have use a vbmeta-sign.img extracted from a pac file of my moder (and is sp7731e)
2- I've already extract public signing keys form a vbmeta image file from my firmware

[Image: Anotaci-n-2020-06-10-163547.png]
hovatek
hovatek
hovatek
Administrator
50,891
11-06-2020, 06:51 AM
#5

Mediatek Course Mediatek Course


(10-06-2020, 05:38 PM)Mufor I can't verify the contents of a vbmeta image
I got this message ''Given image does not look like a vbmeta image" (same on Windows)
1- I have use a vbmeta-sign.img extracted from a pac file of my moder (and is sp7731e)
2- I've already extract public signing keys form a vbmeta image file from my firmware

Please create a new thread for this by clicking Ask Question at the top

Learn MediaTek, Unisoc / Spreadtrum (SPD) and Qualcomm Software Repairs @ https://www.hovatek.com/training
Note!
We have a reply schedule for Forum Support. Please try Private Support if you can't wait.
hovatek
hovatek
hovatek
Administrator
50,891
11-06-2020, 10:51 AM
#6
(10-06-2020, 05:38 PM)Mufor ...

the DHTB sign is at the header section of your vbmeta image, you need to remove this before using the info_image command

open the vbmeta using hxd hex editor
scroll down a bit till you find AVB0 (you could also use the search function to search for this)
highlight and remove everything above AVB0 then save the file and re-analyze using avbtool

PS: if you still have problems then create a new thread for the device issue
This post was last modified: 11-06-2020, 10:54 AM by X3non.

Learn MediaTek, Unisoc / Spreadtrum (SPD) and Qualcomm Software Repairs @ https://www.hovatek.com/training
Note!
We have a reply schedule for Forum Support. Please try Private Support if you can't wait.
zav31254
zav31254
zav31254
Newbie
4
11-07-2020, 05:44 PM
#7
Привет! Возникла проблема. Не могу посмотреть содержимое vbmeta-sign.img для doogee n10. Ошибка в строке 411 avbtool .Прошу помощи.
This post was last modified: 11-07-2020, 05:53 PM by zav31254.
Attached Files
.img
vbmeta-sign.img
Size: 1 MB / Downloads: 157
hovatek
hovatek
hovatek
Administrator
50,891
11-07-2020, 10:24 PM
#8
(11-07-2020, 05:44 PM)zav31254 Привет! Возникла проблема. Не могу посмотреть содержимое vbmeta-sign.img для doogee n10. Ошибка в строке 411 avbtool .Прошу помощи.

post in English language so we can understand you, you can translate using google translate

Learn MediaTek, Unisoc / Spreadtrum (SPD) and Qualcomm Software Repairs @ https://www.hovatek.com/training
Note!
We have a reply schedule for Forum Support. Please try Private Support if you can't wait.
zav31254
zav31254
zav31254
Newbie
4
11-07-2020, 11:02 PM
#9
Hello! There is a problem. I can not see the contents of vbmeta-sign.img for doogee n10. In Windows 7, I get an error: File "avbtool", line 411
    b = 2L ** 32
Syntax error: invalid syntax.
In Umbuntu , I get an error:avbtool: Given image does not look like a vbmeta image.
 I ask for help.
This post was last modified: 12-07-2020, 09:27 PM by zav31254.
Attached Files
.img
vbmeta-sign.img
Size: 1 MB / Downloads: 138
hovatek
hovatek
hovatek
Administrator
50,891
13-07-2020, 09:08 AM
#10
(11-07-2020, 11:02 PM)zav31254 Hello! There is a problem. I can not see the contents of vbmeta-sign.img for doogee n10. In Windows 7, I get an error: File "avbtool", line 411
    b = 2L ** 32
Syntax error: invalid syntax.
In Umbuntu , I get an error:avbtool: Given image does not look like a vbmeta image.
 I ask for help.

on my PC, your vbmeta outputs just fine
you can try in windows, installing openssl and manually add it to PATH
if you still encounter errors, then attach a screenshot showing the command window and your input(s)

Learn MediaTek, Unisoc / Spreadtrum (SPD) and Qualcomm Software Repairs @ https://www.hovatek.com/training
Note!
We have a reply schedule for Forum Support. Please try Private Support if you can't wait.
Pages (5): 1 2 3 4 5 Next
Users browsing this thread:
 1 Guest(s)
Users browsing this thread:
 1 Guest(s)
WhTlYt