import type { AndroidSdk } from "../../runtime/androidSdk.js"; import { normalizeDeviceDescriptor } from "./mobileDevice.js"; import type { DeviceDescriptor } from "./mobileDevice.js"; export { parseAdbDevices, parseEmuAvdName, parseListAvds, parseAccelCheck, normalizeDeviceDescriptor, emulatorBootArgs, nextEmulatorPort, udidForPort, planDeviceAcquisition, planAndroidToolchain, createDeviceRegistry, acquireDevice, teardownDeviceRegistry, buildAcquireDeviceDeps, checkEmulatorAcceleration, hostHasKvm, }; export type { DeviceDescriptor, DeviceRegistry, DeviceEntry, DeviceAcquisition }; declare function parseAdbDevices(text: string): { udid: string; state: string; }[]; declare function parseEmuAvdName(text: string): string | null; declare function parseListAvds(text: string): string[]; declare function parseAccelCheck({ code, text, }: { code: number | null; text?: string; }): boolean; declare function udidForPort(port: number): string; declare function nextEmulatorPort(usedPorts: Iterable): number; declare function emulatorBootArgs(desc: DeviceDescriptor, port: number): string[]; type ToolchainPlan = { action: "ready"; } | { action: "skip"; reason: string; } | { action: "install"; osVersion?: string; reason: string; }; declare function planAndroidToolchain({ capable, sdkPresent, requiredOsVersions, installedImages, abi, }: { capable: boolean; sdkPresent: boolean; requiredOsVersions: (string | undefined)[]; installedImages: string[]; abi: string; }): ToolchainPlan; type DeviceAcquisition = { action: "reuse-running"; name: string; udid: string; } | { action: "boot"; name: string; } | { action: "create-boot"; name: string; systemImage: string; device: string; } | { action: "skip"; reason: string; }; declare function planDeviceAcquisition(desc: DeviceDescriptor, { running, avds, installedImages, abi, javaPresent, }: { running: { udid: string; name: string | null; }[]; avds: string[]; installedImages: string[]; abi: string; javaPresent: boolean; }): DeviceAcquisition; interface DeviceEntry { name: string; udid: string; bootedByUs: boolean; process?: any; headless?: boolean; sdkRoot: string; ready?: Promise; } type DeviceRegistry = Map; declare function createDeviceRegistry(): DeviceRegistry; interface AcquireDeviceDeps { listRunning: () => Promise<{ udid: string; name: string | null; }[]>; listAvds: () => Promise; installedImages: () => string[]; javaPresent: () => boolean; abi: string; createAvd: (args: { name: string; systemImage: string; device: string; }) => Promise; boot: (desc: DeviceDescriptor, port: number) => Promise<{ udid: string; process: any; }>; log?: (message: string) => void; } declare function acquireDevice({ desc, registry, sdkRoot, deps, }: { desc: DeviceDescriptor; registry: DeviceRegistry; sdkRoot: string; deps: AcquireDeviceDeps; }): Promise<{ entry: DeviceEntry; } | { skip: string; }>; declare function teardownDeviceRegistry(registry: DeviceRegistry, kill: (entry: DeviceEntry) => Promise): Promise; declare function checkEmulatorAcceleration(emulatorPath: string): Promise; declare function hostHasKvm(): Promise; declare function buildAcquireDeviceDeps(sdk: AndroidSdk, abi: string, log?: (m: string) => void): { listRunning: () => Promise<{ udid: string; name: string | null; }[]>; listAvds: () => Promise; installedImages: () => string[]; javaPresent: () => boolean; abi: string; createAvd: (a: { name: string; systemImage: string; device: string; }) => Promise; boot: (desc: DeviceDescriptor, port: number) => Promise<{ udid: string; process: any; }>; kill: (entry: DeviceEntry) => Promise; log: ((m: string) => void) | undefined; }; //# sourceMappingURL=androidEmulator.d.ts.map