Contents of the docs
Blackview Tab90 Home Assistant Kiosk · Docs
Kite build
Why the setup uses its own build of Kite AOS, which five bugs the patches fix and how to build the APK locally or with GitHub Actions and publish it.
On this page
Kite AOS is a kiosk app for smart home dashboards. On the Tab90, version 2.3.0 had five bugs that make a wall panel unusable. The fixes are patches in this repo and are submitted as pull requests to the Kite project. Until they are part of an official release, this repo builds Kite itself.
The five fixes
| Patch | Bug | Fix |
|---|---|---|
01-mqtt5-will-properties.patch |
With MQTT 5 and a last will without willProperties, Kite never sends a CONNECT, the connection never comes up. |
pass empty willProperties |
02-renderer-gone-recreate.patch |
When the WebView renderer process dies, Kite hangs on the loading logo forever. | throw the WebView away and build a new one; the crash no longer counts as a page error |
03-native-crash-relaunch.patch |
Kite only restarts itself after Java crashes, not after native ones (Mali GPU driver in the WebView's GPU thread). | read getHistoricalProcessExitReasons on the next start and restart like after a Java crash |
04-engine-command-queue.patch |
After a Home Assistant outage of more than 20 seconds the "resume" command got lost, the WebView stayed paused and the dashboard froze. | process commands to the WebView in order through a queue |
05-webview-match-parent.patch |
The WebView is laid out with WRAP_CONTENT, so Chromium uses a layout height of 0: 100vh is 0 and dashboards with calc(100vh - …) collapse to a line. |
lay out the WebView with MATCH_PARENT |
How the bugs were found is told under Background.
What gets built
kite/version.env sets
upstream repo, tag and own version:
| Name | Value |
|---|---|
KITE_REPO |
https://github.com/andrew-malitchuk/kite-aos.git |
KITE_TAG |
2.3.0 |
KITE_VERSION |
2.3.0-dasred.5 |
tools/build-kite.sh clones the tag, applies the patches from kite/patches/ in order, sets versionName, builds for
arm64-v8a only and produces the release build of the foss/mobile variant. The result is
out/kite-aos-<version>-arm64.apk plus out/SHA256SUMS.
Build it yourself
Requirements: JDK 21, git, python3 and an Android SDK (ANDROID_HOME).
The script reads the signing values from the environment or from kite.env if it exists:
KITE_KEYSTORE=/path/to/kite-release.p12
KITE_KEY_ALIAS=kite-release
KITE_KEY_PASSWORD=…export ANDROID_HOME=~/Library/Android/sdk
tools/build-kite.shWithout KITE_KEYSTORE the APK stays unsigned, fine for a test build. Put APK and SHA256SUMS into apk/
afterwards, then setup.sh uses them instead of downloading.
Important
Updating an installed Kite only works with the same key (adb install -r, settings stay). With another key Kite has
to be uninstalled first and its settings are lost.
Tip
The build needs a lot of memory. With little RAM, R8 fails when other Gradle or Kotlin daemons are running. The script therefore builds without a daemon, with one worker and compiles Kotlin in-process. If Maven Central answers with 429, it retries the build up to three times.
Workflow "Build Kite"
.github/workflows/build-kite.yml
builds the APK in three cases:
| Trigger | Result |
|---|---|
pull request changing kite/ or the build script |
unsigned APK as an artifact, 3 days |
push to main changing kite/ or the build script |
signed APK as release kite-<KITE_VERSION>; if that release exists, only as an artifact |
| manual (Actions → Build Kite → Run workflow) | signed, optionally as a release |
Signing needs three secrets in the repo:
| Secret | Contents |
|---|---|
KITE_KEYSTORE_BASE64 |
PKCS12 keystore, base64 encoded |
KITE_KEY_ALIAS |
key alias |
KITE_KEY_PASSWORD |
password of keystore and key |
base64 -i kite-release.p12 | gh secret set KITE_KEYSTORE_BASE64 --repo DasRed/blackview-tab90-homeassistant-kiosk
gh secret set KITE_KEY_ALIAS --repo DasRed/blackview-tab90-homeassistant-kiosk
gh secret set KITE_KEY_PASSWORD --repo DasRed/blackview-tab90-homeassistant-kioskPublishing a new version
- Add or change a patch in
kite/patches/and bumpKITE_VERSIONinkite/version.env(e.g.2.3.0-dasred.6). In a pull request the workflow builds it as a test. - On
mainthe workflow builds a signed APK and publishes the releasekite-2.3.0-dasred.6including its tag. Without a newKITE_VERSIONthere is no new release, the build is only kept as an artifact. setup.shdownloads the new version on its next run. On tablets that are already set up,adb install -r apk/kite-aos-<version>-arm64.apkis enough.
Once a fix is part of an official Kite release, its patch goes away. When all of them are in, KITE_TAG can point to
the new release and the own build is no longer needed.