Skip to content

feat(android): expose selected manifest component declarations - #7379

Merged
gensokyo-dev merged 3 commits into
mainfrom
feat/android-component-inventory
Oct 27, 2026
Merged

gensokyo-dev merged 3 commits into
mainfrom
feat/android-component-inventory

Conversation

@gensokyo-dev

@gensokyo-dev gensokyo-dev commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes #4448. Extend the existing static manifest inventory with declared enabled/process/URI-grant values, grouped intent-filter data and priorities, metadata names, and exact decoded-manifest locations. Add selected component pages and counts through shared CLI/MCP retained views, keeping complete Evidence accessible.

Incorporates Harsh's #7264 at 987b5aceb66c7526e47cf6d064c22029c2f48c04, with co-author credit, and fixes its historical-field review finding: newly unobserved fields remain omitted with declaration_coverage: unknown, rather than becoming false absence facts.

Contract and boundary impact

  • One domain schema owns component facts. The manifest producer shares namespace interpretation and a single nested-declaration pass; the former duplicate schemas and separate flattened-value reader are removed.
  • Complete requests and the existing default summary remain compatible. Explicit summary views support exact kind/name/action/exported-declaration filters, fields, paging and component counts. Rows preserve parent ordinals, source coverage, APK identity and provenance; explicit/default exports remain distinct.
  • Limits account for copied values and serialized projections. Unsupported data constraints/filter constructs produce partial coverage with retained-source recovery. Resource references remain declarations; metadata values remain in the complete manifest.
  • Static analysis within the existing JADX boundary. Maintainer scope decision: not applicable; no target execution, injection, mutation or protection recovery. Existing bridge version 7 is unchanged. CLI summary writes only the selected Evidence bundle; provider cleanup uses existing ownership.
  • Generated catalogs/packaged skill are regenerated ignored outputs; no binaries, dependencies or credentials are committed.

Expected effects:

  • Read existing files or captured data.
  • Launch an owned local analysis JVM; never execute an APK or attach to a target.
  • Write caller-selected Evidence output and owned temporary analysis files.

Evidence and regression coverage

Executed:

  • 111 manifest parser cases, six retained projection cases, four CLI early-validation cases and four MCP boundary cases pass. Includes historical omission, source locations, namespace aliases, unsupported data constraints, bounded copying/pages, filters, named SDK-converted schemas, retained source removal and complete/default compatibility.
  • Real JDK 21/JADX 0.7.1 metadata regression and downstream CLI/MCP method-body/direct-invoke parity pass for classes.dex and classes2.dex. Existing default-package selectors preserve raw identity and frozen metadata across source generation.
  • Public ApiDemos 6.0.18: after the review follow-up, all 355 parent rows’ identity, enabled/process/permission and grouped filter/metadata facts and the selected SMS receiver match an unfiltered independent ElementTree oracle through real stdio MCP on first/warm capture and full parent export. Original timing cohorts checked selected facts and the global count; their narrower scope is corrected explicitly in the report.
  • AAPT2-built APK: real CLI + MCP prove grouped URI data/priority, metadata, resource boolean spelling, provider grants, parent identity and every source position; independent compiled XML dump comparison passes.
  • Authentic old-runtime Evidence is queried by the new CLI with an explicitly missing engine JAR; new fields remain omitted/unknown without reopening the provider.
  • npm run check:fast, focused source/boundary tests and npm run docs:check pass. npm run format:check and npm run docs:build also pass. After rebasing onto main 620784381, all 125 focused cases, the nine docs conformance cases and fresh real ApiDemos MCP/oracle qualification pass again.

Reproduction, exact hashes, all timing/resource samples and failed attempts. Scripted whole-task text token estimates, including input schemas and proof export, fall from 118,430 to 16,881; full SDK transport estimates are separate. No actual model billing or general speed/memory improvement is claimed: final candidate two-capture time/CPU/peak sampled family RSS were 23.369 s / 36.031 s / 1,145,073,664 B, and main controls varied substantially. Heavy checks are serial and CPU/memory guarded.

