Skip to content

fix(android): sign APK explicitly with apksigner after Gradle build - #151

Merged
izzywdev merged 1 commit into
masterfrom
claude/fuzefront-pwa-android-apk-0cj8ql
Jul 3, 2026
Merged

fix(android): sign APK explicitly with apksigner after Gradle build#151
izzywdev merged 1 commit into
masterfrom
claude/fuzefront-pwa-android-apk-0cj8ql

Conversation

@izzywdev

@izzywdev izzywdev commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

Run #8 confirmed the Gradle build succeeds but signing is silently skipped by the bubblewrap-generated app/build.gradle — it always produces app-release-unsigned.apk, which Android rejects with "package appears to be invalid".

Rather than debugging the Gradle signing template, this PR takes the reliable path: build the unsigned APK with ./gradlew assembleRelease then sign it explicitly with apksigner (ships with Android build-tools, already installed by android-actions/setup-android).

APKSIGNER="$ANDROID_HOME/build-tools/$BUILD_TOOLS/apksigner"
"$APKSIGNER" sign \
  --ks ./keystore/fuzefront-release.keystore \
  --ks-pass "pass:${KEYSTORE_STORE_PASSWORD}" \
  --key-pass "pass:${KEYSTORE_KEY_PASSWORD}" \
  --ks-key-alias fuzefront \
  --out app-release.apk \
  app-release-unsigned.apk
"$APKSIGNER" verify --verbose app-release.apk

The verify step will fail the CI job if the signature is invalid, giving early feedback.

Test plan

  • Merge triggers build-android-apk.yml on master
  • Build APK step: assembleRelease + apksigner sign + apksigner verify all pass
  • Locate signed APK finds app-release.apk (not unsigned)
  • Upload APK artifact: fuzefront-android-vN uploaded
  • GitHub Release android-vN created with signed APK
  • APK installs successfully on Android device

Generated by Claude Code

Gradle signing via key.properties is silently skipped by the bubblewrap-
generated build.gradle, always producing app-release-unsigned.apk.

Instead of fighting the template, build the unsigned APK then sign it
explicitly with apksigner (already in ANDROID_HOME/build-tools/). This
matches what bubblewrap build does internally and guarantees a verifiable
signed APK that Android will accept.

Co-Authored-By: Claude <noreply@anthropic.com>
@izzywdev
izzywdev marked this pull request as ready for review July 3, 2026 09:52
@izzywdev
izzywdev merged commit 876da63 into master Jul 3, 2026
20 of 22 checks passed
@izzywdev
izzywdev deleted the claude/fuzefront-pwa-android-apk-0cj8ql branch July 3, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants