MCPcopy
hub / github.com/APKLab/APKLab / installAPK

Function installAPK

src/tools/adb.ts:12–36  ·  view source on GitHub ↗
(apkFilePath: string)

Source from the content-addressed store, hash-verified

10 * @param apkFilePath absolute path of the APK file.
11 */
12 export async function installAPK(apkFilePath: string): Promise<void> {
13 if (!apkFilePath || !fs.existsSync(apkFilePath)) {
14 vscode.window.showErrorMessage(
15 `APKLab: APK file not found: ${apkFilePath}`,
16 );
17 return;
18 }
19
20 if (!apkFilePath.toLowerCase().endsWith(APK_FILE_EXTENSION)) {
21 vscode.window.showErrorMessage(
22 `APKLab: File is not an APK: ${apkFilePath}`,
23 );
24 return;
25 }
26
27 const apkFileName = path.basename(apkFilePath);
28 const report = `Installing ${apkFileName}`;
29 const args = ["install", "-r", apkFilePath];
30 await executeProcess({
31 name: "Installing",
32 report: report,
33 command: "adb",
34 args: args,
35 });
36 }
37}

Callers

nothing calls this directly

Calls 1

executeProcessFunction · 0.90

Tested by

no test coverage detected