Windows 游戏的 Android 运行器 —— 导入即玩,自动识别引擎并路由到原生或模拟层。 A standalone Android player for Windows games: import a folder, auto-detect the engine, and play.
GameShell 是独立的 Windows 游戏安卓运行器,内嵌 brunodev85/winlator-app(LGPL-2.1)作为 Windows 模拟层源码组件——集成与修改标注方式同内嵌的 Kirikiroid2 / Ren'Py,见 NOTICE。它在 APK 内同时内嵌 Ren'Py 与 Kirikiri2 原生运行时,导入游戏文件夹后自动识别引擎(当前覆盖 18 种引擎指纹 + UNKNOWN 兜底),在「内嵌原生引擎 / 外部原生播放器(可选)/ Winlator 模拟」之间智能路由,无需手工配置 Wine 容器。
- 导入即玩:选定游戏目录后自动创建专属容器、复制游戏文件、注入运行环境,导入完成即从封面墙启动。
- 内嵌原生引擎:APK 内嵌 Ren'Py 8.5.3(
librenpython.so,Python 3.12.8)与 Kirikiri2 / Kirikiroid2(libgame.so),识别到对应引擎的游戏由进程内直启渲染。 - 引擎识别与 A/B 双路由:通过 18 种引擎指纹(Siglus / YU-RIS / Artemis / CatSystem2 / AdvHD / SystemNNN / BGI / CMVS / Unity 等)+ UNKNOWN 兜底自动选择运行方式;
detectDeep()支持有限深度下钻。 - 一键日文化:自动注入
LC_ALL=ja_JP.UTF-8区域环境与日文字体配置,解决日文游戏乱码(不为日文注入额外分发字体;APK 内仅含引擎自带字体)。 - 游戏内视频播放:自动启用 DirectShow / Windows Media 解码,老游戏开场动画与过场视频可正常播放。
- 存档重定向:存档统一重定向到 S: 盘与 Shell Folder,便携存档自动「先搬后链」,支持导出与恢复。
- 诊断向导与日志:GPU、日文显示、视频解码、位宽、音频、加密逐项检查;日志自动提取要害行。
- 统一游戏库:导入、启动、诊断、日志、存档、原生路由开关集中在一处。
- 批量导入:选一个目录(如 Download)自动扫出候选游戏,勾选后串行导入并逐条汇报;误报只多拷一次,游戏判定仍以导入管线的真实检测为准。
- 游戏库分类:库页顶部 chips 单选过滤——引擎自动归类(多于一种引擎时出现)、预置内容品类(视觉小说 / 文字冒险 / 其他)、自定义标签;长按多选后「品类 / 标签」可一次给多张卡归类,标签支持内联新建。
引擎路由:导入后由 EngineDetector 判定引擎类型,优先走内嵌原生引擎(B 路由),不可用时可唤起外部原生播放器作为可选回退,其余游戏走 Winlator Box64+Wine 模拟层(A 路由)。
导入流程:选择文件夹 → 引擎识别 → 创建容器并注入区域/字体 → 封面墙入库 → 点按启动。全程向导对话框分步显示进度。
KiriKiri 的启动对话框:KiriKiri 每次启动会弹「窗口尺寸确认」,这是引擎/游戏侧不落盘的持久化行为(见
docs/tech-debt-register.mdTD-15)。请选不大于容器分辨率的一档——容器是硬上限,超了会被算成裁切。首次手动点一次后本机会记住落点,下次同尺寸对话框自动跳过;对话框出现、且这台设备上还没有记录时,底部会提示本容器的推荐档位(由容器分辨率算出,容器之内最大档)。
仓库架构:依据仓库真实目录结构绘制,展示
app/、ci/、docs/、tools/与内嵌 Winlator 组件的关系。
以下截图在 x86_64 模拟器(API 30,SwiftShader 软件渲染)上用 ./gradlew assembleDebug -PgalgameUiAbi=x86_64 构建的 UI 调试包截取。
![]() |
![]() |
| 游戏库:空态封面墙,含搜索与「导入游戏」入口 | 设置:运行环境、输入控制、诊断等入口集中处 |
注:容器与运行环境的管理入口在「设置 → 开发者 → 高级设置」;完整真机(ARM64 + Vulkan)验收记录见
docs/real-device-verification.md。
- JDK 17
- Android SDK(platform-35、NDK 24.0.8215888)
- Git(用于从 Winlator 组件官方仓库补齐运行时资源)
本仓库的运行时资源部分随源码分发:
- git 跟踪(7 个文件,84,315,138 字节 ≈ 80.4 MiB):box64 0.4.5 运行时
app/src/main/assets/box64/box64-0.4.5.tzst与box64-0.4.5-gstfix.tzst,以及app/src/main/jniLibs/arm64-v8a/下 5 个原生库librenpython.so/libgame.so/libffmpeg.so/libSDL2.so/libmpshim.so。.gitignore的*.tzst/*.so规则只挡新增 untracked 文件,不影响这些已跟踪文件。 - 不跟踪(clone 后缺失,需补齐):Wine 侧运行时
rootfs.tzst、rootfs_patches.tzst、pulseaudio.tzst、container_pattern.tzst与wincomponents/。因此 clone 之后不能直接./gradlew assembleDebug出完整可用的 APK,需先从 Winlator 组件官方仓库取回这部分资源(upstream远端即组件官方仓库,兼作按需移植官方修复的来源):
git clone https://github.com/ReSerendipity/GameShell.git
cd GameShell
# 只取回不入库的 Wine 侧运行时(按路径精确指定;只落工作区,不写索引)
git remote add upstream https://github.com/brunodev85/winlator-app
git fetch upstream
git restore --source=upstream/main --worktree -- \
app/src/main/assets/rootfs.tzst \
app/src/main/assets/rootfs_patches.tzst \
app/src/main/assets/pulseaudio.tzst \
app/src/main/assets/container_pattern.tzst \
app/src/main/assets/wincomponents
⚠️ 不要用git checkout upstream/main -- <路径>:带 tree-ish 的 checkout 会写索引,把本应排除的大二进制纳入暂存。用git restore --worktree形式保持git status干净;也不要对app/src/main/assets/app/src/main/jniLibs整目录 restore——其中已跟踪的 7 个二进制会被上游版本覆盖并弄脏工作树。
# 项目根目录 local.properties
echo "sdk.dir=/path/to/android-sdk" > local.properties
./gradlew assembleDebug输出 APK:app/build/outputs/apk/debug/app-debug.apk。
若只想验证框架侧代码(无需 Android SDK,仅需 JDK 17),执行与 CI galgame-compile job 一致的三步 javac 检查:
rm -rf /tmp/stubs-out /tmp/check /tmp/hot
mkdir -p /tmp/stubs-out /tmp/check /tmp/hot
javac -d /tmp/stubs-out $(find ci/stubs -name '*.java')
javac -Xlint:all -cp /tmp/stubs-out -d /tmp/check $(find app/src/main/java/com/winlator/galgame -name '*.java')
javac -Xlint:all -cp /tmp/stubs-out:/tmp/check -d /tmp/hot \
$(grep -vE '^[[:space:]]*(#|$)' ci/hotspot-entries.txt)| 项目 | 要求 |
|---|---|
| Android 版本 | 11(API 30)或更高 |
| CPU 架构 | ARM64(arm64-v8a) |
| GPU | 支持 Vulkan 1.1+;Mali GPU 可走 Vortek / VirGL 兜底 |
| 存储 | 预留 8–16 GB |
| 内存 | 建议 12 GB 及以上 |
| 不支持 | 无 Vulkan 能力的设备(如部分 Kirin 平台) |
模拟器 UI 调试:可用
-PgalgameUiAbi=x86_64构建 x86_64 APK 仅调试 UI 层(游戏库/主题/布局),此模式跳过原生编译,但 Wine/Box64 运行时不可用。
- 安装 APK 后打开应用,进入游戏库封面墙;设置从报头右侧的设置按钮进入(容器与运行环境管理在「设置 → 开发者 → 高级设置」)。
- 点「导入游戏」选择存放游戏的文件夹(启动 exe 须在所选文件夹顶层)。
- 向导自动检测引擎、创建容器、复制文件并注入日文环境。
- 回到游戏库,点封面墙中的游戏卡片进入详情页(启动、诊断、导出存档、切换运行方式都在详情页)。
- 长按卡片进入多选,可批量归类品类/标签。
Q:构建报错找不到 rootfs.tzst / wincomponents 等 Wine 侧运行时?
A:Wine 侧运行时不入库。按上文「克隆并补齐运行时资源」一节对缺失路径执行 git restore --source=upstream/main --worktree -- <路径>(box64 .tzst 与 jniLibs 的 5 个 .so 已随仓库分发,无需补齐)。
Q:./gradlew 下载 gradle-9.9.1-bin.zip 失败(PKIX 报错)?
A:代理/TLS 拦截导致。先检查 ~/.gradle/wrapper/dists/ 是否有完整版本,有则直接调用其二进制加 --offline;详见上文与 ci/pre-push。
Q:支持哪些引擎?
A:当前识别 18 种引擎指纹 + UNKNOWN 兜底,包括 SiglusEngine、YU-RIS、Artemis、CatSystem2、AdvHD、SystemNNN、BGI、CMVS、Unity 等;识别逻辑见 app/src/main/java/com/winlator/galgame/。
Q:检测到加密怎么办? A:应用仅作提示,不做破解。请自备已合法获得的、可直接运行的游戏文件。
Q:为什么 Release 里没有 APK? A:本项目为源码分发,Release 仅附源码 SBOM(CycloneDX)与 SHA256SUMS。完整 APK 需自行按上文构建,或从可信渠道获取。
- 原生引擎内嵌方案
- 引擎兼容性与排障
- 2026-11-28 代码审查与安全审计
- 组件版本登记表
- 真机验证报告
- 发布 / 回滚规范
- 技术债登记表
- 完整文档索引(含架构评审、评估与复盘记录):docs/README.md
- 欢迎 Issue 与 PR。本仓采用 DCO:所有提交须带
Signed-off-by(git commit -s自动追加)。 - 本地类型门禁:
cp ci/pre-push .git/hooks/pre-push && chmod +x .git/hooks/pre-push - 改动 Winlator 组件文件前,先核对
ci/zero-mod-exceptions.md——它同时是 LGPL-2.1 §2 的修改标注与移植官方修复时的冲突面清单。 - 详细贡献指南见
docs/CONTRIBUTING.md
整体以 LGPL-2.1 发布:Winlator 组件部分继承 LGPL-2.1(不可更授),GameShell 增量层亦以 LGPL-2.1 发布(自主选择,保持整仓单许可证,见决策 A8)。第三方组件与字体政策详见 NOTICE。
GameShell is a standalone Android player for Windows games that embeds Winlator (LGPL-2.1) as its Windows-emulation source component — with modifications marked, same pattern as the bundled Kirikiroid2 / Ren'Py engines (see NOTICE). It also embeds Ren'Py and Kirikiri2 native runtimes inside the APK. After you pick a game folder, GameShell auto-detects the engine (18 engine fingerprints plus an UNKNOWN fallback) and routes the game to the embedded native engine, an optional external native player, or the Winlator emulation layer — no manual Wine container configuration needed.
Governance: ReSerendipity/.github/governance
- Import and play: Pick a game folder; GameShell creates an isolated container, copies files, and injects the runtime. Tap the cover art to launch.
- Embedded native engines: Ren'Py 8.5.3 (
librenpython.so, Python 3.12.8) and Kirikiri2 / Kirikiroid2 (libgame.so) are bundled; matching games run in-process without Wine. - Engine detection and A/B routing: 18 engine fingerprints (Siglus / YU-RIS / Artemis / CatSystem2 / AdvHD / SystemNNN / BGI / CMVS / Unity …) plus an UNKNOWN fallback;
detectDeep()supports bounded deep scanning. - One-tap Japanese locale: Auto-injects
ja_JP.UTF-8and configures Japanese fonts to fix mojibake (no extra fonts are bundled; only fonts shipped with the embedded engines are present). - In-game video: Auto-enables DirectShow / Windows Media decoding for intros and cutscenes.
- Save redirection: Saves are redirected to drive S: and Shell Folder; portable saves are relocated and symlinked; export/restore supported.
- Diagnostics wizard and logs: Step-by-step checks for GPU, Japanese display, video decode, bit width, audio, and encryption; logs auto-extract relevant lines.
- Unified game library: Import, launch, diagnose, logs, saves, and native-route toggles in one place.
Engine routing: After import, EngineDetector picks the route — embedded native engine (Route B, default), optional external native player fallback, or Winlator Box64+Wine emulation (Route A).
Import flow: Pick folder → detect engine → create container and inject locale/fonts → appear in cover wall → tap to launch. Progress is shown step by step in a wizard dialog.
Repository architecture: Drawn from the actual directory tree, showing
app/,ci/,docs/,tools/, and the embedded Winlator component.
The screenshots below were captured on an x86_64 emulator (API 30, SwiftShader software rendering) running the UI debug build (./gradlew assembleDebug -PgalgameUiAbi=x86_64).
![]() |
![]() |
| Library: empty cover wall with search and "Import Game" entry | Settings: runtime, input controls, diagnostics, and other entries |
Note: Container and runtime management are under Settings → Developer → Advanced Settings. Full ARM64 + Vulkan real-device verification records are in
docs/real-device-verification.md.
- JDK 17
- Android SDK (platform-35, NDK 24.0.8215888)
- Git (to fetch runtime assets from upstream)
Runtime assets are partly distributed with the source: 7 Git-tracked files (~80.4 MiB) — the box64 0.4.5 *.tzst files and five native libs under app/src/main/jniLibs/arm64-v8a/. The Wine-side runtime (rootfs.tzst, rootfs_patches.tzst, pulseaudio.tzst, container_pattern.tzst, wincomponents/) is not tracked, so a fresh clone cannot build a complete APK until those paths are restored.
git clone https://github.com/ReSerendipity/GameShell.git
cd GameShell
# Restore the non-tracked Wine-side runtime only (exact paths; worktree only, not staged)
git remote add upstream https://github.com/brunodev85/winlator-app
git fetch upstream
git restore --source=upstream/main --worktree -- \
app/src/main/assets/rootfs.tzst \
app/src/main/assets/rootfs_patches.tzst \
app/src/main/assets/pulseaudio.tzst \
app/src/main/assets/container_pattern.tzst \
app/src/main/assets/wincomponents
⚠️ Do not usegit checkout upstream/main -- <path>: tree-ish checkout stages the files, and.gitignoreno longer applies to staged paths — a latergit commitwould bundle the large binaries. Usegit restore --worktreesogit statusstays clean. Do not restore the wholeapp/src/main/assets/app/src/main/jniLibsdirectories either — the seven tracked binaries would be overwritten by upstream versions and the worktree left dirty.
echo "sdk.dir=/path/to/android-sdk" > local.properties
./gradlew assembleDebugOutput: app/build/outputs/apk/debug/app-debug.apk.
To validate the framework-side code only (JDK 17, no Android SDK), run the same three javac gates as CI's galgame-compile job:
rm -rf /tmp/stubs-out /tmp/check /tmp/hot
mkdir -p /tmp/stubs-out /tmp/check /tmp/hot
javac -d /tmp/stubs-out $(find ci/stubs -name '*.java')
javac -Xlint:all -cp /tmp/stubs-out -d /tmp/check $(find app/src/main/java/com/winlator/galgame -name '*.java')
javac -Xlint:all -cp /tmp/stubs-out:/tmp/check -d /tmp/hot \
$(grep -vE '^[[:space:]]*(#|$)' ci/hotspot-entries.txt)| Item | Requirement |
|---|---|
| Android | 11 (API 30) or newer |
| CPU | ARM64 (arm64-v8a) |
| GPU | Vulkan 1.1+; Mali GPUs fall back to Vortek / VirGL |
| Storage | 8–16 GB free |
| RAM | 12 GB+ recommended |
| Not supported | Devices without Vulkan (e.g. some Kirin platforms) |
Emulator UI debugging: Build with
-PgalgameUiAbi=x86_64to produce an x86_64 APK for UI-only debugging (skips native compilation). Wine/Box64 runtime is not available in this mode.
- Install the APK and open the app. You land on the library cover wall; tap the settings icon in the header to open Settings (container and runtime management live under Settings → Developer → Advanced Settings).
- Tap Import Game and pick a folder containing your game (the launcher exe must be at the top level).
- The wizard detects the engine, creates a container, copies files, and injects Japanese locale.
- Return to the library and tap the game card to launch.
- Long-press a card for details, diagnostics, save export, or engine-route override.
Q: Build fails with missing rootfs.tzst / wincomponents?
A: The Wine-side runtime is not tracked. Run the git restore --source=upstream/main --worktree -- <path> step above for the missing paths. The box64 *.tzst files and the five jniLibs/*.so files are tracked and already present in a fresh clone.
Q: ./gradlew fails downloading gradle-9.9.1-bin.zip (PKIX error)?
A: TLS interception in a proxy/VPN environment. Check ~/.gradle/wrapper/dists/ for a complete alternative version and invoke its binary with --offline. See the build notes in this file and ci/pre-push.
Q: Which engines are supported?
A: GameShell detects 18 engine fingerprints plus an UNKNOWN fallback, including SiglusEngine, YU-RIS, Artemis, CatSystem2, AdvHD, SystemNNN, BGI, CMVS, Unity, and more. Detection logic lives in app/src/main/java/com/winlator/galgame/.
Q: What about encrypted games? A: The app detects encryption and warns, but does not crack. Please provide legally obtained, directly runnable game files.
Q: Why is there no APK attached to Releases? A: This project distributes source only. Releases attach a CycloneDX SBOM and SHA256SUMS. Build the APK yourself per the instructions above, or obtain it through trusted channels.
- Native engine integration notes
- Engine compatibility and troubleshooting
- Code and security review (2026-11-28)
- Real-device verification report
- Release / rollback governance
- Technical debt register
- Full index (including architecture reviews, assessments, and retrospectives): docs/README.md
- Issues and PRs welcome. This repo uses DCO: every commit must carry a
Signed-off-bytrailer (git commit -s). - Local type gate:
cp ci/pre-push .git/hooks/pre-push && chmod +x .git/hooks/pre-push - Before modifying Winlator component files, check
ci/zero-mod-exceptions.md— it is both the LGPL-2.1 §2 modification-notice register and the conflict surface list when porting upstream fixes. - Full guide:
docs/CONTRIBUTING.md
The whole project is released under LGPL-2.1: the Winlator component inherits LGPL-2.1 (cannot be re-licensed), and the GameShell delta layer is also released under LGPL-2.1 (deliberate choice to keep a single license across the repo, see decision A8). Third-party components and font policy are listed in NOTICE.