Meaningful gaps: Linux x86-64/JDK21/JADX0.7.1 only; no device/emulator/runtime behavior, signature verification, other OS/JDK or actual model-usage trial. An initial all-family SDK test timed out; selecting relevant tool families preserves its assertions and passes. Test-only assumptions about source def_pos and reuse of acquisition Evidence IDs were corrected; distinct acquisitions retain distinct identities.

CI follow-up

Latest head 98f7afd88: build, type/lint, docs, Windows native build, APK-signature verification, Linux package baseline and Greptile review pass. The corrected four-case profile test explicitly passes in shard 2's log. The only review finding was fixed and resolved.

Source tests has 17 failures (nine Apple/root-identity and eight Windows native-loader cases), all independently reproduced on actual main parent 6de60993b861266e63a4e70d5c6d9a8073f7cd92. Shard 4 fails two TOML setup cases; fail-fast cancels the other seven shard jobs. Every one of the 72 failing case markers in all failed/cancelled shard logs was independently reproduced on that same pure main parent, including repeated parameterized setup cases. Main-only controls cover the matching case names and multiplicities; remaining cancelled work is unverified. Existing failures are preserved outside this Android change. Portable/required failures propagate those results.

The new selectors crossed an older full-input/output-off size assertion: 1,052,239 B versus main's 1,047,039 B. The pre-existing profile guide warns that full inputs can dominate the frame. The follow-up preserves the unchanged 1 MiB compact-input compatibility limits (compact/off outputs: 558,653 / 305,116 B), and verifies full-input schemas against each named canonical advertisement instead of imposing that compact-profile budget on an explicit full choice. No production limit is raised or full guidance discarded. Profile and Android MCP checks, exact-CI-merge profile verification, type/lint/format/docs checks pass. Global profile costs and the correction are recorded in the reproduction report.

Human readiness remains unchecked; no human review is attested. Admin bypass is used under the owner's standing authorization for these independently reproduced main failures and the human-readiness gate.

Author readiness

Human owner: @gensokyo-dev

  • 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.

Before merge

  • Concrete enhancement and static authority/scope are resolved.
  • One outcome, linked issue, conventional title, owning docs/contracts and applicable correctness/resource regressions.
  • Evidence preserves observations, derivations, provenance, original identities, failed attempts and unknown coverage.

Preserve historical unknowns and exact source locations, retain complete Evidence, and share bounded component views across CLI and MCP.

Co-authored-by: Harsh <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-27T03:09:25.373160Z
We couldn’t complete this review. Comment @codex review to try again.
a742033 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes appear safe to merge based on this follow-up review.

Summary

The PR adds selected Android manifest declarations and shared retained views for CLI and MCP callers. The latest changes clarify catalog size limits and strengthen catalog checks.

  • Android component records show more manifest declarations and their source locations.
  • Callers can filter, page, and count retained Android component declarations.
  • CLI and MCP callers can receive selected views while full Evidence stays available.
  • Android inspection behavior stays the same while metadata selectors gain regression coverage.

Reviews (3) · Last reviewed commit: "test(mcp): preserve full input guidance ..." · Reviewed by Greptile

Keep the independent oracle inventory unfiltered and derive selected matches from it. Check all parent rows before the selected view, and record verified inventory counts and historical verification scope.
Keep compact-input compatibility frame limits and verify every full input schema against its named canonical advertisement when outputs are omitted. Record measured selector overhead and clarify the existing full-profile boundary.
@gensokyo-dev
gensokyo-dev merged commit 7e8f7f6 into main Oct 27, 2026
28 of 43 checks passed
@gensokyo-dev
gensokyo-dev deleted the feat/android-component-inventory branch October 27, 2026 04:37
@morluto morluto mentioned this pull request Nov 11, 2026
3 tasks done
@morluto morluto added the enhancement New feature or request label Nov 23, 2026
@morluto morluto added the area: runtime Process capture and runtime observation label Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] inspect_android_package: return a structured component inventory (exported, permission, intent actions, foreground-service type)

2 participants