Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

feat(android): add Android app support with build script and main activity

Dev jacobc2da98aa48ee
diff --git a/mobile/RELEASE.md b/mobile/RELEASE.md
index 058742cd4..356e43e73 100644
--- a/mobile/RELEASE.md
+++ b/mobile/RELEASE.md
@@ -1,8 +1,8 @@
-# Releasing the iOS app
+# Releasing the mobile app
The App Store record is **Autonomous Harness** (`ai.autonomous.harness.ios`, team 54DJVWMJCC —
-Autonomous Inc.). Everything below is the iOS side only; the desktop app ships from
-`desktop/RELEASE.md` on its own tags and shares nothing with this.
+Autonomous Inc.). Everything up to [Android](#android--google-play) is the iOS side; the desktop app
+ships from `desktop/RELEASE.md` on its own tags and shares nothing with this.
## The two numbers that decide whether an upload is visible at all
@@ -64,8 +64,9 @@ icon size in thirty seconds instead of in an email twenty minutes later.
| `1.0.0 (12)` | 2026-09-18 | TestFlight. Named OpenHarness on the home screen and in the app; Backspace on the phone erases text typed on the desktop; Machines moved into the ⋯ sheet; hold-to-talk hardened |
| `1.0.0 (13)` | 2026-09-18 | TestFlight. Search reads what agents said (the desktop's content index), recent first; Vietnamese Telex in the search field; terminal search has no Cancel, and the terminal holds still as it closes |
| `1.0.0 (14)` | 2026-09-18 | TestFlight. Voice sends on the second tap again — as a composer turn, not keystrokes Codex read as a paste and left unsent; the terminal scrolls again after New Agent → back |
+| `1.0.0 (15)` | 2026-09-18 | TestFlight. The floating mic, Search and + are always there, on a see-through background |
-`pubspec.yaml` is therefore at `1.0.0+15`: the repo always holds the NEXT build number, so a release
+`pubspec.yaml` is therefore at `1.0.0+16`: the repo always holds the NEXT build number, so a release
runs clean without anyone having to remember the last one.
### Why the app is iPhone-only
@@ -213,3 +214,71 @@ terminates its own end-to-end encryption (X25519, ChaCha20-Poly1305, a CPace PAK
that answer is very likely wrong. Settle it with whoever owns export compliance before submitting: a
wrong answer is not a build failure, it is review asking a question and the version standing still
until someone answers it.
+
+## Android — Google Play
+
+The Play app is **OpenHarness**, package **`ai.autonomous.harness.android`**. ⚠️ That id is permanent
+from the first upload on: Play keys the app on it and there is no renaming it afterwards.
+
+### Build
+
+```bash
+bash mobile/scripts/release-android.sh # -> build/app/outputs/bundle/release/app-release.aab
+```
+
+It builds and checks the bundle is signed with the upload key; it does not upload. Play takes the
+`.aab` by hand: Play Console ▸ OpenHarness ▸ *Test and release* ▸ a track ▸ **Create new release**.
+
+The versionCode is the same `+N` as the iOS build number. Each store keeps its own count, so one `+N`
+can go to both — but Play refuses a versionCode it has seen, exactly as App Store Connect does, so the
+`+N` is bumped after an upload to either store.
+
+### The upload key
+
+```
+~/.android-release/harness-upload.jks the upload key (PKCS12, alias `upload`) (chmod 600)
+~/.android-release/harness-upload.properties its path and passwords (chmod 600)
+```
+
+Outside this public repo for the same reason the App Store Connect key is. `android/app/build.gradle.kts`
+reads the `.properties` (or `HARNESS_ANDROID_SIGNING`, for CI); without it a release build signs with
+the debug key so `flutter run --release` still works anywhere, and the script refuses to build.
+
+**Play App Signing** holds the real app signing key — accept Google's generated key when the first
+release asks. This one only proves an upload came from us, so a lost one is recoverable (Play Console
+▸ *App integrity* ▸ request an upload key reset), but that takes days. **Back both files up to the
+team's password manager.**
+
+### First release — once
+
+1. **Create app** (Play Console ▸ *Create app*): name `OpenHarness`, default language, *App*, *Free*.
+2. **App content** — Play will not publish anything to production while one of these is open:
+ - *Privacy policy*: required (the app asks for the camera and microphone). Same URL as iOS.
+ - *App access*: sign-in is required → give the demo account from the iOS review notes, and keep a
+ machine paired to it online, for the same reason as [App Review notes](#app-review-notes--the-part-that-gets-10-rejected).
+ - *Ads*: no. *Content rating*: fill the questionnaire (a utility, no user-generated content shown
+ to others). *Target audience*: 18+.
+ - *Data safety*: the [App Privacy](#app-privacy) table above, restated — email address and user ID
+ (app functionality, analytics), app interactions (analytics); all encrypted in transit; no data
+ shared with third parties; crash logs stay on the device.
+ ⚠️ **Plus Audio ▸ Voice or sound recordings (app functionality)**, which that table leaves out:
+ voice input uploads the recording to the backend's `/api/voice/stt` to be transcribed. Declare it
+ *processed ephemerally* only if the backend keeps nothing — TODO(BE): confirm. The same gap is on
+ the iOS side (App Privacy ▸ Audio Data). Pictures sent to an agent are not collected: they go end
+ to end to the user's own machine, where we cannot read them.
+3. **Store listing**: the iOS subtitle and description fit the short (80) and full (4000) fields;
+ plus a 512×512 icon, a 1024×500 feature graphic, and at least two phone screenshots.
+4. **Internal testing** first: *Create new release* ▸ upload the `.aab` ▸ add testers by email ▸ share
+ the opt-in link. Live for testers within minutes, no review.
+5. **Production**: *Create new release* ▸ same `.aab` (or *Promote release*) ▸ **Send for review**.
+ A new app's first review takes days, not hours.
+
+⚠️ A **personal** developer account created after November 2023 must first run a *closed* test with
+at least 12 opted-in testers for 14 days before it can even apply for production. An organization
+account (Autonomous Inc.) is exempt — check which kind the account is before planning a date.
+
+### Already built
+
+| versionCode | When | Where it went |
+| --- | --- | --- |
+| `16` (1.0.0) | 2026-09-18 | Built and signed; not uploaded yet — the first upload goes to Internal testing |
diff --git a/mobile/android/app/build.gradle.kts b/mobile/android/app/build.gradle.kts
index d611b79f5..4b34a9192 100644
--- a/mobile/android/app/build.gradle.kts
+++ b/mobile/android/app/build.gradle.kts
@@ -1,11 +1,28 @@
+import java.util.Properties
+
plugins {
id("com.android.application")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
+// The Google Play upload key, read from OUTSIDE this repo — it is public, and the key and its
+// passwords live in ~/.android-release/ on the release Mac the way the App Store Connect key lives in
+// ~/.appstoreconnect/ (see mobile/RELEASE.md). HARNESS_ANDROID_SIGNING points elsewhere, for CI.
+//
+// ⚠️ Without it a release build falls back to the DEBUG key, so `flutter run --release` keeps working
+// on every other machine. Play refuses a debug-signed bundle at upload, and
+// scripts/release-android.sh refuses to build one in the first place.
+val uploadKeyFile = file(
+ System.getenv("HARNESS_ANDROID_SIGNING")
+ ?: "${System.getProperty("user.home")}/.android-release/harness-upload.properties",
+)
+val uploadKey = Properties().apply {
+ if (uploadKeyFile.exists()) uploadKeyFile.inputStream().use { load(it) }
+}
+
android {
- namespace = "com.example.harness"
+ namespace = "ai.autonomous.harness.android"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
@@ -15,25 +32,31 @@ android {
}
defaultConfig {
- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId = "com.example.harness"
- // You can update the following values to match your application needs.
- // For more information, see: https://flutter.dev/to/review-gradle-config.
+ // ⚠️ Permanent: Play keys the app on this id, and it cannot change after the first upload.
+ // Mirrors the iOS bundle id, ai.autonomous.harness.ios.
+ applicationId = "ai.autonomous.harness.android"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
- // Uses the version code from pubspec.yaml. When using split APKs, 1000 * ABI_VERSION
- // is added automatically by Flutter. (https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions)
- // You can force using the value of versionCode by specifying the `-P force-version-code-ignoring-abi=true`
- // flag during build.
+ // Both from `version:` in pubspec.yaml — the same `+N` the iOS builds carry, which Play also
+ // needs to rise with every upload.
versionCode = flutter.versionCode
versionName = flutter.versionName
}
+ signingConfigs {
+ if (uploadKeyFile.exists()) {
+ create("upload") {
+ storeFile = file(uploadKey.getProperty("storeFile"))
+ storePassword = uploadKey.getProperty("storePassword")
+ keyAlias = uploadKey.getProperty("keyAlias")
+ keyPassword = uploadKey.getProperty("keyPassword")
+ }
+ }
+ }
+
buildTypes {
release {
- // TODO: Add your own signing config for the release build.
- // Signing with the debug keys for now, so `flutter run --release` works.
- signingConfig = signingConfigs.getByName("debug")
+ signingConfig = signingConfigs.findByName("upload") ?: signingConfigs.getByName("debug")
}
}
}
diff --git a/mobile/android/app/src/main/kotlin/com/example/harness/MainActivity.kt b/mobile/android/app/src/main/kotlin/ai/autonomous/harness/android/MainActivity.kt
similarity index 70%
rename from mobile/android/app/src/main/kotlin/com/example/harness/MainActivity.kt
rename to mobile/android/app/src/main/kotlin/ai/autonomous/harness/android/MainActivity.kt
index ae1f9a285..0e7fb372d 100644
--- a/mobile/android/app/src/main/kotlin/com/example/harness/MainActivity.kt
+++ b/mobile/android/app/src/main/kotlin/ai/autonomous/harness/android/MainActivity.kt
@@ -1,4 +1,4 @@
-package com.example.harness
+package ai.autonomous.harness.android
import io.flutter.embedding.android.FlutterActivity
diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml
index 7f5c55ebe..31670902c 100644
--- a/mobile/pubspec.yaml
+++ b/mobile/pubspec.yaml
@@ -2,7 +2,7 @@ name: harness_mobile
description: "Harness viewer for iOS and Android."
publish_to: 'none'
-version: 1.0.0+15
+version: 1.0.0+16
environment:
sdk: ^3.13.0
diff --git a/mobile/scripts/release-android.sh b/mobile/scripts/release-android.sh
new file mode 100755
index 000000000..935758536
--- /dev/null
+++ b/mobile/scripts/release-android.sh
@@ -0,0 +1,56 @@
+#!/usr/bin/env bash
+# Build the Android App Bundle for Google Play. `bash mobile/scripts/release-android.sh`
+#
+# Builds and checks; it does not upload. Play Console ▸ OpenHarness ▸ Testing / Production ▸ Create
+# release takes the .aab this prints — see mobile/RELEASE.md, "Android".
+#
+# ⚠️ THE VERSION CODE IS THE WHOLE GAME, as the build number is on iOS: Play refuses a versionCode it
+# has already seen. It is the `+N` in pubspec.yaml, shared with the iOS builds: each store keeps its
+# own count, so one `+N` can go to both, and it is bumped after an upload to either.
+#
+# Signing: the upload key and its passwords live OUTSIDE this public repo, in
+# ~/.android-release/harness-upload.properties (HARNESS_ANDROID_SIGNING overrides the path). Without
+# them android/app/build.gradle.kts falls back to the debug key, which Play refuses — so this script
+# stops before building rather than hand you a bundle that cannot be uploaded.
+set -euo pipefail
+
+ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # mobile/
+cd "$ROOT"
+
+SIGNING="${HARNESS_ANDROID_SIGNING:-$HOME/.android-release/harness-upload.properties}"
+if [[ ! -f "$SIGNING" ]]; then
+ echo "no upload key: $SIGNING is missing." >&2
+ echo "see mobile/RELEASE.md, \"Android\", for where it comes from." >&2
+ exit 1
+fi
+prop() { sed -n "s/^$1=//p" "$SIGNING" | head -1; }
+
+VERSION="$(sed -n 's/^version: *//p' pubspec.yaml | head -1)"
+echo "==> version ${VERSION%%+*}, versionCode ${VERSION##*+}"
+echo " Play must not already hold versionCode ${VERSION##*+}."
+
+echo "==> flutter build appbundle"
+flutter build appbundle --release
+
+AAB="build/app/outputs/bundle/release/app-release.aab"
+[[ -f "$AAB" ]] || { echo "no bundle at $AAB" >&2; exit 1; }
+
+# The fallback to the debug key is silent inside Gradle, so ask the bundle who signed it.
+fingerprint() { sed -n 's/^.*SHA256: *//p' | head -1; }
+SIGNED_BY="$(keytool -printcert -jarfile "$AAB" | fingerprint)"
+EXPECTED="$(keytool -list -v -keystore "$(prop storeFile)" -alias "$(prop keyAlias)" \
+ -storepass "$(prop storePassword)" | fingerprint)"
+if [[ -z "$SIGNED_BY" || "$SIGNED_BY" != "$EXPECTED" ]]; then
+ echo "!! $AAB is not signed with the upload key (signer: ${SIGNED_BY:-none})." >&2
+ echo " Play would refuse it. Check $SIGNING." >&2
+ exit 1
+fi
+
+cat <<EOF
+
+Built $AAB
+ versionCode ${VERSION##*+}, signed with the upload key ($EXPECTED)
+
+Not uploaded. Play Console -> OpenHarness -> Test and release -> Internal testing (or Production)
+-> Create new release -> upload this file. Then bump the +N in pubspec.yaml.
+EOF