Skip to content

Use the Emulator Preview for API 37+ system images - #418

Merged
pokowaka merged 1 commit into
google:masterfrom
jpcottin:feat/emulator-preview-for-api-37
Oct 5, 2026
Merged

pokowaka merged 1 commit into
google:masterfrom
jpcottin:feat/emulator-preview-for-api-37

Conversation

@jpcottin

@jpcottin jpcottin commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

What

Makes emu-docker use the Emulator Preview for API 37+ system images.
It is published in the SDK repository as emulators;latest and
emulators;<build-id>, alongside the regular emulator package, and
was not picked up before.

The Emulator Preview requires features on the system images that are
right now only available in the API 37+ system images.

Changes

  • Selection: for an API 37+ system image, a channel name (stable,
    canary, ...) selects the latest Emulator Preview. Older images keep
    getting the regular emulator for that channel. No new keyword or flag:
    the system image decides. The emulator is resolved per image, so a
    regexp matching several images pairs each with the emulator that fits.
  • Interactive menu: the Emulator Preview is listed first for API 37+
    images, with the regular emulators still available below it. It is not
    offered for older images.
  • Specific emulator: passing a zip or a build id works as before. An
    Emulator Preview zip paired with an image below API 37 is refused.
  • Launcher: -qemu -append panic=1 is not passed for the Emulator
    Preview, which already carries its own -append; a second one makes
    the emulator exit with "requires an argument".
  • Download name: the Emulator Preview downloads as
    emulator-preview-<version>.zip, so an existing regular emulator zip
    with the same version is not reused in its place.
  • beta and dev are accepted as channel names for the emulator
    argument, next to stable and canary.

Testing

  • New tests/test_emulator_preview.py (60 tests) covering package
    parsing, per-image selection, menu filtering and ordering, zip
    detection, the pairing check, the create flow, and the launcher
    template.
  • pytest tests/ --ignore=tests/e2e: 112 passed.
  • Built a container locally with
    emu-docker create stable 'C google_apis x86_64$' (API 37.0): the
    channel resolved to the Emulator Preview 37.1.3, and the container
    booted to the launcher (boot completed in about 20 s, adb reports
    SDK 37).

The Emulator Preview is published in the SDK repository as
"emulators;latest" and "emulators;<build-id>", next to the regular
"emulator" package. It requires features on the system images that are
right now only available in the API 37+ system images.

- For an API 37+ system image, a channel name (stable, canary, ...)
  now selects the latest Emulator Preview. Older images keep getting
  the regular emulator for that channel. The emulator is resolved per
  system image, so a regexp matching several images pairs each one with
  the emulator that fits it.
- The interactive menu lists the Emulator Preview first for API 37+
  images and does not offer it for older ones.
- A locally supplied Emulator Preview zip is refused for an image below
  API 37.
- The launcher no longer passes `-qemu -append panic=1` for the
  Emulator Preview, which already carries its own -append.
- The Emulator Preview downloads as emulator-preview-<version>.zip, so
  it cannot be mistaken for a regular emulator of the same version
  already on disk.

Also accept "beta" and "dev" as channel names for the emulator argument.
@jpcottin
jpcottin requested a review from pokowaka October 4, 2026 17:06
@pokowaka
pokowaka merged commit bf16cea into google:master Oct 5, 2026
11 checks passed
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.

2 participants