Talk with a Hovatek Engineer/Developer. Start Now

Learn Mediatek Software Repairs Online! Enroll




Difficulties at creation of signed vmeta
#11

Post: 11 by Gargoyle



Share factory boot.img and vbmeta-sign.img

find Reply
#12

Post: 12 by LucasBS

Of course

Given the 4MB limit for attachments, I'm sending an external link of a ZIP

The ZIP contains:

boot.img: The Boot extracted from the .pac;
vbmeta-sign.img: The VBMeta extracted from the .pac;
BootMagisk.img: The Boot extracted from the .pac, but patched by Magisk;
keys folder: the 408-length strings extracted from the vbmeta-sign.img. The folder includes the rsa4096_vbmeta.bin, produced through the tutorials.

Thank you for the work.
Judging by the length of the thread, it will certainly help more people.
find Reply
#13

Post: 13 by Gargoyle

https://www.mediafire.com/file/sucqi9765...Q-X10L.rar
find Reply
#14

Post: 14 by LucasBS

IT WORKED !!!
AMAZING !

But, if it's not an abuse, I must ask: did you do anything different from that tutorial ?

I ask because I followed the tutorial to the letter, except:
- I didn't make my own SSL key: I used the one provided rsa4096_vbmeta.pem
- I used my own names for files, like 'example.bin' instead of 'hovatek.bin'.

But info_image produced an identical output between our files, except for the flags (0 vs. 2) and some values, like Salt, Digest, etc.
Although I remember testing with different flags too...

My intention was to make a TWRP recovery AFTER all this mess here was resolved, but I didn't resolve anything. Still blind about the cause.
And the ideal was to patch on my own instead of bothering hovatek people any further...

Additional information: I flashed your files using Research Tool. But it's probably just a detail, as I tried that before and made no difference.

-----------------------------------------------------------------------------------------------------------------
Off-topic to moderators: I was unable to insert an image on the body of this text here. The preview is great, but the picture is converted to plain text when I press the Post button.


Attached Files
.png Magisk.png Size: 23.42 KB  Downloads: 1
find Reply
#15

Post: 15 by Gargoyle

The instructions here on the forum are correct, but made for older devices, you need to be aware that newer devices have a different vbmeta-sign.img, you need to adapt the command to it, it's not enough to just copy and paste.

boot.img and vbmeta are signed by rsa4096_vbmeta.pem

It looks like this for your device CTRONIQ-X10L

Sign patched boot.img
Code:
python avbtool add_hash_footer --image boot.img --partition_name boot --partition_size 67108864 --key rsa4096_vbmeta.pem --algorithm SHA256_RSA4096 --prop com.android.build.boot.fingerprint:CTRONIQ/CTRONIQ-SNOOK-X10L/CTRONIQ-SNOOK-X10L:11/RP1A.201005.001/20211112:user/release-keys --prop com.android.build.boot.os_version:11

Create custom and sign vbmeta.img
Code:
python avbtool make_vbmeta_image --key rsa4096_vbmeta.pem --algorithm SHA256_RSA4096 --flag 0 --chain_partition boot:1:keys/boot_key.bin --chain_partition dtbo:6:keys/dtbo_key.bin --chain_partition socko:11:keys/socko_key.bin --chain_partition odmko:12:keys/odmko_key.bin --chain_partition vbmeta_system:2:keys/vbmeta_system_key.bin --chain_partition vbmeta_system_ext:3:keys/vbmeta_system_ext_key.bin --chain_partition vbmeta_vendor:4:keys/vbmeta_vendor_key.bin --chain_partition vbmeta_product:5:keys/vbmeta_product_key.bin --chain_partition l_modem:7:keys/l_modem_key.bin --chain_partition l_ldsp:8:keys/l_ldsp_key.bin --chain_partition l_gdsp:9:keys/l_gdsp_key.bin --chain_partition pm_sys:10:keys/pm_sys_key.bin --padding_size 20480 --output vbmeta.img; python vbmeta_pad.py
find Reply
#16

Post: 16 by LucasBS

Just to finally conclude the thread:

Our codes are the same, except for the padding:

Your padding is of 20480
My padding, according to the sequence after DHTB (00 40 00 00) should be 16384

Strangely, yours worked and mine didn't...

This thing about the padding is also on the tutorial, as a response to the first comment.


Also, I need to apologize:
When I said I followed the tutorial to the letter, I really forgot to include that I DID customize the code according to my partitions, in the order and indexes given by the info_image

You generously taught me that, by the way:
(27-07-2023, 11:38 PM)Gargoyle Wrote:  You have to modify the command according to your vbmeta-sign.img
--chain_partition boot:1:keys/key_boot.bin
--chain_partition dtbo:6:keys/key_dtbo.bin
find Reply
#17

Post: 17 by LucasBS

One last question (I hope):
How to build and flash a TWRP on this device ?

Apparently, there's this tutorial, that also seems obsolete with this A/B partition thingy...

From the beginning I didn't see a Recovery partition, but only now I (might be) able to focus on it.

Regardless of a response or not for this question, thank you for the very extensive support
My confidence grows that this topic will help people
find Reply




Users browsing this thread: 1 Guest(s)
YouTubeWhatsappTelegram

© 2023. Powered by Hovatek...just a button away! Software by MyBB.