Files
YumeMichi 91bbc7f607 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>
2026-06-12 19:17:21 +08:00

39 lines
1.6 KiB
Markdown

# 运行测试
前面的步骤完成后,就可以开始联调。
## 配置文件检查
第一次启动 `honoka-chan` 后会生成 `config.json`。需要确认:
- `settings.cdn_server` 指向你的数据下载地址
- `settings.reload_token` 可选;如果需要通过接口热重载 `config.json`,需要先设置一个 token
- `settings.unlock_all_special_rotation` 可选;设为 `true` 后会忽略日替时间限制,直接解锁全部日替特殊歌曲,不包含周替 `MASTER`
- 如果数据直接放在本项目的 `static` 目录下,通常可以配置成类似 `http://192.168.1.123/static`
如果 `cdn_server/{系统}/archives/99_0_115.zip` 存在,服务端会自动把它追加到更新下载列表;如果不存在,则会直接跳过。
## 登录与下载测试
客户端登录方式为 `手机号密码登录`。这里的手机号和密码都可以随便填写:
- 第一次使用的手机号会自动创建账号
- 之后再次使用同一个手机号时,会沿用之前保存的密码和游戏内设置
进入游戏后,按提示下载数据,确认下载过程正常完成。
下载完成后即可进入游戏。
## 补充说明
- `GET /system/health` 可用于检查应用和数据库是否正常运行
- `POST /system/reload?token=你的token` 可在修改 `config.json` 后重新加载配置
SIF 的“全量数据下载”实际上并不是真正的全量。部分剧情资源仍然需要通过 `/download/getUrl` 接口按路径拉取。
所以除了 `archives` 目录里的压缩包,还需要另外维护一份:
- zip 全部解压后的资源目录
这部分内容后面再补充。