[PR #6417] [CLOSED] fix(android): accept JADX binary class names #7346

Closed
opened 2026-11-01 21:47:13 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6417
Author: @dannyward630
Created: 10/22/2026
Status: ❌ Closed

Base: main ← Head: fix/6398-android-binary-class-names


📝 Commits (1)

  • 0258ee4 fix(android): accept JADX binary class names (#6398)

📊 Changes

7 files changed (+103 additions, -5 deletions)

View changed files

📝 bridge/android/ReaJadxBridge.java (+5 -3)
📝 scripts/verify/android/metadata.mjs (+7 -0)
📝 src/android/JadxAnalysis.ts (+5 -2)
📝 src/android/JadxProtocol.ts (+1 -0)
📝 tests/boundary/android/JadxAnalysis.test.ts (+59 -0)
📝 tests/conformance/android/ReaJadxMetadataRegression.java (+25 -0)
📝 tests/fixtures/android/jadx-mcp.mjs (+1 -0)

📄 Description

Summary

Fixes #6398

Allow inspect-android-method to resolve JADX classes when callers use the JVM binary name with $.

Problem and expected behavior

JADX exposes nested and anonymous classes with a canonical full name and a raw binary name. Callers use the raw binary name, but the bridge indexed only the canonical name and the application layer rejected a response whose canonical name differed from the requested name. The tool therefore returned a generic invalid_request for valid class names. Either identity should resolve the same class while the canonical name remains available for display and follow-up provider calls.

Change and scope

The bridge now includes and indexes both names, avoiding duplicate entries when they match. The TypeScript boundary validates the raw name and accepts either name as the requested identity while retaining the canonical name for provider calls. Unit and real-provider regressions cover a nested class lookup and method retrieval using an actual ApiDemos APK.

This stays within the existing JADX metadata lookup flow; no new provider, target authority, or mutation behavior is added. A maintainer scope decision is not applicable.

Contract and boundary impact

  • Semantic owner and earliest changed stage: JADX bridge class summary and index.
  • Contribution scope fit and linked maintainer decision: Existing read-only JADX lookup; no new capability. Not applicable.
  • CLI and MCP/tool-catalog contract: No schema change; existing class and method lookup now accepts the binary class name.
  • Provider, bridge, target-format, or platform compatibility: Supports canonical and JVM binary class names.
  • Evidence, artifact, provenance, or reconstruction contract: Preserves canonical and raw source names separately.
  • Target selection, authority, upstream behavior, and cleanup details: Existing APK selection and provider lifecycle are unchanged.
  • 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

  • Tests added or updated: Boundary test for a $ binary name; mock provider fixture; real Java conformance regression that resolves a nested ApiDemos class by raw name and retrieves a method.
  • Base reproduction or other evidence: Source-derived reproduction: the base bridge indexed only full_name, and the application rejected a response whose canonical name differed from the requested binary name. The new real-provider regression reports inner=true method=true.
  • User-visible CLI/MCP output: No output schema change; the existing class summary and method result are now returned for binary-name lookup.
  • Remaining proof gaps: No Android device execution test; the changed path is static APK metadata lookup.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run check — passed.
  • npm run verify:android — passed with the pinned JADX bridge and ApiDemos APK; binary-name regression, CLI/MCP package checks, parity, cleanup, and readiness checks passed.
  • npm run test:focused -- tests/boundary/android/JadxAnalysis.test.ts tests/boundary/process/jadxIntegration.test.ts — 27 unit tests passed; 48 process tests skipped because the real-provider lane runs them separately.
  • npm run verify:windows-native:artifact — passed; restored version-matched artifact digest verified.
  • Push precheck npm run check:fast — passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: None.
  • Real Hopper/Ghidra, browser, or OS coverage: Not applicable. The real JADX provider lane passed.
  • Package or release metadata impact: None.
  • Security, privacy, process, or containment review: Read-only class metadata lookup; no new target execution or mutation authority.

Author readiness

Human owner:

  • 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

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

Assisted by Codex (GPT-6).


🔄 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/6417 **Author:** [@dannyward630](https://github.com/dannyward630) **Created:** 10/22/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/6398-android-binary-class-names` --- ### 📝 Commits (1) - [`0258ee4`](https://github.com/morluto/rea/commit/0258ee4f877a4ed38adce2f9276bedae674ddbb1) fix(android): accept JADX binary class names (#6398) ### 📊 Changes **7 files changed** (+103 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `bridge/android/ReaJadxBridge.java` (+5 -3) 📝 `scripts/verify/android/metadata.mjs` (+7 -0) 📝 `src/android/JadxAnalysis.ts` (+5 -2) 📝 `src/android/JadxProtocol.ts` (+1 -0) 📝 `tests/boundary/android/JadxAnalysis.test.ts` (+59 -0) 📝 `tests/conformance/android/ReaJadxMetadataRegression.java` (+25 -0) 📝 `tests/fixtures/android/jadx-mcp.mjs` (+1 -0) </details> ### 📄 Description ## Summary Fixes #6398 Allow `inspect-android-method` to resolve JADX classes when callers use the JVM binary name with `$`. ## Problem and expected behavior JADX exposes nested and anonymous classes with a canonical full name and a raw binary name. Callers use the raw binary name, but the bridge indexed only the canonical name and the application layer rejected a response whose canonical name differed from the requested name. The tool therefore returned a generic `invalid_request` for valid class names. Either identity should resolve the same class while the canonical name remains available for display and follow-up provider calls. ## Change and scope The bridge now includes and indexes both names, avoiding duplicate entries when they match. The TypeScript boundary validates the raw name and accepts either name as the requested identity while retaining the canonical name for provider calls. Unit and real-provider regressions cover a nested class lookup and method retrieval using an actual ApiDemos APK. This stays within the existing JADX metadata lookup flow; no new provider, target authority, or mutation behavior is added. A maintainer scope decision is not applicable. ## Contract and boundary impact - Semantic owner and earliest changed stage: JADX bridge class summary and index. - Contribution scope fit and linked maintainer decision: Existing read-only JADX lookup; no new capability. Not applicable. - CLI and MCP/tool-catalog contract: No schema change; existing class and method lookup now accepts the binary class name. - Provider, bridge, target-format, or platform compatibility: Supports canonical and JVM binary class names. - Evidence, artifact, provenance, or reconstruction contract: Preserves canonical and raw source names separately. - Target selection, authority, upstream behavior, and cleanup details: Existing APK selection and provider lifecycle are unchanged. - Generated metadata, package, or installation impact: None. Expected effects: - [x] 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 - Tests added or updated: Boundary test for a `$` binary name; mock provider fixture; real Java conformance regression that resolves a nested ApiDemos class by raw name and retrieves a method. - Base reproduction or other evidence: Source-derived reproduction: the base bridge indexed only `full_name`, and the application rejected a response whose canonical name differed from the requested binary name. The new real-provider regression reports `inner=true method=true`. - User-visible CLI/MCP output: No output schema change; the existing class summary and method result are now returned for binary-name lookup. - Remaining proof gaps: No Android device execution test; the changed path is static APK metadata lookup. For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `npm run check` — passed. - `npm run verify:android` — passed with the pinned JADX bridge and ApiDemos APK; binary-name regression, CLI/MCP package checks, parity, cleanup, and readiness checks passed. - `npm run test:focused -- tests/boundary/android/JadxAnalysis.test.ts tests/boundary/process/jadxIntegration.test.ts` — 27 unit tests passed; 48 process tests skipped because the real-provider lane runs them separately. - `npm run verify:windows-native:artifact` — passed; restored version-matched artifact digest verified. - Push precheck `npm run check:fast` — passed. ## Compatibility, safety, and release - Breaking changes or migration steps: None. - Real Hopper/Ghidra, browser, or OS coverage: Not applicable. The real JADX provider lane passed. - Package or release metadata impact: None. - Security, privacy, process, or containment review: Read-only class metadata lookup; no new target execution or mutation authority. ## Author readiness Human owner: <!-- @GitHub-handle --> - [ ] 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 - [ ] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] The PR has one focused outcome and the title follows `type(scope): outcome`. - [ ] Related issue is linked, or the reason for not linking one is stated above. - [ ] Tests cover changed observable behavior and meaningful failure paths. - [ ] Owning docs, contracts, and generated metadata are updated where needed. - [ ] User-visible CLI/MCP changes include representative output. - [ ] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. Assisted by Codex (GPT-6). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:47:13 +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#7346
No description provided.