Repository navigation
How to get avb.pem from key generated by avbroot #576
|
I'm trying to build GrapheneOS and I would prefer not to have to unlock the bootloader to flash a new avb_custom_key. I have avb.key, avb.crt, and avb_pkmd.bin, however the GrapheneOS mentions an avb.pem that I do not have. Can I use avb.key in place of this? If not is there a way to get avb.pem from the keys generated by avbroo. |
Answered by
chenxiaolong
Mar 6, 2026
Replies: 1 comment 2 replies
|
Yep, you can use your existing key. The AVB key generated by avbroot uses the exact same PEM-encoded PKCS8 format that AOSP's avbtool expects. Just rename the file. If you also want to reuse your OTA key, you'll have to convert it to DER-encoded PKCS8, which can be done with: openssl pkcs8 -topk8 -scrypt -in ota.key -out releasekey.pk8 -outform DER
# For the certificate, rename ota.crt to releasekey.x509.pem. |
2 replies
Answer selected by
krongler
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yep, you can use your existing key. The AVB key generated by avbroot uses the exact same PEM-encoded PKCS8 format that AOSP's avbtool expects. Just rename the file.
If you also want to reuse your OTA key, you'll have to convert it to DER-encoded PKCS8, which can be done with:
openssl pkcs8 -topk8 -scrypt -in ota.key -out releasekey.pk8 -outform DER # For the certificate, rename ota.crt to releasekey.x509.pem.