Repository navigation
Publish Android APKs with releases and install updates in the app - #384
Merged
Merged
Conversation
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.
BLUF
Publish signed Android APKs with releases and install phone updates inside the app.
Changes
Android still displays its own installation confirmation. The user must tap Update in that dialog; this confirmation is unavoidable. The first install also requires allowing pitwall as an installation source. Android PackageInstaller documentation.
Linear
No Linear ticket. The task comes from the local APK release brief.
Verification
[verified] Interrupted install: Home and am kill while confirmation is open, then relaunch and retry; Install opens a fresh dialog.
[verified] Background download: a 250 ms delay per 64 KiB chunk completes without frames; returning opens confirmation.
[verified] Next release: after success and a new process, v0.2.11 replaces the success message with an Install offer.
[verified] Linux: formatting, vet and full race tests pass on Omarchy 4.5.0 amd64 with Go 1.27.1.
[verified] Scripts: installer, release, APK version and APK upload tests pass.
[verified] Android builds: arm64 production and x86_64 emulator APK builds pass.
[verified] Manual checks: API 36 emulator shows Checking, Up to date, rate-limit guidance and an available version with daily checks off.
[verified] Permission: Install opens pitwall's unknown-app setting and continues after permission is granted.
[verified] Confirmation: Android displays its update confirmation dialog.
[verified] Cancellation: Cancel reports Installation cancelled and deletes the cached APK.
[verified] Upgrade: the same-key APK installs v0.2.10 over v0.2.9, changing versionCode from 209003 to 210000.
[verified] App data: the pairing and daily-check setting survive the upgrade.
[verified] Success: the cached APK is gone; relaunch consumes the success message once.
[verified] Wrong key: Android rejects a v0.2.11 fixture with INSTALL_FAILED_UPDATE_INCOMPATIBLE.
[verified] Failure result: the app displays Android's signature error, removes the cached APK and retains installed v0.2.10.
Commands and test coverage
Go commands ran through mise with
GOFLAGS=-tags=novulkanand PITWALL_SOCKET, PITWALL_PANE and PITWALL_ATTACH unset.Every listed command exits 0. Review fixes are at 4c1e430. Shell syntax checks pass. The terminal module's vet and race tests pass from the initial release change.
Go tests cover version comparison, missing or invalid assets, dismissal, saved settings, manual checks with automatic checks disabled, HTTP 200/304/403/429, malformed JSON, size limits, download redirects, host restrictions, short/oversized downloads, progress with a full UI queue, cancellation, stale installer state, one-shot success messages, note clearing, switch semantics and partial cache cleanup.
The emulator fetches releases and APKs from a local httptest server through compiled loopback overrides. A temporary clone holds fixture tags; no release tag or asset was published. The production arm64 APK has no fixture overrides.
macOS, Windows and physical phones remain untested locally. The 24-hour interval uses an advanced test clock. Real release upload remains untested. Release upload tests use stub gh commands in disposable repositories.
Screenshots
All four screenshots were retaken from 4c1e430. They remain local and uncommitted.
apk-release-update-shots/01-update-banner.pngshows the quiet Install offer.apk-release-update-shots/02-updates-disabled.pngshows the switch off.apk-release-update-shots/03-installer-settings.pngshows the Updates group, switch, manual check and Install button.apk-release-update-shots/04-android-install-confirm.pngshows the system's required confirmation dialog.