[Tutorial] How to create a custom signed vbmeta.img for Unisoc using AVBtool
[Tutorial] How to create a custom signed vbmeta.img for Unisoc using AVBtool
(08-08-2025, 12:00 PM)chklotzba ..
Compared it with the original vbmeta and - because of differences - copied the DHTP section from the orignal to the custom.
..
import hashlib
import sys
f = open("vbmeta-sign-custom.img", "rb")
b = f.read()
sha = hashlib.sha256(b).digest()
f.close()
f = open("vbmeta-sign-custom.img", "wb")
f.write(b)
f.seek(1048576 - 512)
f.write(b'\x44\x48\x54\x42\x01\x00\x00\x00')
f.write(sha)
f.write(b'\xCC\xCC\xCC\xCC\xAA\xAA\xAA\xAA\x00\x40\x00\x00')
f.seek(0xffe3d)
f.write(b'\x40')
f.seek(0xffe40)
f.write(b'\x60\x42')
f.seek(1048576 - 1)
f.write(b'\x00')
f.close()(09-08-2025, 12:36 PM)chklotzba Sorry for my mistake, I created again with Flag 0 and wait :-)
(10-08-2025, 01:17 PM)chklotzba Hello,
I did everything as told with the new vbmeta_pad.py
But the same fault was shown as I flashed the custom vbmeta and (for testing) the original vbmeta:
..