From c1e057545ef75ea75a49764fe36567f59a55b1fa Mon Sep 17 00:00:00 2001 From: Gray Zhang Date: Tue, 9 Sep 2025 21:37:18 +0800 Subject: [PATCH] fix: simplify bundletool keystore creation in download-signed-apk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove complex fallback logic that was causing failures - Create debug keystore upfront before calling bundletool - Use simpler keytool command without 2>/dev/null redirection 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/release.yml | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a255455..8217a1d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -433,31 +433,23 @@ jobs: echo "Downloading bundletool..." wget -q https://github.com/google/bundletool/releases/latest/download/bundletool-all.jar - # Generate universal APK from the AAB (this will have Google Play signing when deployed) + # Create a dummy debug keystore for bundletool (required for APK generation) + echo "Creating dummy keystore..." + keytool -genkey -v -keystore debug.keystore -alias androiddebugkey \ + -keyalg RSA -keysize 2048 -validity 10000 \ + -dname "CN=Android Debug,O=Android,C=US" \ + -storepass android -keypass android + + # Generate universal APK from the AAB echo "Generating universal APK set..." java -jar bundletool-all.jar build-apks \ --bundle="$AAB_PATH" \ --output=apks.apks \ --mode=universal \ - --ks=dummy.keystore \ + --ks=debug.keystore \ --ks-pass=pass:android \ --ks-key-alias=androiddebugkey \ - --key-pass=pass:android 2>/dev/null || { - # If no keystore, create a dummy one - keytool -genkey -v -keystore dummy.keystore -alias androiddebugkey \ - -keyalg RSA -keysize 2048 -validity 10000 \ - -dname "CN=Android Debug,O=Android,C=US" \ - -storepass android -keypass android 2>/dev/null - - java -jar bundletool-all.jar build-apks \ - --bundle="$AAB_PATH" \ - --output=apks.apks \ - --mode=universal \ - --ks=dummy.keystore \ - --ks-pass=pass:android \ - --ks-key-alias=androiddebugkey \ - --key-pass=pass:android - } + --key-pass=pass:android # Extract the universal APK unzip -q apks.apks universal.apk