Home Forum Blog Private Support Courses Archive
Our courses are now on YouTube! Start Watching
Hovatek Forum OPERATING SYSTEMS Android [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

[Tutorial] How to create a custom signed vbmeta.img for Unisoc using AVBtool

Pages (18): Previous 1 … 3 4 5 6 7 … 18 Next
hovatek
hovatek
hovatek
Administrator
51,018
13-04-2021, 12:21 PM
#41



(12-04-2021, 02:06 PM)per Noman Using comand :python3 avbtool extract_public_key --key hovatek.pem --output keys/hovatek.bin
Give me this error

cd@cd:~/Desktop/avbtool$ python3 avbtool extract_public_key --key hovatek.pem --output keys/hovatek.bin
File "avbtool", line 411
b = 2L**32
^
SyntaxError: invalid syntax

Vat a'm I doing wrong?

(12-04-2021, 05:47 PM)norrmann035 How do I edit this code to fit my vbmeta.img ???

python avbtool make_vbmeta_image --key rsa4096_vbmeta.pem --algorithm SHA256_RSA4096 --flag 2 --chain_partition boot:1:keys/key_boot.bin --chain_partition system:3:keys/key_system.bin --chain_partition vendor:4:keys/key_vendor.bin --chain_partition product:10:keys/key_product.bin --chain_partition dtbo:9:keys/key_dtbo.bin --chain_partition recovery:2:keys/hovatek.bin --chain_partition l_modem:5:keys/key_l_modem.bin --chain_partition l_ldsp:6:keys/key_l_ldsp.bin --chain_partition l_gdsp:7:keys/key_l_gdsp.bin --chain_partition pm_sys:8:keys/key_pm_sys.bin --chain_partition dtb:11:keys/key_dtb.bin --padding_size 16384 --output vbmeta-sign-custom.img

Code:

My vbmeta.img: Minimum libavb version: 1.0 Header Block: 256 bytes Authentication Block: 320 bytes Auxiliary Block: 3264 bytes Public key (sha1): cdbb77177f731920bbe0a0f94f84d9038ae0617d Algorithm: SHA256_RSA2048 Rollback Index: 0 Flags: 0 Rollback Index Location: 0 Release String: 'avbtool 1.1.0' Descriptors: Chain Partition descriptor: Partition Name: recovery Rollback Index Location: 1 Public key (sha1): 0aa0987116fc792f36bc909b0a4d530413f02a54 Chain Partition descriptor: Partition Name: vbmeta_system Rollback Index Location: 2 Public key (sha1): fa41159a5d696abdef93176a07d0b0d001263f01 Chain Partition descriptor: Partition Name: vbmeta_vendor Rollback Index Location: 4 Public key (sha1): 9577bc6c0772975ecce93c4d8a178662c728dadf Chain Partition descriptor: Partition Name: boot Rollback Index Location: 3 Public key (sha1): 9d808b0995768d0677fccb1efcddb7cf9e153d99 Hash descriptor: Image Size: 49776 bytes Hash Algorithm: sha256 Partition Name: dtbo Salt: 836908ce5dc44be62c8cee40cff79fb14aef98065e181ab6f909dd7fd2f1e89e Digest: 9e4eb8d861f2c6b3d0a46c1d524470fbd18a4935b3bbcd72b945e2143c587da5 Flags: 0

Is this korrect? not working on the phone...

python avbtool make_vbmeta_image --key hovatek.pem --algorithm SHA256_RSA2048 --flag 2 --chain_partition recovery:1:keys/hovatek.bin --chain_partition system:2:keys/vbmeta_system_key.bin --output vbmeta-custom.img

Or is it:
python avbtool make_vbmeta_image --key rsa4096_vbmeta.pem --algorithm SHA256_RSA4096 --flag 2 --chain_partition recovery:1:keys/key_recovery.bin --chain_partition vbmeta_system:2:keys/key_vbmeta_system.bin --chain_partition vbmeta_vendor:4:keys/key_vbmeta_vendor.bin --chain_partition boot:3:keys/key_boot.bin --padding_size 16384 --output vbmeta-sign-custom.img

?????

stick to your thread @ https://www.hovatek.com/forum/thread-38651.html

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.
Cheikh Sarr
Cheikh Sarr
Cheikh Sarr
Enthusiastic Member
5
13-05-2021, 02:57 PM
#42
avb tool download links is broken
Cheikh Sarr
Cheikh Sarr
Cheikh Sarr
Enthusiastic Member
5
13-05-2021, 05:55 PM
#43
i generate public key with rsa_2048 but file is null 0kb same with the custom vbmeta
Cheikh Sarr
Cheikh Sarr
Cheikh Sarr
Enthusiastic Member
5
13-05-2021, 05:58 PM
#44
(13-05-2021, 02:57 PM)Cheikh Sarr avb tool download links is broken

Traceback (most recent call last):
File "C:\Users\user\Downloads\[Hovatek] avbtool(1)\avbtool", line 4234, in <module>
tool.run(sys.argv)
File "C:\Users\user\Downloads\[Hovatek] avbtool(1)\avbtool", line 4063, in run
args.func(args)
File "C:\Users\user\Downloads\[Hovatek] avbtool(1)\avbtool", line 4081, in extract_public_key
self.avb.extract_public_key(args.key, args.output)
File "C:\Users\user\Downloads\[Hovatek] avbtool(1)\avbtool", line 2756, in extract_public_key
output.write(RSAPublicKey(key_path).encode())
File "C:\Users\user\Downloads\[Hovatek] avbtool(1)\avbtool", line 305, in __init__
p = subprocess.Popen(args,
File "C:\Users\user\AppData\Local\Programs\Python\Python39-32\lib\subprocess.py", line 947, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\user\AppData\Local\Programs\Python\Python39-32\lib\subprocess.py", line 1416, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable
hd_scania
hd_scania
hd_scania
Junior Member
18
14-05-2021, 04:57 AM
#45

Mediatek Course Mediatek Course


But unfortunately, are there vbmeta_pad.py for Android 11+ based firmware? My current stock firmware is Android 11 based.
Code:

Minimum libavb version: 1.0 Header Block: 256 bytes Authentication Block: 576 bytes Auxiliary Block: 6784 bytes Public key (sha1): 4b08c0ac5e043a6ea153b5573f4e9a4a163586b7 Algorithm: SHA256_RSA4096 Rollback Index: 0 Flags: 0 Rollback Index Location: 0 Release String: 'avbtool 1.1.0' Descriptors: Chain Partition descriptor: Partition Name: recovery Rollback Index Location: 5 Public key (sha1): 4b08c0ac5e043a6ea153b5573f4e9a4a163586b7 Chain Partition descriptor: Partition Name: prism Rollback Index Location: 10 Public key (sha1): 4b08c0ac5e043a6ea153b5573f4e9a4a163586b7 Chain Partition descriptor: Partition Name: optics Rollback Index Location: 11 Public key (sha1): 4b08c0ac5e043a6ea153b5573f4e9a4a163586b7 Prop: com.android.build.boot.os_version -> '11' Prop: com.android.build.boot.security_patch -> '2021-05-01' Prop: com.android.build.system.os_version -> '11' Prop: com.android.build.system.security_patch -> '2021-05-01' Prop: com.android.build.vendor.os_version -> '11' Prop: com.android.build.vendor.security_patch -> '2021-05-01' Hash descriptor: Image Size: 14592528 bytes Hash Algorithm: sha256 Partition Name: boot Salt: 4ffb60369f22e58b651def4b1f542010e0f86893f606c6c56ac9e0541fb429c8 Digest: f281e0eccb48303ea69cbe3167a90ad60f0844fd326d36e1be5bed2db0967be5 Flags: 0 Hash descriptor: Image Size: 236032 bytes Hash Algorithm: sha256 Partition Name: bootloader Salt: f927e0e2d15bde3d9f8962d09e956f3241a0acf326b1b4a44a7956095177e9f7 Digest: 41f6dcc8fb70ca0db71064abde5393ecc5d73754a96632b7bc771d537e31ea48 Flags: 0 Hash descriptor: Image Size: 1261488 bytes Hash Algorithm: sha256 Partition Name: lk Salt: 0a902aeb436b1a4193fe2e17f0a841a24ac36d76849f38526da8bb085e112826 Digest: 88fb433cedb7f2d2f63392299cf1451be21aa200dcb6b51175065988ef5b4773 Flags: 0 Hash descriptor: Image Size: 769248 bytes Hash Algorithm: sha256 Partition Name: tee1 Salt: 06ddedc81645b86397000cab411c4630fdd9b38dce69c9946ce58d5e880c32e6 Digest: 7b71a09ea532f3a39c26caf204c5a967441a8fa51a8699bf84dc9fb6d99919b5 Flags: 0 Hashtree descriptor: Version of dm-verity: 1 Image Size: 4194304 bytes Tree Offset: 4194304 Tree Size: 36864 bytes Data Block Size: 4096 bytes Hash Block Size: 4096 bytes FEC num roots: 2 FEC offset: 4231168 FEC size: 40960 bytes Hash Algorithm: sha256 Partition Name: odm Salt: 44ada8b3fa94014e47a255404f73f42a0b1bd3300c4253f6d8c160ed889ba4b4 Root Digest: 46d6766f06dce9dc0696be45fd51e07183c91916ccc8f50ba7a121681c79da87 Flags: 0 Hashtree descriptor: Version of dm-verity: 1 Image Size: 863334400 bytes Tree Offset: 863334400 Tree Size: 6803456 bytes Data Block Size: 4096 bytes Hash Block Size: 4096 bytes FEC num roots: 2 FEC offset: 870137856 FEC size: 6881280 bytes Hash Algorithm: sha256 Partition Name: product Salt: 9d06f632977f1a82d6df0a7e5fa5ff53869fd135509b17f9ae7f864159df4d93 Root Digest: f2d69223a89de6b6c0d88be4939e6d0b8b06186d6c19062b288f8c8e96daaf75 Flags: 0 Hashtree descriptor: Version of dm-verity: 1 Image Size: 3775029248 bytes Tree Offset: 3775029248 Tree Size: 29732864 bytes Data Block Size: 4096 bytes Hash Block Size: 4096 bytes FEC num roots: 2 FEC offset: 3804762112 FEC size: 30081024 bytes Hash Algorithm: sha256 Partition Name: system Salt: dcb169f26737b4025df472c3bcccff1d178f346b1e04913a593a1b9bfc9c3cae Root Digest: a43d877bf747a0e8f19f6311249af37862d1aacab2112910f1963381ff69848f Flags: 0 Hashtree descriptor: Version of dm-verity: 1 Image Size: 513945600 bytes Tree Offset: 513945600 Tree Size: 4055040 bytes Data Block Size: 4096 bytes Hash Block Size: 4096 bytes FEC num roots: 2 FEC offset: 518000640 FEC size: 4096000 bytes Hash Algorithm: sha256 Partition Name: vendor Salt: e64f73094a6b5f611f60a305565fdd374981ded0c0ab927dff321cd2f22eaf06 Root Digest: fdb87f57c6b1d8efba5dc4357c9f940ff29cff8852d277ac22aaafd7ebdcaa39 Flags: 0
(12-03-2020, 11:51 PM)hovatek Download vbmeta_pad.py based on your phone's android from the links below (unzip after downloading)
This post was last modified: 14-05-2021, 05:05 AM by hd_scania.
hd_scania
hd_scania
hd_scania
Junior Member
18
14-05-2021, 06:19 AM
#46
Command bugs? The PEM keys are ok
Code:

% sudo python avbtool make_vbmeta_image --key PubliCert.TWRP.AOSP11.SM-A125F.hd_scania.pem --algorithm SHA256_RSA4096 --flag 2 --chain_partition bootloader:1:keys/bootloader.keys.bin --chain_partition prism:10:keys/prism.keys.bin --chain_partition optics:11:keys/optics.keys.bin --chain_partition product:2:keys/product.keys.bin --chain_partition odm:5:keys/odm.keys.bin --chain_partition tee1:6:keys/tee1.keys.bin --chain_partition lk:7:keys/lk.keys.bin --output vbmeta.TWRP.AOSP11.SM-A125F.hd_scania.img avbtool: Error getting public key: b'unable to load Public Key\n140674809644416:error:0909006C:PEM routines:get_name:no start line:crypto/pem/pem_lib.c:745:Expecting: PUBLIC KEY\n' % cat PubliCert.TWRP.AOSP11.SM-A125F.hd_scania.pem -----BEGIN CERTIFICATE----- MIIELTCCAxWgAwIBAgIJANEwmqM2Fs8EMA0GCSqGSIb3DQEBBQUAMGwxCzAJBgNV BAYTAktSMRQwEgYDVQQIEwtTb3V0aCBLb3JlYTEOMAwGA1UEBxMFU3V3b24xJjAk BgNVBAoTHVNhbXN1bmcgRWxlY3Ryb25pY3MgQ28uLCBMdGQuMQ8wDQYDVQQLEwZN b2JpbGUwHhcNMTMxMjE2MDg1MDI4WhcNMjMxMjE0MDg1MDI4WjBsMQswCQYDVQQG EwJLUjEUMBIGA1UECBMLU291dGggS29yZWExDjAMBgNVBAcTBVN1d29uMSYwJAYD VQQKEx1TYW1zdW5nIEVsZWN0cm9uaWNzIENvLiwgTHRkLjEPMA0GA1UECxMGTW9i aWxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArjoOavjEbusT83Dv LvsSVrq4y9HhUmZYnVX5VaOgsp7qUM5ntD9zSxR5JQ9QWCbCKh5RDy+ewnXmFcAV L2MW5zxn6eI58e5e1Uonx9SnaID5JQHOhKImzH5/1qqVjs467nTTVpkXZOzrzLhs EOau34Q/AlZ5QO0gh0TDr7YYHbry7Ie+gYePA/9gcB5UzbLQPz2oNGQPlB9e4KSw 4XNXu8BfguRltQbkJkm8/BD93vKN7MIbsxIYCzIIBjv/J79ho4NQqzpky9PFzCt/ KL1Ts7DsoQ6r3GeDgebc1ques18UXUZ1wenHy5k4ruCl6ZJ7QaxzHyEta/RT+VOC j3IuwwIDAQABo4HRMIHOMB0GA1UdDgQWBBQp+BW4OYblL74MNaxtLPuKS1Ky4DCB ngYDVR0jBIGWMIGTgBQp+BW4OYblL74MNaxtLPuKS1Ky4KFwpG4wbDELMAkGA1UE BhMCS1IxFDASBgNVBAgTC1NvdXRoIEtvcmVhMQ4wDAYDVQQHEwVTdXdvbjEmMCQG A1UEChMdU2Ftc3VuZyBFbGVjdHJvbmljcyBDby4sIEx0ZC4xDzANBgNVBAsTBk1v YmlsZYIJANEwmqM2Fs8EMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB AEKg+91c2q1OKoP89QAQCKlLXKQNaaGQisMLISeBAkfF8npSPmftDSu9IPMTR9ZG 2AwCgH1SoI4cBqKJviU1M41IHTC3qJXRAv52Mjfv47AbkVyzLvE5YL/9R9zY+ER/ 4KFvye4EvsybB9l0B8eoF/Pk4olX2KrhqkP8EtcDr47VI+FloeHGFef9DSvUz3Np MQMp4jdNBUZ57mXwKRl1pMgz3f+Cgwi9zWmK9/lf+w0OXKBXxB+vhGMpg/7Y/Ohj B4OHj7fOFedOEZlSmois41gknKgxyzvd1Xig7QcpIYUgH9FMPZxzhgMElY6zOroC SYgfWsLmjJM+Q9nMhCMaJf0= -----END CERTIFICATE----- %
https://forum.xda-developers.com/t/twrp-...t-85011667
This post was last modified: 14-05-2021, 09:08 AM by hd_scania.
hovatek
hovatek
hovatek
Administrator
51,018
14-05-2021, 03:25 PM
#47
(13-05-2021, 05:58 PM)Cheikh Sarr ...

create a new thread for your device issue by clicking "ask question" at the top
in the thread, be sure to explain what you're trying to do and your python version
This post was last modified: 14-05-2021, 03:25 PM 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.
hovatek
hovatek
hovatek
Administrator
51,018
14-05-2021, 03:38 PM
#48
(14-05-2021, 06:19 AM)hd_scania ...

see https://www.hovatek.com/forum/thread-32662.html

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
51,018
16-05-2021, 08:17 PM
#49
(14-05-2021, 04:57 AM)hd_scania But unfortunately, are there vbmeta_pad.py for Android 11+ based firmware? My current stock ...

Share a link to your stock vbmeta in your new thread

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.
pindonga123
pindonga123
pindonga123
Enthusiastic Member
12
20-06-2021, 11:40 PM
#50
I downloaded this https://mega.nz/#!s7JEGCbA!9H2KJkppDGYbU...w7yLOHL9KA and have a only file. Doenst look like it will be.
Pages (18): Previous 1 … 3 4 5 6 7 … 18 Next
Users browsing this thread:
 4 Guest(s)
Users browsing this thread:
 4 Guest(s)