( device: DeviceInfo, appPath: string, )
| 861 | } |
| 862 | |
| 863 | export async function installAndroidApp( |
| 864 | device: DeviceInfo, |
| 865 | appPath: string, |
| 866 | ): Promise<{ |
| 867 | archivePath?: string; |
| 868 | installablePath: string; |
| 869 | packageName?: string; |
| 870 | appName?: string; |
| 871 | launchTarget?: string; |
| 872 | }> { |
| 873 | if (!device.booted) { |
| 874 | await waitForAndroidBoot(device.id); |
| 875 | } |
| 876 | const prepared = await prepareAndroidInstallArtifact({ kind: 'path', path: appPath }); |
| 877 | try { |
| 878 | const packageName = await installAndroidInstallablePathAndResolvePackageName( |
| 879 | device, |
| 880 | prepared.installablePath, |
| 881 | prepared.packageName, |
| 882 | ); |
| 883 | const appName = packageName ? inferAndroidAppName(packageName) : undefined; |
| 884 | return { |
| 885 | archivePath: prepared.archivePath, |
| 886 | installablePath: prepared.installablePath, |
| 887 | packageName, |
| 888 | appName, |
| 889 | launchTarget: packageName, |
| 890 | }; |
| 891 | } finally { |
| 892 | await prepared.cleanup(); |
| 893 | } |
| 894 | } |
| 895 | |
| 896 | export async function reinstallAndroidApp( |
| 897 | device: DeviceInfo, |
no test coverage detected