(device: DeviceInfo, appPath: string)
| 787 | } |
| 788 | |
| 789 | async 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 | |
| 807 | async function installAndroidAppFiles(device: DeviceInfo, appPath: string): Promise<void> { |
| 808 | if (isAndroidAppBundlePath(appPath)) { |
no test coverage detected