Emulator version compatibility check for system images
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 579
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 252
Description
## Problem
The `EmulatorRunner` does not validate whether the installed emulator binary version is compatible with the target system image API level. An outdated emulator (e.g., 32.1.9) silently fails to boot API 36 images — the emulator process starts, ADB shows the device as `device`, but `sys.boot_completed` never becomes `1` and the screen stays black.
## Expected Behavior
Before launching an emulator, check that the emulator binary version is sufficient for the target API level. If not, either:
- Warn the user with a clear message (e.g., "Emulator 32.1.9 is too old for API 36; update via \`sdkmanager emulator\`")
- Optionally auto-update the emulator component
## Details
- Emulator version can be obtained from `emulator -version` (e.g., `36.4.10.0`)
- API 36 system images require emulator 35+ (SurfaceFlingerAIDL, AndroidVirtualizationFramework features)
- The emulator warns `Please update the emulator to one that supports the feature(s): ...` but this goes to stderr and is easily missed
- The boot failure is silent — no crash, no error exit code, just an endlessly stuck boot
## Context
Discovered when API 36 emulator showed black screen and `pm list packages` returned `Can't find service: package`. Root cause was emulator binary v32.1.9 couldn't provide SurfaceFlinger AIDL service needed by API 36. Updating to v36.4.10 fixed the issue (boots in ~20s).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.