(
apkFilePath: string,
projectDir: string,
)
| 356 | * @param projectDir project output dir for decode/decompile/analysis. |
| 357 | */ |
| 358 | export async function analyzeAPK( |
| 359 | apkFilePath: string, |
| 360 | projectDir: string, |
| 361 | ): Promise<void> { |
| 362 | if (!apkFilePath || !fs.existsSync(apkFilePath)) { |
| 363 | vscode.window.showErrorMessage( |
| 364 | `APKLab: APK file not found: ${apkFilePath}`, |
| 365 | ); |
| 366 | return; |
| 367 | } |
| 368 | |
| 369 | if (!projectDir || !fs.existsSync(projectDir)) { |
| 370 | vscode.window.showErrorMessage( |
| 371 | `APKLab: Project directory not found: ${projectDir}`, |
| 372 | ); |
| 373 | return; |
| 374 | } |
| 375 | |
| 376 | const jsonReportPath = path.join(projectDir, QUARK_REPORT_FILENAME); |
| 377 | |
| 378 | await executeProcess({ |
| 379 | name: "Quark analysis", |
| 380 | report: `Analyzing ${apkFilePath}`, |
| 381 | command: "quark", |
| 382 | args: ["-a", apkFilePath, "-o", jsonReportPath], |
| 383 | shouldExist: jsonReportPath, |
| 384 | }); |
| 385 | } |
| 386 | |
| 387 | /** |
| 388 | * Show Quark APK analysis report in WebView panel. |
nothing calls this directly
no test coverage detected