Skip to content
KNOOP edited this page Jul 28, 2026 · 2 revisions

Updates

Ava can update itself two ways: an in-app stable updater that compares against version.json, and a native Home Assistant Update entity that reads GitHub releases (including beta artifacts) and installs through Android's Download Manager.

The HA Update entity shipped in 0.6.1 ("Every Screen, One System"); SHA-256 verification, dismissed-stable memory and language-based download routes were tightened in 0.6.2.


Overview

Ava has two independent update channels. They never share state except for the recorded installed-artifact digest.

Channel Source of truth What it compares Beta?
In-app stable updater version.json on the master branch versionCode (and sha256 when present) No — stable only.
HA Update entity GitHub releases (full release notes) Installed APK artifact sha256 vs GitHub asset sha256; same-tag rebuilds allowed Yes — pre-releases are eligible.

The entity is placed under diagnostics and reports the current version as up to date when the installed artifact already matches the release.


In-App Stable Updater

The regular in-app stable updater uses version.json as the single source of truth.

https://raw.githubusercontent.com/knoop7/Ava/master/version.json

version.json Format

{
  "versionName": "0.6.2",
  "versionCode": 62,
  "downloadUrl": "https://github.com/knoop7/Ava/releases/download/0.6.2/Ava-0.6.2.apk",
  "sha256": "77ff6631…"
}
  • sha256 is optional. Older files without it continue to work and compare versionCode only.
  • When sha256 is present, Ava verifies the download and can identify a rebuilt APK published under the same version number.
  • Ava no longer compares GitHub assets directly with device-side APK bytes, preventing repeated false update notifications.

Update Decision

  1. Remote versionCode < installed → never prompt.
  2. Remote versionCode > installed → update available.
  3. Same versionCode:
    • With publisher sha256 → update only if the digest differs (same-tag rebuild).
    • Without sha256 (legacy JSON) → no update (versionCode-only mode).

"Later" Remembers the Dismissed Version

Choosing Later in the stable update dialog now remembers the dismissed stable version instead of repeatedly interrupting the user. The skipped candidate is stored in UpdateArtifactStore:

Field Purpose
skipped_software_prompt_version Version name the user dismissed.
skipped_software_prompt_code Version code the user dismissed.
skipped_software_prompt_sha Publisher sha256 the user dismissed (if present).

A newer versionName, versionCode, or a different sha clears the match automatically, so the next genuine release will prompt again.

The HA Update entity remains available for administrators who intentionally deploy beta or rebuilt artifacts, regardless of the in-app "Later" choice.


Home Assistant Update Entity

Ava publishes a native update entity to Home Assistant.

Property Value
Entity key firmware_update
Object ID firmware_update
Icon mdi:cellphone-arrow-down
Device class firmware
Entity category diagnostics
Release summary Full GitHub release description (Markdown rendered by HA)
Release URL The GitHub release page

How It Decides "Update Available"

The entity reads the full GitHub release description, distinguishes stable and beta artifacts, and compares the installed APK artifact rather than relying only on the visible version number. This lets it detect a rebuilt APK published under the same version.

  • The entity target is the latest pre-release first, then stable.
  • Same version + same sha → entity stays off (does not fall back to the stable name).
  • Same tag, different sha → entity shows an update (same-tag rebuild).
  • Only a smaller versionCode is rejected as a downgrade.

Installing from Home Assistant

Starting an update from Home Assistant downloads the APK through Android's Download Manager so progress remains visible in the system notification area.

Installer path Behavior
Root Silent install, then reboot after 1.5 s.
Shizuku Silent install, then reboot after 1.5 s.
Device owner Silent install, then reboot after 1.5 s.
No privileged installer Falls back to Android's normal package installer; user confirms the system install prompt.

After a successful silent install, Ava records the publisher sha256 (UpdateArtifactStore.markInstalled) so the entity can correctly report "up to date" for that exact artifact.


SHA-256 Verification

Ava tracks publisher-provided digests only — it never invents a sha256 when the source omits one.

Source Field Used by
version.json sha256 In-app stable updater + same-tag rebuild detection.
GitHub release asset sha256Hex (GitHub form sha256:77ff6631…) HA Update entity + same-tag rebuild detection.

When a publisher SHA-256 is available, Ava:

  1. Verifies the downloaded APK against it before installing.
  2. Records the digest after a successful install so future checks can detect a rebuilt APK under the same version number.
  3. Reports "up to date" when the installed artifact already matches the release.

When no publisher sha256 is present (legacy version.json), Ava falls back to versionCode-only comparison and does not track an installed digest.


Download Routes by Language

Version checks, release notes, Gecko engine packages, scene data, and the Fleet ADB component select download routes by interface language.

Language Preferred route Fallback
Chinese (zh) ghfast.top GitHub mirror GitHub direct
Russian (ru) ghfast.top GitHub mirror GitHub direct
Other GitHub direct ghfast.top mirror

The proxy prefix is https://ghfast.top/ prepended to the original GitHub URL. URLs already containing ghfast.top are not double-proxied.

This reduces long waits and interrupted downloads in regions where GitHub direct access is unreliable.


Troubleshooting

"Up to date" but a newer version exists

  1. If the installed APK was rebuilt under the same version number and version.json has no sha256, the in-app updater cannot detect the rebuild. The HA Update entity can, via GitHub asset digests.
  2. Force a re-check from the HA entity actions or restart Ava.

Update entity never shows an update

  1. Confirm the installed artifact sha256 matches the latest GitHub release asset — Ava may have already installed that exact artifact.
  2. Check the entity's release summary; it shows the current vs latest label.
  3. If GitHub releases are unreachable from the device, the entity reports a check failure.

Download stalls or fails

  1. If your language is zh or ru, Ava tries ghfast.top first; if the mirror is down, it falls back to GitHub direct.
  2. If your language is other, GitHub direct is tried first; on failure, ghfast.top is tried.
  3. Confirm Download Manager is enabled on the device (some kiosk ROMs disable it).

Repeated "update available" notifications after installing

This was fixed in 0.6.2: Ava no longer compares GitHub assets directly with device-side APK bytes. If you still see it, ensure version.json carries a sha256 field so the in-app updater can match the installed artifact.


See Also

  • Permissions — Root, Shizuku and Device Owner grants used by silent installers.

Back to Home

Clone this wiki locally