fix(android): sign APK explicitly with apksigner after Gradle build - #151
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Run #8 confirmed the Gradle build succeeds but signing is silently skipped by the bubblewrap-generated
app/build.gradle— it always producesapp-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 assembleReleasethen sign it explicitly withapksigner(ships with Android build-tools, already installed byandroid-actions/setup-android).The verify step will fail the CI job if the signature is invalid, giving early feedback.
Test plan
build-android-apk.ymlon masterassembleRelease+apksigner sign+apksigner verifyall passapp-release.apk(not unsigned)fuzefront-android-vNuploadedandroid-vNcreated with signed APKGenerated by Claude Code