/** * EmulatorProvider — the lifecycle seam UNDER the Android driver. * * The driver itself speaks adb and does not care who booted the device; every Android * emulator brand (and redroid, and a phone) is compatible by construction once a serial * exists. What differs between brands is lifecycle: install, list, boot, stop, snapshot. * That variance lives behind this interface, used by `pi-gui android …` and by the eval * harness — never by the driver, which stays lazy and refuses to own the device. * * One managed implementation exists (Google's emulator, `google.ts`) — the only brand * benchmarks accept and the only one worth auto-installing. Other brands stay * adopt-only: boot them yourself, hand the driver the serial. */ export interface RunningEmulator { serial: string; /** AVD name as the device reports it (ro.boot.qemu.avd_name), "" when unknown. */ avd: string; } export interface EmulatorStartOptions { avd: string; /** Boot with no window (-no-window -gpu host). Default is a visible window. */ headless?: boolean; /** Expose the emulator's gRPC endpoint (AndroidWorld's accessibility channel). */ grpcPort?: number; /** Cold boot (-no-snapshot): no quickboot load/save — benchmark determinism. */ coldBoot?: boolean; bootTimeoutMs?: number; onProgress?: (line: string) => void; } export interface EmulatorProvider { readonly id: string; listAvds(): Promise; listRunning(): Promise; /** Adopt a running emulator of this AVD, or launch one and wait for full boot. */ start(opts: EmulatorStartOptions): Promise; /** Stop by serial. Refuses anything that is not an emulator- serial. */ stop(serial: string): Promise; /** Snapshots (deterministic resets between benchmark tasks). Optional per brand. */ saveSnapshot?(serial: string, name: string): Promise; loadSnapshot?(serial: string, name: string): Promise; } /** * Environment profiles — a benchmark environment is not a different emulator brand, * it is the SAME Google emulator with a pinned AVD spec and launch flags. A profile * names that bundle so setup and start agree on it. Explicit flags always win over * what the profile implies. */ export interface EmulatorProfile { avd: string; /** avdmanager device id (hardware profile). */ device: string; api: number; /** Launch-time implications (an a11y gRPC channel, cold boots for reproducibility). */ grpcPort?: number; coldBoot?: boolean; } export declare const EMULATOR_PROFILES: Record;