MCPcopy
hub / github.com/callstack/agent-device / installAndroidAppBundle

Function installAndroidAppBundle

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

Source from the content-addressed store, hash-verified

787}
788
789async function installAndroidAppBundle(device: DeviceInfo, appPath: string): Promise<void> {
790 const provider = resolveAndroidAdbProvider(device);
791 const mode = 'universal';
792 if (provider.installBundle) {
793 await provider.installBundle(appPath, { mode });
794 return;
795 }
796
797 const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), 'agent-device-aab-'));
798 const apksPath = path.join(tempDir, 'bundle.apks');
799 try {
800 await runBundletool(['build-apks', '--bundle', appPath, '--output', apksPath, '--mode', mode]);
801 await runBundletool(['install-apks', '--apks', apksPath, '--device-id', device.id]);
802 } finally {
803 await fs.rm(tempDir, { recursive: true, force: true });
804 }
805}
806
807async function installAndroidAppFiles(device: DeviceInfo, appPath: string): Promise<void> {
808 if (isAndroidAppBundlePath(appPath)) {

Callers 1

installAndroidAppFilesFunction · 0.85

Calls 2

runBundletoolFunction · 0.85

Tested by

no test coverage detected