Configure Android emulator launch options (headless, GPU, audio, boot animation) from the config file
维护者通常 1 天内回复
@V3RON 已经在做这个了。
开始于 2026年9月27日。
评估
这个 Issue 还没有评估数据。
描述
Standalone task opened by the maintainer; no parent feature.
Scope
The Android driver launches every emulator with a window, the default GPU mode, audio, and the boot animation, and none of it is configurable. Six agents on one Mac get six emulator windows, and a headless Linux CI host cannot boot an emulator at all.
After this PR an operator sets, in ~/.simlock/config.json, how this machine's emulators are launched, the same way ios.slim.* is set for simulators: once, by the operator, and never from a lease request, MCP, or HTTP.
{
"android": {
"emulator": {
"headless": false, // true adds -no-window
"gpu": "auto", // passed as -gpu <mode>; "auto" passes nothing
"audio": true, // false adds -no-audio
"bootAnimation": true // false adds -no-boot-anim
}
}
}
A changed setting applies at a device's next boot; a running emulator keeps the flags it started with. Changing headless or gpu also invalidates a device's clean-baseline snapshot, which the driver rebuilds on the next boot instead of silently degrading every later reclaim to a full wipe. There is no free-form launch-argument escape hatch: only these four keys, so config cannot inject -port, a different AVD home, or anything else that would break containment.
Technical spec
Modules touched
src/core/config.ts: newandroid.emulatorblock besideios.slimwith the defaults above; validators reject a non-booleanheadless/audio/bootAnimationand agputhat is not a non-empty string, naming the key. A gateway warns about and ignores it exactly as it doesios.*(extend the existing gateway-ignored key handling and itsdocs/CONFIGURATION.mdlist).src/contract/schemas.ts: the config block sosimlock configandconfig.getrender it.src/daemon/main.ts: threadconfig.android.emulatorintodiscoverAndroidDriverthe wayconfig.ios.slimreaches the iOS driver.src/drivers/android/index.ts:AndroidDriverOptions.emulator(optional; defaults equal the config defaults).#startEmulatorappends the flags after-no-snapshot-save.#configHashand#currentConfigHashincludeheadlessandgpuin the hashed input so the baseline snapshot rebuilds when either changes.audioandbootAnimationdo not enter the hash.docs/CONFIGURATION.md: the four keys in the table, their validation in the rules paragraph, the "applies at next boot" and snapshot-rebuild notes, and the gateway-ignored list.README.md: no change unless a claim there becomes false.
Contract and event changes
None beyond the config schema. No new operation, event, or lease-request field. lease.request must not gain any of these keys.
Rules in play
docs/internal/agent-rules/architecture.md: the core hands the block to the driver unread; which emulator flag a key becomes is the driver's business.docs/internal/agent-rules/safety.mdrule 9: fail closed on config. Only the four named keys, validated at load; no pass-through of arbitrary flags.docs/internal/adr/0002-opt-in-slim-ios-simulators.md: the precedent for driver-level, config-only settings.docs/internal/agent-rules/testing.md.
Tests
- The default config launches the emulator with the same arguments as before this change (unit, scripted
ProcessRunner). android.emulator.headless: trueadds-no-windowto the emulator launch, andaudio: falseandbootAnimation: falseadd-no-audioand-no-boot-anim.android.emulator.gpu: "swiftshader_indirect"adds-gpu swiftshader_indirect, and"auto"adds nothing.- A non-boolean
android.emulator.headlessis rejected at config load, naming the key. - Changing
headlessorgpuchanges the baseline config hash, so the next boot rebuilds the clean snapshot; changingaudioorbootAnimationdoes not. - A gateway warns about and ignores
android.emulator.*. simlock configrenders theandroid.emulatorblock with its defaults (e2e, fast lane).lease.requestcarrying anandroidoremulatorfield isBAD_REQUEST.
Done when
- Every test above passes and
pnpm checkis green. simlock configshows the block;docs/CONFIGURATION.mddocuments the four keys, the next-boot rule, and the snapshot-rebuild rule.- The emulator launch command with default config is byte-for-byte what it was before.
Out of scope
- A per-lease or per-request override of any of these keys.
- A free-form
launchArgskey. - An iOS equivalent (
simctl bootis already headless; attaching Simulator.app is a separate idea). - RAM or CPU per emulator; that is capacity's business.
Depends on
Approval
- Approved for delivery
Written by an agent.
- 主要语言
- TypeScript
- 星标
- 19
- 派生
- 1
- 平均合并
- 7 小时 21 分钟
- 30 天内合并 PR
- 247
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstackincubator/simlock 的其他 Issue
-
bug:new
难度 2/5 1-3 小时 新手友好度 76/100
callstackincubator/simlock#673 ·
维护者通常 1 天内回复
-
bug:needs-info
难度 2/5 1-3 小时 新手友好度 76/100
callstackincubator/simlock#657 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
callstackincubator/simlock#639 ·
维护者通常 1 天内回复
-
bug:new
难度 3/5 1-2 天 新手友好度 70/100
callstackincubator/simlock#672 ·
维护者通常 1 天内回复
-
Flaky console lane: CLI auto-launch's fixed 5 s deadline expires while a daemon starts on a loaded runner (ENOENT daemon.sock)可能已有人在做 @V3RON 今天认领。 未关闭bug:ready flaky-test
callstackincubator/simlock#663 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 callstackincubator/simlock 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
umami-software/umami#4637 ·
维护者通常 3 天内回复
-
Hotkeys fire when pressed with the Ctrl key, so browser shortcuts also trigger player actions可能已有人在做 @RaphaelFakhri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
muxinc/media-chrome#1332 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
polarsource/polar#15580 ·
维护者通常 1 天内回复
-
accepted bug via-triage
难度 2/5 1-3 小时 新手友好度 69/100
pingdotgg/t3code#20931 · 1 条评论 ·
维护者通常 1 天内回复
-
bug/1-unconfirmed kind/bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复