Skip to content

fix(android): start the emulator with -crash-report-mode never - #1186

Merged
V3RON merged 5 commits into
mainfrom
bug/1183
Nov 1, 2026
Merged

V3RON merged 5 commits into
mainfrom
bug/1183

Conversation

@V3RON

@V3RON V3RON commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1183

Status

Implement: done (1/1 green) Review: round 2 + 2 fix-checks, 0 open Hardware: pass (line 8) Gate: running
Next: gate

  • The emulator is started with -crash-report-mode never and ANDROID_EMU_CRASH_REPORTING_DATABASE under the Simlock root, so a stale crash dump opens no consent dialog and the user's shared /tmp/android-<user> crash database is never read (hunks: #startEmulator, #emulatorEnv in src/drivers/android/index.ts; test: "starts the cold boot and the restart from the baseline with -crash-report-mode never and a crash database under the Simlock root...")
  • Hardware: with a .dmp in the user's shared emu-crash-<version>.db/completed/ folder, a lease boots with no dialog and that .dmp is still there afterwards — slow lane e2e/slow-android-smoke.test.ts passed at 3301085 (it plants a crashpad-recognised report; with the env var removed it fails)

Assumptions

  • Assumption: flag position — placed after -grpc-use-token, before the configured emulator flags; the smallest change, and existing argv tests only gain two entries.

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 2 blocking, 2 fixed, 1 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 2. Tokens: 49.1M.
Runs: 18. Cost USD: 4.0903. Agent seconds: 2323.

Assessment: complete

Written by an agent.

@V3RON

V3RON commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Decision taken

Question: -crash-report-mode never alone makes the emulator delete every pending dump in the user's shared crash database (/tmp/android-<user>/emu-crash-<version>.db). Android Studio and the user's own emulators write there too. Review finding R1 says this touches files Simlock did not write.

Options:

  1. never alone. No dialog. The emulator deletes the user's dumps from Android Studio and other emulators too, without asking.
  2. never plus ANDROID_EMU_CRASH_REPORTING_DATABASE set to a folder in Simlock's root. No dialog. Simlock's emulators record and drop crash dumps only in Simlock's folder. The user's shared folder is not read or touched.
  3. disabled. No dialog, but crashes are not recorded at all.

Taken: option 2. It keeps Simlock inside its own root (ADR 0001) and still fixes the boot hang. The triage rejected the variable only on its own, without never.

Reverting: drop the env var from the emulator spawn (one line) to get option 1.

The fast tests can't prove the emulator honours the variable. A hardware check will: a .dmp in the shared completed/ folder, a lease boots with no dialog, and the .dmp is still there.

Written by an agent.

@V3RON

V3RON commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 0cbba44
Round 2: b189e5a
Round fix-check: eb2de31
Round fix-check: 3301085

Runs: 18. Cost USD: 4.0903. Agent seconds: 2323.
Tokens input 396, output 97296, cache read 5903671, cache write 635613.
- build implementer: claude-sonnet-5-5 105 s $0.2032
- audit implementer: claude-sonnet-5-5 44 s $0.1266
- review 1 reviewer: claude-sonnet-5-5 229 s $0.2504
- review 1 spec: claude-sonnet-5-5 16 s $0.1241
- review 1 code both: claude-opus-5-5 138 s $0.5832
- review 1 claims: claude-sonnet-5-5 19 s $0.0791
- fix 1 implementer: claude-sonnet-5-5 80 s $0.2149
- review 2 reviewer: claude-sonnet-5-5 46 s $0.1318
- fix 2 implementer: claude-sonnet-5-5 60 s $0.1513
- review fix-check reviewer: claude-sonnet-5-5 346 s $0.1814
- hardware hardware-verifier: claude-sonnet-5-5 260 s $0.0779
- review fix-check code-reviewer both: claude-opus-5-5 274 s $0.8687
- review fix-check claims-reviewer claims: claude-sonnet-5-5 21 s $0.0856
- hardware-fix implementer: claude-sonnet-5-5 303 s $0.2567
- hardware hardware-verifier: claude-sonnet-5-5 77 s $0.0684
- review fix-check reviewer: claude-sonnet-5-5 184 s $0.2035
- review fix-check reviewer tests: claude-opus-5-5 111 s $0.4226
- review fix-check reviewer claims: claude-sonnet-5-5 10 s $0.0609
Finding outcomes: {"fixed":2,"nonblocking":1}. Classes: {"doc clarity":1,"safety: user files deleted by launch flag":1,"test cannot fail for its title's reason":1}.
{"findings":[{"id":"R1","role":"code","class":"safety: user files deleted by launch flag","outcome":"fixed","path":"src/drivers/android/index.ts","round":"1","fix":"b189e5ad3"},{"id":"R2","role":"code","class":"doc clarity","outcome":"nonblocking","path":"src/drivers/android/index.ts","round":"1","fix":"b189e5ad3"},{"id":"R3","role":"code","class":"test cannot fail for its title's reason","outcome":"fixed","path":"e2e/slow-android-smoke.test.ts","round":"fix-check","fix":"3301085f17092c2e361a777c3d698fe6334932b5"}]}

Written by an agent.

@V3RON

V3RON commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Review notes

Not blocking, not verified. Each is one reviewer's claim.

  • code: src/drivers/android/index.ts:2238 an older emulator may refuse the unknown -crash-report-mode flag; no minimum emulator version is set (-grpc-use-token has the same exposure).

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 1, 2026 21:04
@V3RON
V3RON merged commit 20c3640 into main Nov 1, 2026
67 checks passed
@V3RON
V3RON deleted the bug/1183 branch November 1, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android: a stale emulator crash dump makes every boot wait on a crash-report dialog until the lease times out

1 participant