`devices` reports a phantom Android emulator named after the emulator's crashdata INFO banner
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- android, typescript
- Domain
- mobile
Research direction
The bug is in how the Android device list is built from emulator -list-avds output, which the report says is split by line with no filtering. Find the code that runs that command and parses its stdout, then reproduce by stubbing the command to print the INFO banner plus no AVD names. Done when the banner no longer appears as a device in devices --json or in the doctor Android count, and a test covers the banner case.
Written by the indexing model from the issue text.
Description
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).
- Dominant language
- TypeScript
- Stars
- 5k
- Forks
- 334
- Avg merge
- 12h 2m
- Merged PRs (30d)
- 678
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstack/agent-device
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
callstack/agent-device#1869 ·
Maintainers usually reply within 1 day
-
backlog refactor
Difficulty 5/5 Over a week Newbie friendliness 8/100
callstack/agent-device#3759 ·
Maintainers usually reply within 1 day
-
backlog enhancement needs-triage
Difficulty 5/5 Over a week Newbie friendliness 8/100
callstack/agent-device#3758 ·
Maintainers usually reply within 1 day
-
enhancement ready-for-agent
Difficulty 5/5 Over a week Newbie friendliness 15/100
callstack/agent-device#3757 ·
Maintainers usually reply within 1 day
-
feat(provider-testmu): publish @agent-device/testmu on plugin contract v2Possibly taken A pull request linked to this issue is open or already merged. Openenhancement ready-for-agent
Difficulty 4/5 3-5 days Newbie friendliness 35/100
callstack/agent-device#3756 ·
Maintainers usually reply within 1 day
All issues in callstack/agent-device
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
agilepathway/label-checker#739 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
CopilotKit/OpenBot#800 ·
Maintainers usually reply within 1 day
-
Endpoint links in the tag operations list are below the 24px target sizePossibly taken @AdzerKI claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
ehmpathy/rhachet-roles-bhuild#471 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day