MCPcopy Create free account
hub / github.com/Snapchat/Valdi / installAndroidApk

Function installAndroidApk

npm_modules/cli/src/utils/deviceUtils.ts:67–71  ·  view source on GitHub ↗
(apkPath: string, emulatorId?: string)

Source from the content-addressed store, hash-verified

65}
66
67export async function installAndroidApk(apkPath: string, emulatorId?: string) {
68 const idString = emulatorId ? ` -s ${emulatorId} ` : ' ';
69 const commandInstallApk = `adb${idString}install -r ${apkPath}`;
70 await spawnCliCommand(commandInstallApk, undefined, 'pipe', false, true);
71}
72
73export async function startAndroidActivity(activityName: string) {
74 const commandStartActivity = `adb shell am start -n ${activityName}`;

Callers 1

valdiInstallFunction · 0.90

Calls 1

spawnCliCommandFunction · 0.90

Tested by

no test coverage detected