MCPcopy Index your code
hub / github.com/callstack/agent-device / createSerialAdbExecutor

Function createSerialAdbExecutor

src/platforms/android/adb-executor.ts:192–206  ·  view source on GitHub ↗
(serial: string)

Source from the content-addressed store, hash-verified

190}
191
192function createSerialAdbExecutor(serial: string): AndroidAdbExecutor {
193 return async (args, options) =>
194 // Local adb execution must escape any active provider scope to avoid routing
195 // tunnel-backed providers back into themselves when they shell out to adb.
196 await withoutCommandExecutorOverride(
197 async () =>
198 await runCmd('adb', ['-s', serial, ...args], {
199 ...options,
200 // Some `adb shell` children can survive killing the adb parent and keep
201 // requests open past timeout. Give each adb call its own process group
202 // so timeout/abort cleanup can tear down the whole local command tree.
203 detached: process.platform !== 'win32',
204 }),
205 );
206}
207
208function createSerialAdbSpawner(serial: string): AndroidAdbSpawner {
209 return (args, options) => {

Callers 1

createDeviceAdbExecutorFunction · 0.85

Calls 2

runCmdFunction · 0.90

Tested by

no test coverage detected