fix(apktool): report the selected APK in decode refusals

This commit is contained in:
Peter committed 2026-10-14 13:45:35 +02:00
1 parent f75b1a416b
commit 08d3d0d3a0
2 files changed
+4 -1

No files matched your search

+1
View File
@@ -333,6 +333,7 @@ it("reports apktool's own refusal for undecodable targets", async () => {
});
expect(projected).toMatchObject({ code: "unsupported_target" });
expect(projected.message).toContain("Could not decode");
expect(projected.message).toContain("probe.apk");
});
it("reports a missing launcher as a capability gap with recovery", async () => {
+3 -1
View File
@@ -150,6 +150,7 @@ interface DecodeLimits {
const runApktool = async (
operation: string,
targetPath: string,
selection: ApktoolCommandSelection,
arguments_: readonly string[],
limits: DecodeLimits,
@@ -249,7 +250,7 @@ const runApktool = async (
return err(
new AnalysisUnsupportedTargetError(
operation,
selection.command,
targetPath,
output?.stderr.text.trim().slice(0, STDERR_EXCERPT_BYTES) ||
`apktool exited with code ${String(output?.exitCode ?? "unknown")} for ${operation}`,
{
@@ -641,6 +642,7 @@ export class ApktoolProvider {
await mkdir(framework);
const decoded = await runApktool(
operation,
input.path,
selection,
[
"d",