diff --git a/README.md b/README.md index 9bb7640a..889370e8 100644 --- a/README.md +++ b/README.md @@ -2,24 +2,73 @@ Open-source Flutter client for MeshCore LoRa mesh networking devices. -> **Fork tth:** build bez on-device ML (překlad zpráv, neuronový kodek -> obrázků) a jen pro arm64 — APK má ~40 MB místo ~340 MB. Jinak shodné -> s upstreamem `dev`, který se slévá každou noc; co a proč je jinak: -> [`stubs/README.md`](stubs/README.md), build: `.gitea/workflows/build.yml`. -> -> **Soukromí:** žádné volání třetích stran bez tvého úkonu. GIFy (Giphy) se -> načtou jen v chatu se zapnutými obrázky z URL (výchozí stav je vypnuto), -> jinak až po klepnutí. Bez affiliate banneru. Mapa, Line of sight, GIF picker -> a síťová mapa sahají ven jen na vyžádání. -> -> **Instalace přes Obtainium:** naskenuj QR telefonem, nebo na telefonu otevři -> [tenhle odkaz](https://apps.obtainium.imranr.dev/redirect?r=obtainium%3A%2F%2Fapp%2F%257B%2522id%2522%253A%2522com.meshcore.meshcore_open%2522%252C%2522url%2522%253A%2522https%253A%252F%252Fgit.rfa.cz%252Ftth-pub%252Fmeshcore-open%2522%252C%2522author%2522%253A%2522tth%2522%252C%2522name%2522%253A%2522MeshCore%2520Open%2520%2528tth%2529%2522%252C%2522preferredApkIndex%2522%253A0%252C%2522additionalSettings%2522%253A%2522%257B%257D%2522%252C%2522overrideSource%2522%253A%2522Codeberg%2522%257D). -> -> QR pro Obtainium -> -> Ručně: Obtainium → Add App → URL `https://git.rfa.cz/tth-pub/meshcore-open`, -> „Override source" = **Forgejo (Codeberg)**. Releases jsou podepsané vlastním -> klíčem, takže přes upstreamové APK se neaktualizují (a naopak). +## This fork (tth) + +A personal build of upstream [zjs81/meshcore-open](https://github.com/zjs81/meshcore-open). +Upstream `dev` is merged every night (`.gitea/workflows/build.yml`), tested, +built as a signed arm64 APK and published as a release here. Everything else +in this README describes upstream and still applies. + +**What is different** + +- **No on-device ML, arm64 only — ~40 MB instead of ~340 MB.** Message + translation and the neural image codec are replaced by stubs + ([`stubs/README.md`](stubs/README.md)) and their settings are hidden, so + nothing offers to download models of up to 835 MB. +- **No third-party requests without asking.** A received GIF code loads from + Giphy only in a chat with "images from URLs" enabled (off by default), + otherwise after a tap; reply quotes follow the same setting. The affiliate + "get a node" banner on the connect screen is gone. Map tiles, line of sight, + the GIF picker and the network map reach out only when you use them. +- **Repeater screens do not query the mesh on open.** Upstream fetches as + soon as you open a repeater's settings (a dozen CLI requests over the + mesh), status, telemetry or neighbours. Here each screen waits for its + refresh button (`kFetchRemoteOnOpen` in `lib/tth_fork.dart`); your own + node's telemetry, which is local, still loads on open. +- **Terminal theme** — Settings → Appearance → *Term*, next to + System/Light/Dark: pure black, green accent, JetBrains Mono, no rounded + corners, tight paddings and line height. Chats become IRC lines across the + full width, own messages on the left too, no avatars or bubbles: + + ``` + ↳ anyone hear me from the hill? + 14:02 yes, -98 dBm, SNR 4.5 [2 hops] ✓ + ``` + + Channel and contact lists are flat rows at about half the height, the + bottom bar is a square strip of icons and the map overlays are square + black panels. Other themes are unchanged. +- **Home-screen widget (1×1)** — "MeshCore unread": + + ``` + dm 3 unread direct messages + ch 12 unread channel messages + bt 87% companion battery + ``` + + The last line reads `cmp off` when the companion is disconnected and + `app off` when the app is closed (on exit at once; if the system killed + it, within about 15–45 minutes). Tap opens the app. +- **Fix:** `shared_preferences_android` pinned to 2.4.28 — 2.5.0 crashes on + start under R8 (black screen). + +The fork-only code is kept in separate files where possible +(`lib/tth_fork.dart`, `lib/theme/terminal_theme.dart`, +`lib/widgets/terminal_message_line.dart`, +`lib/services/home_widget_bridge.dart`, `UnreadWidget.kt`) with one-line +hooks into upstream files, so the nightly merge rarely conflicts. + +**Install with Obtainium** + +Scan the QR code with the phone, or open +[this link](https://apps.obtainium.imranr.dev/redirect?r=obtainium%3A%2F%2Fapp%2F%257B%2522id%2522%253A%2522com.meshcore.meshcore_open%2522%252C%2522url%2522%253A%2522https%253A%252F%252Fgit.rfa.cz%252Ftth-pub%252Fmeshcore-open%2522%252C%2522author%2522%253A%2522tth%2522%252C%2522name%2522%253A%2522MeshCore%2520Open%2520%2528tth%2529%2522%252C%2522preferredApkIndex%2522%253A0%252C%2522additionalSettings%2522%253A%2522%257B%257D%2522%252C%2522overrideSource%2522%253A%2522Codeberg%2522%257D) +on it. + +Obtainium QR code + +By hand: Obtainium → Add App → URL `https://git.rfa.cz/tth-pub/meshcore-open`, +"Override source" = **Forgejo (Codeberg)**. Releases are signed with the +fork's own key, so they do not update over the upstream APK (and vice versa). ## Overview diff --git a/stubs/README.md b/stubs/README.md index f19ad6f8..76610afd 100644 --- a/stubs/README.md +++ b/stubs/README.md @@ -1,13 +1,14 @@ -# Stuby nativních ML balíčků (fork tth) +# Stubs of the native ML packages (tth fork) -`pubspec.yaml` je přes `dependency_overrides` podstrčí místo -`llamadart`, `flutter_onnxruntime` a `flutter_langdetect`. Mají jen to API, -které aplikace volá, a každé volání vyhodí `UnsupportedError`. Do APK se tak -nedostanou nativní knihovny llama.cpp / LiteRT-LM / ONNX Runtime (~200 MB) -a `lib/` zůstává shodné s upstreamem. +`pubspec.yaml` substitutes them through `dependency_overrides` for +`llamadart`, `flutter_onnxruntime` and `flutter_langdetect`. They carry only +the API the app calls, and every call throws `UnsupportedError`. The native +llama.cpp / LiteRT-LM / ONNX Runtime libraries (~200 MB) therefore never get +into the APK, and the ML code in `lib/` stays as it is upstream. -Důsledek: překlad zpráv a neuronový obrázkový kodek nefungují. Obě funkce jsou -v upstreamu ve výchozím stavu vypnuté a aplikace chybu zachytí a zaloguje. +Consequence: message translation and the neural image codec do not work. +Both are off by default upstream, the app catches and logs the error, and the +fork hides their settings (`kOnDeviceMl` in `lib/tth_fork.dart`). -Když upstream začne volat další symbol, build spadne na chybějícím -identifikátoru — doplň ho sem. +When upstream starts calling another symbol, the build fails on the missing +identifier — add it here.