BootEmulatorStep class

Boots the emulator (idempotent: reuses an already-running instance for the same AVD) and waits for sys.boot_completed. Provides emulatorSerial.

Inheritance

Constructors

BootEmulatorStep({required String avdName, bool headless = true, Duration bootTimeout = const Duration(minutes: 5), Duration pollInterval = const Duration(seconds: 2), Duration killGrace = const Duration(milliseconds: 1500), String? deviceId, String? adbPath, String? emulatorPath, ResolvedToolchain? toolchain, ProcessLiveness? liveness, ProcessLeaseRegistry? leaseRegistry, String ownerCmd = 'oka run emulator', Future<ProcessResult> runProcess(String, List<String>)?, Future<Process> startProcess(String, List<String>)?})

Properties

adbPath → String?
final
avdName → String
final
bootTimeout → Duration
final
deviceId → String?
Explicit serial (multi-device); null = discover emulator-* serials.
final
emulatorPath → String?
final
hashCode → int
The hash code for this object.
no setterinherited
headless → bool
final
killGrace → Duration
How long the spawned emulator gets to exit after the graceful SIGTERM before the failure paths escalate to SIGKILL (ADR-0018 §1 graceful-first ladder; tests shrink this).
final
leaseRegistry → ProcessLeaseRegistry?
Lease registry override; null → the standard project location (<project>/.oka_cache/processes/). Injectable for tests.
final
liveness → ProcessLiveness?
Platform liveness/identity/kill seam (ADR-0018 §1); null → HostProcessLiveness. Injectable for scripted-fake tests.
final
name → String
Unique step name, used in logs and YAML overrides (pipeline.steps). Keep it stable: incremental-build caches and pipeline overrides refer to steps by name.
no setteroverride
ownerCmd → String
Recorded in the lease's owner_cmd (ADR-0018 §1).
final
pollInterval → Duration
Poll cadence for serial discovery + boot checks (tests shrink this).
final
provides → Set<Artifact<Object>>
Artifacts this step makes available to downstream steps. Ids must be unique across the pipeline.
no setteroverride
requires → Set<Artifact<Object>>
Artifacts this step needs from upstream steps. Declared up front so the whole chain is validated before any tool runs.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
toolchain → ResolvedToolchain?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(BuildContext ctx, PipelineState state) → Future<StepResult>
Executes the step. Read upstream values from state, write this step's outputs back into it, and return StepResult.success or StepResult.failure. Throw only for programming errors — expected tool/build failures are reported via the result.
override
spawnLease(int pid, String? pidToken, {String? serial}) → ProcessLease
The spawned-emulator lease (scope ephemeral, ownership owned, kind android-emulator, identity avd + serial, stop_hint adb [-s serial] emu kill). serial is filled in once discovery finds the new emulator-* entry.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited