(serial: string)
| 190 | } |
| 191 | |
| 192 | function 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 | |
| 208 | function createSerialAdbSpawner(serial: string): AndroidAdbSpawner { |
| 209 | return (args, options) => { |
no test coverage detected