Repository navigation
fix(android): name the JADX deadline and recover apktool decode - #6024
Conversation
JADX operation timeouts now name REA_JADX_OPERATION_TIMEOUT_MS, the effective milliseconds, the 1..2147483647 range, and that a change applies on the next process start. Apktool decode accepts decode_timeout_ms, omitted means 600000, and a timeout names that key. ADB deadlines and apktool and Java version probes stay fixed and say there is no runtime override. Refs #5910 Co-authored-by: morluto <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cad82918d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryThis PR names the JADX timeout setting and adds an optional apktool decode deadline.
Review checks used source inspection; no tests were run during this review. Whether another PR supersedes this one could not be checked because GitHub access was unavailable. Reviews (2) · Last reviewed commit: "test(apktool): observe a real decode dea..." · Reviewed by Greptile |
Co-authored-by: morluto <[email protected]>
Main now stores a fixed allowance instead of a prebuilt remediation string. Apktool and adb capture refusals keep the no-runtime-override sentence in that allowance name, including that decode_timeout_ms does not raise the apktool output cap. Co-authored-by: morluto <[email protected]>
A hanging interpreter launcher and its pipe-holding child stay alive until decode_timeout_ms elapses. The provider then reports provider_timeout with completed cleanup, and both processes are gone. Co-authored-by: morluto <[email protected]>
Summary
Refs #5910 (parent #5808). JADX operation timeouts now name
REA_JADX_OPERATION_TIMEOUT_MS, the effective milliseconds, the range 1 to 2147483647, and that a change applies on the next process start.Apktool decode accepts
decode_timeout_ms(CLI--decode-timeout-ms). Omitted means 600000 ms. The integer range is 1 to 2147483647. A timeout names that key, and a change applies on the next decode. It does not raise the 4194304-byte output capture allowance.ADB command deadlines, the adb version probe, the apktool version probe, and the JADX Java module-listing probe stay at their current numbers and say this release has no runtime override.
Problem and expected behavior
A JADX operation that reached its deadline reported only the generic provider timeout. The failure did not name
REA_JADX_OPERATION_TIMEOUT_MS, the effective milliseconds, the accepted range, or that the value is read from the environment captured at process start.apktool dused a fixed 600000 ms wall clock. A stopped decode did not name a control the caller could set on the next decode. The 4194304-byte output capture allowance stayed fixed.ADB deadlines and version probes failed without saying this release has no runtime override.
Change and scope
captureJadxFailure, archive inspection, and the Java probe when the operation deadline aborts it) usesjadxOperationTimeoutGuidance. The env var, parser, and 120000 ms default are unchanged. The provider still receives the snapshotted launch environment, so a change applies on the next process start. The 30000 ms bridge startup handshake stays fixed.decode_android_resourcesgains optionaldecode_timeout_ms. Omitted stays omitted in Evidence and the provider uses 600000. CLI--decode-timeout-msmaps to that field. At 2147483647 the recovery says not to increase it further.runAdbCapturetimeouts and output-cap refusals, the adb version probe, the apktool version probe (including Windows PATH lookup), and the Java module-listing probe name the effective value and say there is no runtime override.decode_timeout_msandREA_JADX_OPERATION_TIMEOUT_MSdo not raise those probes.decode_timeout_msdoes not raise the apktool output cap.ApktoolProvider, waits until both are alive, and requires the owned-command deadline to elapse beforeprovider_timeoutwith completed cleanup.Out of scope: MCP response and startup ceilings, JEB/IDA/
command_timeout_ms, JavaScript heap and semantic ceilings, browser, native, swiftc, engines, and ASAR. The measured JADX JAR central-directory budget is unchanged.Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Not applicable. This names an existing JADX launch-environment deadline and adds a caller-selected wall clock to the existing apktool decode. It does not add a provider, target execution, injection, mutation, or protection recovery.
Contract and boundary impact
JadxReleaseowns the JADX deadline sentence.apktoolInputSchemas.decode_android_resourcesownsdecode_timeout_ms.ApktoolProviderapplies it to the decode command. ADB and version-probe text stays at the command owners that already fail the call.decode_android_resourcesaccepts optionaldecode_timeout_ms(CLI--decode-timeout-ms). Omitted means 600000 and is absent from parameters. Tool description names the default, range, and that the output cap and version probe stay fixed.docs/public/product-catalog.jsonis generated and was not committed.decode_timeout_msis retained in Evidence parameters. Omitted stays omitted. Result fields are unchanged.apktool dprocess. It does not raise the output capture allowance. On POSIX, the hanging-launcher test observes the launcher and its pipe-holding child gone after the deadline, withcleanupIncompletefalse.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): the Android skill sentence now names the JADX range and next process start. No package or install change.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
tests/boundary/providers/apktoolDecodeDeadline.test.ts,src/android/JadxOperationTimeout.test.ts,src/apktool/ApktoolDecodeTimeout.test.ts,src/domain/apktool/apktoolResourceAnalysis.test.ts,src/apktool/ApktoolVersionProbe.test.ts,src/adb/AdbCommand.test.ts,src/adb/AdbVersionProbe.test.ts,tests/boundary/android/jadxConfiguration.test.ts,tests/boundary/cli/apktoolBooleanOptions.test.ts.AnalysisTimeoutErrorsites passed only the millisecond count into the generic timeout sentence.DECODE_TIMEOUT_MSwas a private 600000 constant with no input field. The module test still projects the omitted 600000 deadline, a selected 5000 ms decode, and the maximum "do not increase it further" sentence. The boundary test runs a real hanging launcher.--decode-timeout-ms 900000is accepted and omitted means the field is absent.0and2147483648are rejected before the provider runs. MCP advertisement ofdecode_android_resourcesstill matches the contract.REA_APKTOOL_COMMAND. The deadline test skips Windows, so it does not establish Job Object cleanup. The Java module-listing probe test did run a hanging fake JDK and observed the 10000 ms no-override sentence.For evidence-bearing changes:
Validation performed
npm run check:fast— typecheck and lint succeeded.npm run test:focused --the apktool, android, and adb source tests plustests/boundary/providers/apktoolDecodeDeadline.test.ts,tests/boundary/android/jadxConfiguration.test.ts,tests/boundary/cli/apktoolBooleanOptions.test.ts,tests/boundary/cli/apktoolLocaleOption.test.ts,tests/boundary/cli/apktoolCli.test.ts, andtests/boundary/mcp/apktoolMcp.test.ts— 24 files, 487 tests passed. The hanging-launcher case settled in about 2600 ms for a 2500 ms deadline.Merged
origin/mainthroughd8a9673fcbefore these runs. The branch was behind and CI on the previous head was green.Compatibility, safety, and release
decode_timeout_mskeeps today's 600000 ms decode. Existing JADX environment values parse as before. Callers that matched the generic timeout sentence will see the named control.Author readiness
Human owner: @morluto
Before merge
type(scope): outcome.