If you have ever seen the error
FAILED (remote: bootimage: incomplete or not signed), here’s the solution (at least for the Fairphone 2 😉):
BootSignature.jar file from my server (or compile it yourself from the LineageOS 14.1 tree with the command
curl -O https://private.z3ntu.xyz/BootSignature.jar
make_key tool from the LineageOS GitHub.
curl -O https://raw.githubusercontent.com/LineageOS/android_development/cm-14.1/tools/make_key
Make the script executable
chmod +x make_key
Generate the key with
./make_key keystore '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddressemail@example.com'
keystore.x509.pem in a directory of your choice.
Put the following script into a location in the PATH (
/usr/local/bin should be good) and replace the first variable with the location you put the three files in:
#!/bin/bash KEYSTORE_TOOLS=/location/to/jar_and_certs IMGFILE=$1 if [ ! -n "$1" ]; then echo "Usage: $0 <file.img>" exit 1 fi java -jar $KEYSTORE_TOOLS/BootSignature.jar /boot $IMGFILE $KEYSTORE_TOOLS/keystore.pk8 $KEYSTORE_TOOLS/keystore.x509.pem $IMGFILE.signed
Don’t forget to make that script executable! (
Now you can use the script to sign your images and then boot it
sign_img boot.img && fastboot boot boot.img.signed