Add Android control app and embedded server

Inspired by HNKServer/honoka-chan-apk-server, but implemented as a JNI-based embedded runtime instead of the original approach.

- Add an Android Compose controller app that starts and stops honoka-chan through JNI, shows runtime and health status, manages data directory mounting, and supports backup import/export for data.db
- Add an embeddable Go server entrypoint plus JNI-exported status, health, and reload hooks so desktop and Android builds share the same startup and shutdown path
- Add Android build scripts, runtime packaging, and project documentation, including generated default config.json content for honoka_runtime.zip
- Add runtime bundle hash tracking so updated honoka_runtime.zip assets are automatically redeployed while preserving config.json and user data files
- Add in-app service settings for unlock_all_special_rotation with immediate config persistence and automatic reload when the service is running
- Split SQLite driver selection by platform, using go-sqlite3 on Android and modernc.org/sqlite elsewhere to avoid Android x86_64 seccomp crashes
- Update startup, database initialization, and system health/reload handlers to support the embedded runtime and Android control flow

Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
2026-06-12 19:17:21 +08:00
parent 5c2d68f979
commit 91bbc7f607
64 changed files with 3230 additions and 286 deletions
+21
View File
@@ -0,0 +1,21 @@
package systemschema
type HealthResp struct {
Status string `json:"status"`
AppName string `json:"app_name"`
Version string `json:"version"`
StartedAt string `json:"started_at"`
UptimeSeconds int64 `json:"uptime_seconds"`
LastReloadAt string `json:"last_reload_at,omitempty"`
ListenPort string `json:"listen_port"`
CdnServer string `json:"cdn_server"`
ReloadTokenConfigured bool `json:"reload_token_configured"`
MainDB string `json:"main_db"`
UserDB string `json:"user_db"`
}
type ReloadResp struct {
Status string `json:"status"`
Message string `json:"message"`
ReloadedAt string `json:"reloaded_at,omitempty"`
}