| … | … | @@ -0,0 +1,50 @@ |
| 1 | # Cthuloid Lights for Android |
| 2 | |
| 3 | The cthuloid web UI as an app: the phone runs the same controller as stortron |
| 4 | (`../webui`, in a bare-kit worklet) and shows the same page in a WebView. It talks |
| 5 | to the lamps directly over the LAN, so it works with stortron down, and shares |
| 6 | slots fairly with the web UI, other phones and Blender (firmware proto 3). |
| 7 | Design: `../docs/DESIGN-android.md`. |
| 8 | |
| 9 | ## Install |
| 10 | |
| 11 | On an Android 10+ phone (arm64), open in the browser and allow "install unknown |
| 12 | apps" for it when asked: |
| 13 | |
| 14 | ``` |
| 15 | https://7rnx.net/git/releases/cthuloid/android-v0.1.0/dist/cthuloid-lights.apk |
| 16 | ``` |
| 17 | |
| 18 | Updates keep the app's data only when signed with the same key (below), so always |
| 19 | install releases from this URL. |
| 20 | |
| 21 | ## Use (0.1.0) |
| 22 | |
| 23 | Automatic lamp discovery is not in 0.1.0 yet: add a lamp once under **Add a unit |
| 24 | by address** (e.g. `192.168.50.89` for studiolight); it is remembered. Then tick |
| 25 | it and press **Connect**, as in the web UI. Off the LAN it cannot reach lamps yet. |
| 26 | |
| 27 | ## Release |
| 28 | |
| 29 | ```sh |
| 30 | git tag -a android-v0.1.1 -m "..." && git push origin android-v0.1.1 |
| 31 | ``` |
| 32 | |
| 33 | The forge builds on `android-v<x.y.z>` tags only (`../.pear-git/ci.yaml`); the |
| 34 | version comes from the tag. Other pushes publish just a `skipped.txt`. |
| 35 | |
| 36 | ⛔ **Signing key:** `~/android-toolchain/cthuloid.keystore` (+ `.pass`) on tabertron, |
| 37 | never in git. Android refuses an update signed with any other key -- losing it |
| 38 | means every phone must uninstall (and lose its data). Back it up. |
| 39 | |
| 40 | ## Build locally |
| 41 | |
| 42 | ```sh |
| 43 | npm install |
| 44 | npm run prebuild:android # embed page files, bare-pack the worklet, stage addons |
| 45 | JAVA_HOME=~/android-toolchain/jdk-17.0.13+11 ANDROID_HOME=~/android-toolchain/sdk \ |
| 46 | ~/android-toolchain/gradle-8.13/bin/gradle -p android assembleRelease |
| 47 | npm test # worklet tests (brittle-bare) |
| 48 | ``` |
| 49 | |
| 50 | Without `CTHULOID_KEYSTORE` the release APK is unsigned (not installable). |