Skip to content

Emulator version compatibility check for system images #309

@rmarinho

Description

@rmarinho

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions