Fix uninstallable update APKs built on the ARM64 runner #23
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/release-apk-missing-resources"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Self-update downloads the APK but installation fails. The published
karatv-1.0.1.apk(andkaratv-0.3.4.apk) contain only dex files: noAndroidManifest.xml,resources.arscorres/, so Android cannot install them.Root cause
Two Forgejo runners share the
dockerlabel. v0.3.4 and v1.0.1 were built on the ARM64 runner, which swaps in the third-party AAPT2 35.0.2 (scripts/ci-aapt2-arm64.sh); under AGP 9.5 it silently produces APKs without resources while the build still succeeds. v1.0.0 was built on the x86_64 runner with Maven AAPT2 and is fine (release runs 20/54 vs 45).Changes
release.yml: job runs onruns-on: amd64(x86_64 runner only).release.yml: new Verify APK step fails the release if the APK lacksAndroidManifest.xml,resources.arscorclasses.dex(checked against the real 1.0.0 = pass, 1.0.1 = fail).UpdateManager: before installing, parse the downloaded APK withgetPackageArchiveInfoand require same package + newer versionCode; otherwise show the retry error instead of a failing system install.docs/release.md: documents theamd64label requirement and why.Before merging
amd64to the x86_64 runner (e.g.amd64:docker://node:20-bookworm), otherwise the release job waits forever.Verification
compileDebugKotlin+testDebugUnitTest: pass (local).amd64runner not run yet.