INNER CODE UNIT · TypeScript
adbServerStartedByApp
SimonAKing/scrcpy-gui · src/main/adbService.ts:25
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)
noteAdbOutput(`${result.stdout}\n${result.stderr}`)
return result
} catch (error) {
noteAdbOutput(error instanceof Error ? error.message : String(error))