Updates and release

Code check: the app now lives in android/ in this project (not a separate AssistantX-Android folder). It is not in git.

Release and update (automatic)

Run assistantx-app-release "what changed" (a helper in ~/bin, outside the repo). It:

  1. copies the latest page into the app and sends the project to the server;
  2. builds a release APK there and signs it with the server's own key (~/.assistantx.keystore, password in ~/.assistantx-keystore.pass, both mode 0600);
  3. puts the APK at ~/assistantx/data/app/assistant.apk and then version.json (versionCode, versionName, notes). The version file goes last, so the server never offers a version without its file. Each build's code counts up (minutes since 2026-01-01).

The server hands them out: GET /v1/app/version (version, notes, and the file's size and SHA-256, worked out from the file itself) and GET /v1/app/apk. Both need a token; a device token may use them too. They return 404 until something is published.

The installed app:

Keep the signing key safe. Android only accepts an update signed with the same key as the installed app. Back up ~/.assistantx.keystore and its password file. With a new key, every phone has to uninstall the app first. The first install of a release build also needs the old debug build removed (different key).

Install the first time

With USB debugging on and the phone plugged in: adb install -r dist/assistant.apk after scp assistantx-server:assistantx/data/app/assistant.apk dist/. Or open the APK from the server on the phone's browser while the temporary share is running (see below).

ssh assistantx-server '(nohup timeout 1800 python3 -m http.server 8791 --bind <server-ip> --directory ~/apk-share >/dev/null 2>&1 &)'
# copy the file there first: ssh assistantx-server 'mkdir -p ~/apk-share && cp ~/assistantx/data/app/assistant.apk ~/apk-share/'
# phone: http://<server-ip>:8791/assistant.apk   (closes itself after 30 minutes)

Release builds are not debuggable, so they ignore the adb ... --es token shortcut; paste the token once.

Update banner and change log