(devicesString: string)
| 3 | import { runCliCommand, spawnCliCommand } from './cliUtils'; |
| 4 | |
| 5 | function parseAndroidDevices(devicesString: string): string[] { |
| 6 | const deviceIDs: string[] = devicesString |
| 7 | .split('\n') |
| 8 | .filter(line => line.trim().endsWith('device') && !line.startsWith('List of devices')) |
| 9 | .map(line => line.split('\t')?.[0]?.trim() ?? ''); // Extract the device ID |
| 10 | |
| 11 | return deviceIDs ?? []; |
| 12 | } |
| 13 | |
| 14 | export async function getArchitectureForAndroidDevice(deviceId: string): Promise<Architecture> { |
| 15 | const { stdout } = await runCliCommand(`adb -s ${deviceId} shell getprop ro.product.cpu.abi`, undefined, true); |
no test coverage detected