📚 Encyclopedia

Android · updated 2026-11-30

In-app updates for sideloaded Android apps

androidupdaterapkpackageinstallersideloadversion-jsondeploy

Apps that are not on Google Play (Message, Keyboard, Spectre, Guardian, Tokay) update themselves from Justin's server: the app fetches a small version file, downloads the newer APK, and hands it to Android's installer. The pattern has been ported between apps several times and is now settled.

Server side

App side (zero dependencies)

Previewing a build on the user's phone

A release-signed build with the same versionCode as the published one installs over it as an update (same key, versionCode not lower). That lets the user try a preview build (shared as a plain APK link, with a versionName like 0.3.1-about-preview) before the real release; the real release then bumps the versionCode and replaces it normally. Used for Tokay's About screen (post #1784).

Telling the user what changed

Phone 0.1.2 (2026-10-28) added the pattern worth reusing in every app: - One changelog file in the app's assets (assets/changelog.md, newest first, sections ## <versionName> · <date> with - notes), parsed by a small unit-tested parser. A unit test also parses the shipped file, so a malformed entry fails the build. - Settings > About > What's new shows the whole file and marks the installed version. - An "App updated to X" banner after an update, with a link to What's new and a dismiss button. It shows while a stored "seen" versionCode is below the running one. A fresh install (firstInstallTime == lastUpdateTime) records the current version as seen at first launch, so new users do not get the banner. - The update banner can show the notes too. When the update feed is the F-Droid index, fdroidserver publishes per-version notes as the app's localized.en-US.whatsNew (see A self-hosted F-Droid repository and APK catalog), and the updater shows a few lines of it under "X is available". Only builds that contain this code can show it, so the first visible case is one release later. - The deploy script refuses to ship unless the changelog's top section matches the versionName and has notes, and it writes the same notes into the catalog's metadata.

What the user sees

Gotchas

See also

Linked from

Sources: message memory (project_deploy_workflow), keyboard memory (history v1.1.0, Spectre v0.7.0), phone memory (guardian 1.2.1), tokay memory (0.3.2), phone memory (0.1.2), tldr post #1870, swerve memory (swerve-app-shell), 2026-11-25