[PR #3462] [CLOSED] fix(apktool): report the selected APK in decode refusals #5752

Closed
opened 2026-10-31 01:09:10 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3462
Author: @peter-research
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: fix/apktool-refusal-selected-apk


📝 Commits (1)

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

📊 Changes

2 files changed (+4 additions, -1 deletions)

View changed files

📝 src/apktool/ApktoolProvider.test.ts (+1 -0)
📝 src/apktool/ApktoolProvider.ts (+3 -1)

📄 Description

Summary

When the Apktool launcher refuses an APK, decode-android-resources named the launcher executable as the unsupported target.

Fixes #3340

Problem and expected behavior

runApktool built AnalysisUnsupportedTargetError with selection.command as the path, so both the message and details.path lost the caller-selected APK, although analysisErrorCore defines the path as the supplied artifact.

Change and scope

runApktool takes the selected target path and uses it for the refusal. The only caller passes input.path. The launcher's stderr excerpt and the captured decode output are unchanged.

Contribution scope: not applicable (ordinary fix within existing boundaries).

Contract and boundary impact

  • Semantic owner and earliest changed stage: Apktool provider; error construction in runApktool
  • Contribution scope fit and linked maintainer decision: not applicable
  • CLI and MCP/tool-catalog contract: no schema or catalog change
  • Provider, bridge, target-format, or platform compatibility: unknown beyond the cases covered by the tests below
  • Evidence, artifact, provenance, or reconstruction contract: none
  • Generated metadata, package, or installation impact: none

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

Source-derived by the AI assistant from reading the code. The human owner reports reviewing the code and verifying the proof-of-concept reproductions, with no failures.

  • Tests added or updated: src/apktool/ApktoolProvider.test.ts extends the undecodable-target test to expect the APK file name in the refusal message (owner reports no failures).
  • Base reproduction or other evidence: the reproduction in #3340 (not re-run for this PR)
  • User-visible CLI/MCP output (if applicable): not captured
  • Remaining proof gaps: The test assumes the projected message keeps the APK file name; details.path is not asserted. Exact commands and outputs are not recorded.

Validation performed

The human owner reports having reviewed the code and PRs and verified the proof-of-concept reproductions, with no failures. The exact commands and outputs were not recorded here.

Compatibility, safety, and release

  • Breaking changes or migration steps: none expected
  • Real Hopper/Ghidra, browser, or OS coverage: none
  • Package or release metadata impact: none
  • Security, privacy, process, or containment review: not applicable

Prepared with AI assistance (Claude). The author readiness declarations below were dictated by the human owner.

Author readiness

Human owner: @peter-research

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3462 **Author:** [@peter-research](https://github.com/peter-research) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/apktool-refusal-selected-apk` --- ### 📝 Commits (1) - [`08d3d0d`](https://github.com/morluto/rea/commit/08d3d0d3a0e816a2a73fd8224ede86a62e60ed34) fix(apktool): report the selected APK in decode refusals ### 📊 Changes **2 files changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/apktool/ApktoolProvider.test.ts` (+1 -0) 📝 `src/apktool/ApktoolProvider.ts` (+3 -1) </details> ### 📄 Description ## Summary When the Apktool launcher refuses an APK, `decode-android-resources` named the launcher executable as the unsupported target. Fixes #3340 ## Problem and expected behavior `runApktool` built `AnalysisUnsupportedTargetError` with `selection.command` as the path, so both the message and `details.path` lost the caller-selected APK, although `analysisErrorCore` defines the path as the supplied artifact. ## Change and scope `runApktool` takes the selected target path and uses it for the refusal. The only caller passes `input.path`. The launcher's stderr excerpt and the captured decode output are unchanged. Contribution scope: not applicable (ordinary fix within existing boundaries). ## Contract and boundary impact - Semantic owner and earliest changed stage: Apktool provider; error construction in `runApktool` - Contribution scope fit and linked maintainer decision: not applicable - CLI and MCP/tool-catalog contract: no schema or catalog change - Provider, bridge, target-format, or platform compatibility: unknown beyond the cases covered by the tests below - Evidence, artifact, provenance, or reconstruction contract: none - Generated metadata, package, or installation impact: none Expected effects: - [ ] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage Source-derived by the AI assistant from reading the code. The human owner reports reviewing the code and verifying the proof-of-concept reproductions, with no failures. - Tests added or updated: `src/apktool/ApktoolProvider.test.ts` extends the undecodable-target test to expect the APK file name in the refusal message (owner reports no failures). - Base reproduction or other evidence: the reproduction in #3340 (not re-run for this PR) - User-visible CLI/MCP output (if applicable): not captured - Remaining proof gaps: The test assumes the projected message keeps the APK file name; `details.path` is not asserted. Exact commands and outputs are not recorded. ## Validation performed The human owner reports having reviewed the code and PRs and verified the proof-of-concept reproductions, with no failures. The exact commands and outputs were not recorded here. ## Compatibility, safety, and release - Breaking changes or migration steps: none expected - Real Hopper/Ghidra, browser, or OS coverage: none - Package or release metadata impact: none - Security, privacy, process, or containment review: not applicable Prepared with AI assistance (Claude). The author readiness declarations below were dictated by the human owner. ## Author readiness Human owner: @peter-research - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:09:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5752
No description provided.