INNER CODE UNIT · TypeScript
noteAdbOutput
SimonAKing/scrcpy-gui · src/main/adbService.ts:21
export function noteAdbOutput(output: string): void {
if (DAEMON_START_PATTERN.test(output)) serverStartedByApp = true
}
export function adbServerStartedByApp(): boolean {
return serverStartedByApp
}
export function forgetAdbServerOwnership(): void {
serverStartedByApp = false
}
export class AdbService implements AdbClient {
async run(runtime: RuntimeConfig, args: string[], options: AdbRunOptions = {}): Promise<CommandOutput> {
const executable = await resolveBinary(runtime, 'adb')
if (!executable) throw new Error('adb executable not found.')
try {
const result = await executeCommand(executable, args, options.timeout, options.maxBuffer)