Builds the Internal Beta product app for Android. Companion to the
Linux desktop build already shipped at the same tag.
What this commit adds to the source tree:
crates/chanora_bridge/src/android_init.rs (new):
JNI lifecycle for Android. JNI_OnLoad captures the JavaVM*.
Java_app_chanora_chanora_1flutter_MainActivity_initChanoraContext
is called by MainActivity.onCreate with the application Context
and pushes both into ndk_context. Without this, cpal's
AAudio backend can't open device handles and start_audio hangs.
crates/chanora_bridge/Cargo.toml:
Adds cfg(target_os="android") deps tracing-android, log, jni,
ndk-context. Linux/desktop builds are unaffected.
crates/chanora_bridge/src/lib.rs:
Conditionally includes the android_init module on Android.
crates/chanora_bridge/src/api.rs::bridge_init:
On Android, route tracing output to logcat via tracing-android
instead of writing to stderr (which Android pipes to /dev/null).
Logs show under `adb logcat -s chanora`.
apps/chanora_flutter/android/app/src/main/AndroidManifest.xml:
Adds uses-permission android.permission.INTERNET (needed for
the protocol layer) and android.permission.RECORD_AUDIO (needed
by chanora_audio's capture stream). Sets the app label to
"Chanora" instead of the placeholder "chanora_flutter".
apps/chanora_flutter/android/app/src/main/kotlin/.../MainActivity.kt:
Overrides the Flutter-generated MainActivity. Loads
libchanora_bridge.so eagerly at class-init so JNI_OnLoad runs
before any FRB call. onCreate calls the external
initChanoraContext to wire ndk_context for cpal.
apps/chanora_flutter/pubspec.yaml:
Bumps version 1.0.0+1 → 0.2.0+2 to match the v0.2.0-beta.1 tag.
run-chanora.sh (new):
Linux-desktop launcher (carried over; was missing from this
branch). Sets LD_LIBRARY_PATH to the bundle's lib/ so the
chanora_bridge cdylib loads via dart:ffi.
Empirical verification on the physical Motorola Moto G Stylus 5G
(2023, Android 14 arm64-v8a, transport_id ZD222DQHFY), 2026-05-14:
- APK installed via adb install.
- Activity launched; permissions granted.
- Connect form filled with 175.178.125.23 (Vigorous Pro's IP —
see honest limitation below); Connect button tapped.
- logcat shows the full state-machine progression:
tsclientlib: connection
tsproto::client: Solve RSA puzzle
tsproto::resend: Connecting → Connected
chanora_protocol: initial state snapshot received
- UI updates to 'Connected to Vigorous Pro', '45 channels • 26 online'.
- Welcome banner with CJK characters preserved verbatim.
- 'Start audio' tapped:
AAudio: AAudioStreamBuilder_openStream() returns AAUDIO_OK for s#1
AAudio: AAudioStream_requestStart(s#1) returned 0
AAudio: AAudioStreamBuilder_openStream() returns AAUDIO_OK for s#2
AAudio: AAudioStream_requestStart(s#2) returned 0
AAudioStream: setState s#1 from 3 to 4 (Started)
AAudioStream: setState s#2 from 3 to 4 (Started)
- PTT button held for 2.5 s:
UI shows: 'TX 124 frames • RX 0 frames • PTT off'.
124 frames / 2.5 s ≈ 50 frames/s = 20 ms Opus frames — exactly
the encoder cadence. Voice transmission proven over UDP to the
real server.
Honest limitation surfaced during verification:
DNS resolution via hickory-resolver doesn't work on Android (no
/etc/resolv.conf). Connecting by hostname produces:
BridgeError.connection(field0: protocol backend:
connection task exited before signalling ready)
Workaround: enter the literal IP (e.g. 175.178.125.23 for
cn.teamspeak.app). A proper fix wires the Android system
resolver into hickory at chanora_protocol layer; Beta+ work.
Build prerequisites (documented for reproducibility):
- Android NDK r26.3.11579264 at /opt/android-sdk/ndk/26.3.11579264.
- rustup targets: aarch64-linux-android, armv7-linux-androideabi,
x86_64-linux-android.
- cargo-ndk 4.x.
- Pre-built libopus.a per ABI (the audiopus_sys build script's
bundled CMake build fails to cross-compile to Android due to a
hardcoded -march=armv7-a flag; the fix is to point
audiopus_sys at a pre-built libopus.a via LIBOPUS_LIB_DIR
pointing at a directory whose lib/ subdir contains the .a).
Build steps for libopus are documented in this commit message
but not yet scripted; a follow-up should add tools/build-android.sh.
- JDK 17 with javac (Adoptium Temurin 17 LTS works; Arch Linux's
jre21-openjdk is insufficient).
ABIs built and shipped in the APK:
arm64-v8a, armeabi-v7a, x86_64.
Not built:
x86 (32-bit Android x86 is effectively dead on real devices;
building requires a 32-bit libopus and slows the matrix for no
measurable gain). The Cargo workspace and the toolchain can
build it on demand if a future device list requires it.
Chanora
Chanora is a cross-platform voice communication client for TeamSpeak-compatible servers.
It is built with a shared Flutter UI and a Rust core, with TeamSpeak-compatible protocol integration isolated behind tsclientlib.
Flutter UI + Rust Core + tsclientlib
Chanora is an independent project and is not affiliated with, endorsed by, sponsored by, or officially associated with TeamSpeak.
Status
Chanora is currently in early planning and baseline-candidate design.
Current documentation baseline: v0.9.2
Current status: Baseline Candidate
Implementation status: Not production-ready
The current engineering focus is:
- defining the system and software architecture;
- preparing the Flutter + Rust application structure;
- validating TeamSpeak-compatible protocol integration through
tsclientlib; - defining cross-platform audio behavior;
- preparing release, verification, security, privacy, and legal gates.
Target Platforms
Chanora is intended to support:
- Windows
- macOS
- Linux
- Android
- iOS / iPadOS
Current platform policy:
| Platform | Baseline |
|---|---|
| iOS / iPadOS runtime target | iOS 13+ unless Flutter, plugin, audio, or product constraints require raising it |
| App Store Connect upload gate | Xcode 26+ with iOS 26 / iPadOS 26 SDK+ for upload on or after 2026-04-28 |
| Android runtime target | Android API 24+ unless Flutter, plugin, audio, or product constraints require raising it |
| Google Play target API | Target the Google Play-required API level on upload date |
The App Store / Play Store upload gates are release requirements. They are separate from local development and internal testing requirements.
Architecture Overview
Chanora separates UI, protocol logic, state synchronization, audio processing, diagnostics, and platform services.
Flutter Application
├─ App Shell
├─ Material 3 / Chanora Design System
├─ Feature Modules
├─ View Models / State
└─ Typed Flutter/Rust Bridge
Rust Core
├─ Connection Manager
├─ State Synchronization
├─ Protocol Adapter
├─ Audio Subsystem
├─ Storage Services
└─ Diagnostics
Protocol Layer
└─ tsclientlib
└─ TeamSpeak-compatible server
Key architecture rules:
- Flutter does not call
tsclientlibdirectly. - Protocol-specific types do not leak into the Flutter UI layer.
- Rust Core owns protocol coordination, state synchronization, audio logic, storage services, diagnostics, and bridge-facing DTOs.
- Flutter owns presentation, navigation, Material 3 theming, accessibility, localization presentation, and platform UI behavior.
- Product localization and server-provided content are separated.
- UTF-8 is the internal cross-layer text representation.
- Non-UTF-8 conversion, if needed, occurs only at explicit protocol or platform boundaries.
MVP Direction
The current recommended MVP scope is:
| Area | MVP decision |
|---|---|
| Active server connections | One active server connection per client instance |
| UI baseline | Material 3 + Chanora Design System |
| Product language | English UI first, i18n-ready architecture |
| Server content | Preserve Unicode and do not translate server-provided content |
| Audio processing defaults | Echo Canceller, Automatic Gain Control, Noise Suppression, and High-Pass Filter enabled where supported and stable |
| Audio implementation path | Platform-native first; fallback isolated behind the audio subsystem |
| Local non-secret storage | SQLite or equivalent embedded database |
| Secret storage | Platform secure storage |
| Flutter/Rust bridge | Stable typed bridge with generated or schema-controlled DTOs |
| Diagnostics | Local, user-initiated export only |
| Telemetry | None in MVP |
| Crash reporting | Disabled unless explicitly approved later |
Repository Layout
The repository documentation is expected to live under docs/.
docs/
requirements/
sysrs.md
srs.md
architecture/
sysdes.md
sad.md
sdd.md
verification/
verification-master-plan.md
swe4-unit-verification-plan.md
swe5-software-integration-verification-plan.md
swe6-software-verification-plan.md
sys4-system-integration-verification-plan.md
release/
release-readiness-go-nogo-record.md
platform-release-policy.md
security/
security-privacy-legal-guideline.md
threat-model.md
secure-storage-audit-report.md
diagnostic-redaction-audit-report.md
dependency-and-supply-chain-report.md
privacy/
privacy-policy.md
legal/
trademark-and-attribution-review.md
ui-ux/
material3-guideline.md
material3-design-tokens.md
material3-component-catalog.md
adaptive-layout-platform-guide.md
i18n/
localization-architecture.md
governance/
document-index.md
document-naming-convention.md
traceability-matrix.md
baseline-approval-record.md
baseline-candidate-validation-report.md
document-review-report.md
product-decision-register.md
decision-impact-assessment.md
git-commit-message-convention.md
repo-format-validation-report.md
path-migration-map.md
references/
external-references.md
aspice-swe2-swe3-integration-note.md
Implementation source folders may be added later. A likely structure is:
apps/
chanora_flutter/
core/
chanora_core/
crates/
chanora_protocol/
chanora_audio/
chanora_state/
chanora_storage/
chanora_diagnostics/
chanora_bridge/
The exact implementation layout should be finalized when the repository scaffold is created.
Documentation Entry Points
Start here:
| Topic | Document |
|---|---|
| System requirements | docs/requirements/sysrs.md |
| Software requirements | docs/requirements/srs.md |
| System architecture | docs/architecture/sysdes.md |
| Software architecture | docs/architecture/sad.md |
| Software detailed design | docs/architecture/sdd.md |
| Verification strategy | docs/verification/verification-master-plan.md |
| Release readiness | docs/release/release-readiness-go-nogo-record.md |
| Platform release policy | docs/release/platform-release-policy.md |
| Product decisions | docs/governance/product-decision-register.md |
| Traceability | docs/governance/traceability-matrix.md |
| Security/privacy/legal gates | docs/security/security-privacy-legal-guideline.md |
Engineering Process
Chanora follows this documentation hierarchy:
SysRS -> SysDes -> SRS -> SAD -> SDD
Direct traceability rules:
| Document | Direct upstream source |
|---|---|
| SysDes | SysRS |
| SRS | SysDes only |
| SAD | SRS only |
| SDD | SAD only |
Verification mapping:
SDD -> SWE.4 Unit Verification
SAD + SDD -> SWE.5 Software Integration Verification
SRS -> SWE.6 Software Verification
SysDes -> SYS.4 System Integration Verification
Release readiness is tracked separately through the Go/No-Go record.
Release Readiness
A release is not approved by design documents alone.
Before an external or public release, the project must complete:
docs/release/release-readiness-go-nogo-record.md
The release decision must explicitly state:
Go
Conditional Go
No-Go
Release readiness must include:
- release scope;
- build number;
- commit SHA;
- Git tag;
- artifact hashes;
- satisfied P0/MVP requirements;
- deferred requirements;
- verification results;
- waivers;
- security review status;
- platform readiness;
- legal and OSS review status;
- privacy policy status;
- approval decision and approvers.
Security, Privacy, and Legal Gates
Security, privacy, and legal evidence are required before public or store release.
Required documents include:
docs/security/threat-model.md
docs/security/secure-storage-audit-report.md
docs/security/diagnostic-redaction-audit-report.md
docs/security/dependency-and-supply-chain-report.md
docs/privacy/privacy-policy.md
docs/legal/trademark-and-attribution-review.md
Important gates:
- identity secrets and server passwords must use platform secure storage;
- logs and diagnostic exports must redact secrets;
- diagnostic export must be user-initiated unless a later approved policy changes this;
- dependency licenses and vulnerabilities must be reviewed;
- OSS notices must be prepared where required;
- public wording must not imply official TeamSpeak affiliation;
- privacy policy must describe local storage, diagnostics, permissions, and data handling.
Git Commit Convention
Chanora uses a Conventional Commits style format:
<type>(<scope>): <summary>
Examples:
feat(voice): add push-to-talk state handling
fix(protocol): recover channel tree after reconnect snapshot
docs(sad): add interface catalog and performance view
i18n(ui): add fallback behavior for missing localization keys
sec(diagnostics): redact server password from export bundle
release(android): prepare internal alpha build metadata
See:
docs/governance/git-commit-message-convention.md
Development
Implementation commands will be added after the repository scaffold is finalized.
Expected future commands may include:
flutter pub get
flutter test
cargo test
cargo clippy
cargo fmt
Do not treat these as authoritative until the actual Flutter/Rust workspace has been created.
Contributing
Before making a change:
- Check the affected requirement/design document.
- Confirm the correct traceability layer.
- Use the Git commit convention.
- Update docs and verification plans when the change affects requirements, architecture, detailed design, release behavior, security, privacy, or legal gates.
License
Chanora is dual-licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option. This dual-license model was Accepted on 2026-05-14
as decision DEC-020 in
docs/governance/product-decision-register.md.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Chanora by you, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.
Third-party software bundled or linked by Chanora is listed in
NOTICE with its own licenses. The complete legal review of
the dependency tree (DEC-012) must complete before any public/store
release. See:
docs/governance/product-decision-register.md
docs/security/dependency-and-supply-chain-report.md
docs/legal/trademark-and-attribution-review.md