Repository navigation
feat(apktool): decode Android resource tables through a caller-supplied launcher - #1556
Merged
Merged
Conversation
…ed launcher Add an Apktool family with two operations over the caller's apktool launcher (REA_APKTOOL_COMMAND, absolute, or apktool on PATH): - inspect_apktool_client: resolved launcher, selection source, and version; decodes nothing. - decode_android_resources: apktool d --no-src in a provider-owned workspace that is removed before the result returns. Projects the decoded AndroidManifest.xml (bounded at 512 KiB), apktool.yml version and SDK facts exactly as printed, string resources verbatim (default or one locale, bounded at 2000 entries, nested-markup entries counted as unparsed), available string locales, and the decoded file count with a hard cap. The target APK is digested with SHA-256 before decoding so Evidence binds the observation to the exact input. Smali production is skipped by design: Java-source recovery belongs to the JADX family. Workspace cleanup happens before results return; an unremovable workspace is named in the limitations instead of abandoned. Verified against apktool 2.7.0-dirty (Debian packaging) on Linux with OpenJDK 25 against a signed aapt2-built probe APK with two resource locales: launcher version, on-disk digest agreement, metadata projection, manifest package agreement, and both string tables (default and de). Parser goldens come from the same decode. READMEs carry the new 'Android resources' row in every supported language.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
# Conflicts: # README_ar.md # README_de.md # README_es.md # README_fa.md # README_fr.md # README_ja.md # README_ko.md # README_pl.md # README_pt-BR.md # README_ru.md # README_th.md # README_tr.md # README_uk.md # README_vi.md # README_zh-TW.md # README_zh.md
# Conflicts: # README.md # README_ar.md # README_de.md # README_es.md # README_fa.md # README_fr.md # README_id.md # README_ja.md # README_ko.md # README_pl.md # README_pt-BR.md # README_ru.md # README_th.md # README_tr.md # README_uk.md # README_vi.md # README_zh-TW.md # README_zh.md # docs/testing.md # package.json # scripts/lib/catalog-builders.mjs # scripts/lib/catalog-core.mjs # src/cli.ts # src/cliCommandNames.ts # src/contracts/toolContractTypes.ts # src/contracts/toolContracts.ts # src/contracts/toolEffects.ts # src/server/createServer.ts # vitest.config.ts
Owner
|
Thanks @3QL for adding Android resource decoding through a caller-supplied Apktool launcher! Squash merged with the review fixes for snapshot identity, resource limits, locales, cancellation, and cleanup. Thank you for all three contributions. |
2 tasks done
|
Hola disculpa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(apktool): decode Android resource tables through a caller-supplied launcher
Implements the Apktool stage of the Android roadmap #717 ("resource ID/XML/locale inspection through Apktool" — the unclaimed piece of the First milestone). With JADX (code), JEB (engine-grade decompilation), and this family (resources), the static Android triad is complete; acquisition and device observation are covered by the ADB family.
Summary
Add an
apktool-providerfamily with two operations over the caller's apktool launcher (REA_APKTOOL_COMMAND, absolute, orapktoolon PATH — the same selection pattern as the ADB binary; REA never installs Apktool or Java):inspect_apktool_client— resolved launcher, selection source, version. Decodes nothing; a missing launcher reportscapability_unavailablewith theREA_APKTOOL_COMMANDremediation.decode_android_resources— runsapktool d --no-srcin a provider-owned workspace that is removed before the result returns (an unremovable workspace is named in the limitations, never silently abandoned), then projects:package_nameread from the decoded manifest, not inferred),locale(values-<locale>/strings.xml), bounded to 2,000 entries withcoverage: "partial"beyond; escaped entities stay escaped; entries with nested markup are counted as unparsed instead of flattened,target.sha256/bytes— the APK is digested before decoding, so Evidence binds the observation to the exact input.Smali production is skipped by design (
--no-src): Java-source recovery belongs to the JADX family. Smali edits and rebuild are a follow-up lane with mutation authority.Verification
#!/bin/shlauncher stubs (happy path, locale projection, missing tables noted rather than failed, apktool's ownAndrolibExceptionpreserved asunsupported_target, missing launcher → capability gap, unreadable target → input refusal, cancellation before spawn).npm run verify:apktool): apktool 2.7.0-dirty (Debian packaging) on Linux with OpenJDK 25, against a signed aapt2-built probe APK with two resource locales — launcher version, on-disk digest agreement with the reported target identity, metadata projection (1.2.3, SDK 24–34), manifest package agreement, and both string tables (default +de) projected through the locale option. CLI and MCP surfaces verified against the same launcher.check:fast,docs:generate,docs:check, and 3,400+ tests across domain/services/adapters/composition pass.Docs
docs/apktool-resource-analysis.md(supply tools, semantics, budgets) and a verification record indocs/testing.md.Towards #717. No engine, SDK, or tool installation; no new runtime dependencies.