A script to set up a signing environment for Android builds by generating the necessary keys.
-
Run the script in your root build directory:
bash <(curl -s https://raw.githubusercontent.com/imnathanzero/Signing-Script/main/keygen.sh) -
Provide the certificate details when prompted and confirm.
In your device.mk or common.mk file in the device tree, add:
# Keys
$(call inherit-product, vendor/private/keys/keys.mk)Then build as usual.
This script works with any Android ROM without needing additional changes, because it uses PRODUCT_DEFAULT_DEV_CERTIFICATE, which is supported by all standard Android build systems.