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

Function reinstallAndroidApp

src/platforms/android/app-lifecycle.ts:896–920  ·  view source on GitHub ↗
(
  device: DeviceInfo,
  app: string,
  appPath: string,
)

Source from the content-addressed store, hash-verified

894}
895
896export async function reinstallAndroidApp(
897 device: DeviceInfo,
898 app: string,
899 appPath: string,
900): Promise<{ package: string }> {
901 return await androidAppResolutionCache.invalidateWhile(
902 androidAppResolutionScope(device),
903 async () => {
904 if (!device.booted) {
905 await waitForAndroidBoot(device.id);
906 }
907 const { package: pkg } = await uninstallAndroidApp(device, app);
908 const prepared = await prepareAndroidInstallArtifact(
909 { kind: 'path', path: appPath },
910 { resolveIdentity: false },
911 );
912 try {
913 await installAndroidInstallablePath(device, prepared.installablePath);
914 } finally {
915 await prepared.cleanup();
916 }
917 return { package: pkg };
918 },
919 );
920}

Callers 1

session-deploy.tsFile · 0.85

Calls 5

waitForAndroidBootFunction · 0.90
uninstallAndroidAppFunction · 0.85

Tested by

no test coverage detected