From a6ae864fb3bcb769a297c1b35f09e15f0211f709 Mon Sep 17 00:00:00 2001 From: Philip Nagler-Frank Date: Wed, 23 Nov 2022 20:01:01 +0100 Subject: [PATCH] generate newly required keys if needed while keeping the old ones --- src/init.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/init.sh b/src/init.sh index 12e7581..fb6e014 100755 --- a/src/init.sh +++ b/src/init.sh @@ -42,7 +42,7 @@ if [ "$SIGN_BUILDS" = true ]; then /root/make_key "$KEYS_DIR/$c" "$KEYS_SUBJECT" <<< '' &> /dev/null done else - for c in releasekey platform shared media networkstack sdk_sandbox bluetooth; do + for c in releasekey platform shared media networkstack; do for e in pk8 x509.pem; do if [ ! -f "$KEYS_DIR/$c.$e" ]; then echo ">> [$(date)] SIGN_BUILDS = true and not empty \$KEYS_DIR, but \"\$KEYS_DIR/$c.$e\" is missing" @@ -50,6 +50,14 @@ if [ "$SIGN_BUILDS" = true ]; then fi done done + + # those keys are only required starting with android-20, so people who have built earlier might not yet have them + for c in sdk_sandbox bluetooth; do + if [ ! -f "$KEYS_DIR/$c.pk8" ]; then + echo ">> [$(date)] Generating $c..." + /root/make_key "$KEYS_DIR/$c" "$KEYS_SUBJECT" <<< '' &> /dev/null + fi + done fi for c in cyngn{-priv,}-app testkey; do