Skip to content

[CLI] maui android emulator start: add headless launch flags for CI #292

@rmarinho

Description

@rmarinho

Summary

maui android emulator start --wait currently does not expose pass-through args for the underlying emulator binary, so CI environments still have to launch the emulator manually with the headless/perf flags they need.

Use case

The vscode-maui pipeline launches Android emulators on Linux CI agents and needs all of:

emulator -avd test_emulator -no-window -no-audio -no-boot-anim -gpu swiftshader_indirect -no-snapshot -no-metrics

The CLI today only supports --cold-boot and --wait. Without these flags the emulator:

  • attempts to render a window (fails on headless Linux),
  • enables audio, boot animations, snapshots, and Google analytics,
  • uses the wrong GPU backend on KVM-only hosts.

Proposal

Add dedicated flags for the common headless options and/or an --extra-args "<verbatim>" pass-through:

maui android emulator start <name> \
  --wait \
  --no-window --no-audio --no-boot-anim --no-snapshot --no-metrics \
  --gpu swiftshader_indirect \
  --boot-timeout 900

A configurable --boot-timeout (currently 900s in the pipeline's manual poll loop) would also let us drop ~60 lines of polling logic that watches adb shell getprop sys.boot_completed.

Context

Used by the vscode-maui E2E pipeline (azure-pipelines/templates/stage/automated-test.yml). Without this, the pipeline still keeps the raw emulator launch + 900s boot loop alongside the CLI calls.

Filed from work to replace ~240 lines of Android setup in the vscode-maui E2E pipeline with the maui CLI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions