import type { CapturePresetId, TraceCaptureResult } from '../types';
export interface AndroidCaptureInput {
    configText: string;
    configPath?: string;
    configDurationMs?: number;
    app?: string;
    preset?: CapturePresetId;
    durationSeconds?: number;
    out: string;
    serial?: string;
    sideload?: boolean;
    traceboxPath?: string;
    noGuardrails?: boolean;
    killStale?: boolean;
    adbPath?: string;
    backendRoot?: string;
    runner?: AdbCommandRunner;
    now?: () => number;
}
export interface AdbDevice {
    serial: string;
    state: string;
    description?: string;
}
export interface AndroidDeviceProbe {
    apiLevel: number;
    abi: string;
    shellUser?: string;
}
export interface AdbCommandRunner {
    run(adbPath: string, serial: string | undefined, args: string[], options?: AdbRunOptions): Promise<AdbRunResult>;
}
export interface AdbRunOptions {
    stdin?: string;
    timeoutMs?: number;
}
export interface AdbRunResult {
    stdout: string;
    stderr: string;
}
export declare class SpawnAdbCommandRunner implements AdbCommandRunner {
    run(adbPath: string, serial: string | undefined, args: string[], options?: AdbRunOptions): Promise<AdbRunResult>;
}
export declare function captureAndroidTrace(input: AndroidCaptureInput): Promise<TraceCaptureResult>;
export declare function runAndroidCapturePreflight(adbPath: string, serial: string, runner: AdbCommandRunner, opts?: {
    killStale?: boolean;
}): Promise<NonNullable<TraceCaptureResult['preflight']>>;
export declare function listDevices(adbPath: string, runner: AdbCommandRunner): Promise<AdbDevice[]>;
export declare function parseAdbDevices(output: string): AdbDevice[];
export declare function selectDevice(devices: AdbDevice[], serial?: string): AdbDevice;
export declare function probeAndroidDevice(adbPath: string, serial: string, runner: AdbCommandRunner): Promise<AndroidDeviceProbe>;
export declare function resolveCaptureDurationMs(configDurationMs?: number, cliDurationSeconds?: number): number;
export declare function buildPerfettoBackgroundArgs(input: {
    perfettoCommand: string;
    remotePath: string;
    noGuardrails?: boolean;
}): string[];
export declare function parseBackgroundPid(output: string): string;
//# sourceMappingURL=androidCapture.d.ts.map