`devices` reports a phantom Android emulator named after the emulator's crashdata INFO banner
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 75/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- android, typescript
- 领域
- mobile
调研方向
问题出在 Android 设备列表是如何根据 emulator -list-avds 的输出构建的。报告称,该输出被按行拆分,且没有任何过滤。请找到运行该命令并解析其 stdout 的代码,然后通过桩化该命令,使其输出 INFO 横幅而不输出任何 AVD 名称来复现问题。当横幅不再作为设备出现在 devices --json 或 doctor 的 Android 数量中,并且有测试覆盖横幅的情况时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Summary
On a machine with zero AVDs, agent-device devices still reports one Android
emulator, whose id and name are the Android emulator's Crashpad banner:
INFO | Storing crashdata in: /tmp/<user>/emu-crash-34.2.16.db, detection is enabled for process: 98765
Environment
- agent-device 0.21.28 (npm global)
- macOS 15.7.5 (24G624), arm64
- Node v24.14.0
- ANDROID_HOME=/Users//Library/Android/sdk
Steps to reproduce
- Install the Android SDK/emulator, create no AVD (
~/.android/avd/is empty). - Run
agent-device devices --json.
Expected
No Android device listed.
Actual
One phantom entry (booted: false), with the embedded PID changing on every run:
{
"platform": "android",
"id": "INFO | Storing crashdata in: /tmp/<user>/emu-crash-34.2.16.db, detection is enabled for process: 6727",
"name": "INFO | Storing crashdata in: /tmp/<user>/emu-crash-34.2.16.db, detection is enabled for process: 6727",
"kind": "emulator",
"target": "mobile",
"booted": false
}
agent-device doctor counts it as well: device: ... Android 1 available, 0 booted.
Likely cause
The Android emulator writes that banner to stdout (verified with Python
capture_output=True; stderr is empty and exit code is 0):
$ emulator -list-avds 2>/dev/null
INFO | Storing crashdata in: /tmp/<user>/emu-crash-34.2.16.db, detection is enabled for process: 8114
$ emulator -list-avds 2>&1 1>/dev/null # stderr
(empty)
$ echo $?
0
So splitting stdout of emulator -list-avds by line yields one bogus "AVD" per run.
Filtering to plausible AVD names (or reading ~/.android/avd/*.ini) would avoid it.
Confirmed there is genuinely no device here: adb devices -l is empty and
~/.android/avd/ has no .ini files. The banner reproduces on every invocation
(three consecutive runs, only the PID differs).
- 主要语言
- TypeScript
- 星标
- 5k
- 派生
- 334
- 平均合并
- 12 小时 29 分钟
- 30 天内合并 PR
- 663
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
callstack/agent-device#1869 ·
维护者通常 1 天内回复
-
backlog refactor
难度 5/5 一周以上 新手友好度 8/100
callstack/agent-device#3759 ·
维护者通常 1 天内回复
-
backlog enhancement needs-triage
难度 5/5 一周以上 新手友好度 8/100
callstack/agent-device#3758 ·
维护者通常 1 天内回复
-
enhancement ready-for-agent
难度 5/5 一周以上 新手友好度 15/100
callstack/agent-device#3757 ·
维护者通常 1 天内回复
-
enhancement ready-for-agent
难度 4/5 3-5 天 新手友好度 35/100
callstack/agent-device#3756 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
`cf complete zsh >> .zshrc` fails on vanilla zsh可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
cloudflare/cf#340 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1 小时以内 新手友好度 75/100
StoDevX/AAO-React-Native#8785 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 75/100
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commit可能已有人在做 @myOmikron 今天认领。 未关闭bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 82/100