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

Function findAndroidEmulatorByAvdName

src/platforms/android/devices.ts:347–358  ·  view source on GitHub ↗
(
  devices: DeviceInfo[],
  avdName: string,
  serial?: string,
)

Source from the content-addressed store, hash-verified

345}
346
347function findAndroidEmulatorByAvdName(
348 devices: DeviceInfo[],
349 avdName: string,
350 serial?: string,
351): DeviceInfo | undefined {
352 const target = normalizeAndroidName(avdName);
353 return devices.find((device) => {
354 if (device.platform !== 'android' || device.kind !== 'emulator') return false;
355 if (serial && device.id !== serial) return false;
356 return normalizeAndroidName(device.name) === target;
357 });
358}
359
360async function waitForAndroidEmulatorByAvdName(params: {
361 avdName: string;

Callers 1

Calls 1

normalizeAndroidNameFunction · 0.85

Tested by

no test coverage detected