Home Forum Blog Private Support Courses
Our courses are now on YouTube! Start Watching
Hovatek Forum OPERATING SYSTEMS Android [Tutorial] How to use AVBtool and a private key to sign a Unisoc (SPD) image

[Tutorial] How to use AVBtool and a private key to sign a Unisoc (SPD) image

[Tutorial] How to use AVBtool and a private key to sign a Unisoc (SPD) image

Pages (6): Previous 1 2 3 4 5 6 Next
hovatek
hovatek
hovatek
Administrator
50,891
26-03-2024, 06:13 PM
#41



(15-03-2024, 08:12 PM)4goTTen21 2 questions:
1-  How I make sure to disable user encryption ?
2- If I'm going to flash a GSI, should I sign the .imgs using the device stock vbmeta or should I use the GSI vbmeta ?

Create a thread 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.
merax
merax
merax
Newbie
1
03-05-2024, 05:36 AM
#42
I ran command below to get boot.img info image
python2 avbtool info_image --image boot.img

but it threw error below.
"Given image does not look like a vbmeta image"

I removed the all the bits before AVB0 and managed to get the info but there is no footer. How do i get the footer sir?

Below is what i get..
Minimum libavb version: 1.0
Header Block: 256 bytes
Authentication Block: 576 bytes
Auxiliary Block: 1280 bytes
Algorithm: SHA256_RSA4096
Rollback Index: 0
Flags: 0
Release String: 'avbtool 1.1.0'
Descriptors:
Hash descriptor:
Image Size: 23742464 bytes
Hash Algorithm: sha256
Partition Name: recovery
Salt: 6d13e635e505f337460c4e0f9d22be4a96518ceee422511cca6c6113cd96fa25
Digest: 75ab9441053eb877eb2c95f1dd3474beeead5437a9a16c3d09efe931c4d16693
Flags: 0


Supposedly footer info below is missing
Footer version: 1.0
Image size: 41943040 bytes
Original image size: 23742464 bytes
VBMeta offset: 23744512
VBMeta size: 2112 bytes
hovatek
hovatek
hovatek
Administrator
50,891
04-05-2024, 05:17 PM
#43
(03-05-2024, 05:36 AM)merax Supposedly footer info below is missing

Create a thread 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.
Noizexworking
Noizexworking
Noizexworking
Newbie
1
16-10-2024, 07:37 AM
#44
avbtool.py: Adding hash_footer failed: [Errno 2] No such file or directory: '/dev/urandom'.
help me (windows)
justshez
justshez
justshez
Senior Member
2,505
16-10-2024, 05:01 PM
#45

Mediatek Course Mediatek Course


(16-10-2024, 07:37 AM)Noizexworking avbtool.py: Adding hash_footer failed: [Errno 2] No such file or directory: '/dev/urandom'.
help me (windows)

Are you sure you use the correct name for the image you want to sign?
maxpayne
maxpayne
maxpayne
Intern
4,774
17-10-2024, 08:42 AM
#46
(16-10-2024, 07:37 AM)Noizexworking avbtool.py: Adding hash_footer failed: [Errno 2] No such file or directory: '/dev/urandom'.
help me (windows)

Create a 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.
paulodinis1981
paulodinis1981
2
01-01-2025, 11:43 PM
#47
(16-10-2024, 07:37 AM)Noizexworking avbtool.py: Adding hash_footer failed: [Errno 2] No such file or directory: '/dev/urandom'.
help me (windows)

same here

python avbtool.py add_hash_footer --image boot.img --partition_name boot --partition_size 67108864 --key rsa4096_boot.pem --algorithm SHA256_RSA4096 --prop com.android.build.boot.fingerprint -> ZTE/EEA_P963F60/P963F60:11/RP1A.201005.001/20221213.140633:user/release-keys --prop com.android.build.boot.os_version -> 11 --rollback_index <1> --salt 2b283de74d7351d4a32837752e57d4e0ae838870b1f15a16a2723b4d5b8cce43

C:\AVBTOOL>python avbtool.py add_hash_footer --image boot.img --partition_name boot --partition_size 67108864 --key rsa4096_boot.pem --algorithm SHA256_RSA4096 --prop com.android.build.boot.fingerprint -> ZTE/EEA_P963F60/P963F60:11/RP1A.201005.001/20221213.140633:user/release-keys --prop com.android.build.boot.os_version -> 11 --rollback_index <1> --salt 2b283de74d7351d4a32837752e57d4e0ae838870b1f15a16a2723b4d5b8cce43
O sistema não conseguiu localizar o ficheiro especificado.

C:\AVBTOOL>
maxpayne
maxpayne
maxpayne
Intern
4,774
02-01-2025, 09:50 AM
#48
(01-01-2025, 11:43 PM)paulodinis1981 O sistema não conseguiu localizar o ficheiro especificado.

Portuguese (Brazil)

É muito simples. Certifique-se de que todos os arquivos que você está chamando ou referenciando estejam presentes na pasta, por exemplo,
avbtool.py
boot.img
rsa4096_boot.pem

English

Its very straightforward. Ensure all the files you're calling or referencing are present in the folder e.g
avbtool.py
boot.img
rsa4096_boot.pem

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.
Username195
Username195
Username195
Newbie
3
22-04-2025, 10:13 AM
#49
If the avbtool tool shows the error: FileNotFoundError: [Errno 2] No such file or directory: 'fec' when using the add_hashtree_footer command.
imzgh
imzgh
imzgh
Newbie
2
06-05-2025, 02:30 PM
#50
Important Notice

    If you encounter an error such as avbtool: Image size of 36700160 exceeds maximum image size of 36630528 in order to fit in a partition size of 36700160, simply unpack and repack your magisk patched boot image using Android Image Kitchen. This will reduce the size.

Android Image Kitchen didn't help  reduce the size! Any other way around to solve this issue?
Thanks
This post was last modified: 06-05-2025, 02:31 PM by imzgh.
Pages (6): Previous 1 2 3 4 5 6 Next
Users browsing this thread:
 2 Guest(s)
Users browsing this thread:
 2 Guest(s)
WhTlYt