[PR #2219] [CLOSED] fix(android): preserve duplicate JADX class aliases in searches #5092

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2219
Author: @hoony5
Created: 10/12/2026
Status: ❌ Closed

Base: main ← Head: fix/android-class-alias-inventory


📝 Commits (1)

  • a824b84 fix(android): preserve duplicate JADX class aliases with ambiguity evidence

📊 Changes

5 files changed (+61 additions, -4 deletions)

View changed files

📝 docs/android-analysis.md (+8 -0)
📝 src/android/JadxAnalysis.ts (+13 -3)
📝 src/domain/android/androidAnalysis.ts (+1 -0)
📝 tests/boundary/process/jadxIntegration.test.ts (+36 -0)
📝 tests/fixtures/android/jadx-mcp.mjs (+3 -1)

📄 Description

Problem

JADX can report distinct raw classes with the same decompiler-visible fully qualified name. In a real APK, load_apk.class_count and list_classes.total both reported 12,385 entries, but there were 12,384 unique names because okio.SegmentedByteString occurred twice. The previous uniqueness check rejected the entire search_android_classes operation as unreadable_output, even though pagination and counts were complete.

Fix

  • Preserve every class entry, including duplicate aliases, and report collisions in ambiguous_names (empty when none).
  • Keep the strict loaded-count and pagination checks; exact ambiguous class lookup remains fail-closed.
  • Add process-boundary regressions for alias collisions and genuine count mismatches, plus documentation.

Verification

  • npm run test:focused -- tests/boundary/process/jadxIntegration.test.ts: 35 tests passed.
  • npm run check:fast: passed.
  • Real CLI on an APK: search-android-classes Activity returned Evidence, 12,385 total classes and 75 matches; searching the duplicate alias returned two identical entries with ambiguous_names populated; exact ambiguous lookup was rejected.
  • Full npm run check:pr is running; will update before marking ready.

No JADX JAR modifications or target APK bytes are included.


🔄 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/2219 **Author:** [@hoony5](https://github.com/hoony5) **Created:** 10/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/android-class-alias-inventory` --- ### 📝 Commits (1) - [`a824b84`](https://github.com/morluto/rea/commit/a824b84a5c5c9a19d60c432ff06ded80a0c9eebb) fix(android): preserve duplicate JADX class aliases with ambiguity evidence ### 📊 Changes **5 files changed** (+61 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `docs/android-analysis.md` (+8 -0) 📝 `src/android/JadxAnalysis.ts` (+13 -3) 📝 `src/domain/android/androidAnalysis.ts` (+1 -0) 📝 `tests/boundary/process/jadxIntegration.test.ts` (+36 -0) 📝 `tests/fixtures/android/jadx-mcp.mjs` (+3 -1) </details> ### 📄 Description ## Problem JADX can report distinct raw classes with the same decompiler-visible fully qualified name. In a real APK, `load_apk.class_count` and `list_classes.total` both reported 12,385 entries, but there were 12,384 unique names because `okio.SegmentedByteString` occurred twice. The previous uniqueness check rejected the entire `search_android_classes` operation as `unreadable_output`, even though pagination and counts were complete. ## Fix - Preserve every class entry, including duplicate aliases, and report collisions in `ambiguous_names` (empty when none). - Keep the strict loaded-count and pagination checks; exact ambiguous class lookup remains fail-closed. - Add process-boundary regressions for alias collisions and genuine count mismatches, plus documentation. ## Verification - `npm run test:focused -- tests/boundary/process/jadxIntegration.test.ts`: 35 tests passed. - `npm run check:fast`: passed. - Real CLI on an APK: `search-android-classes Activity` returned Evidence, 12,385 total classes and 75 matches; searching the duplicate alias returned two identical entries with `ambiguous_names` populated; exact ambiguous lookup was rejected. - Full `npm run check:pr` is running; will update before marking ready. No JADX JAR modifications or target APK bytes are included. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:03:51 +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#5092
No description provided.