Skip to content

[Bug] inspect-android-jni-bindings reports complete with zero libraries for a base APK whose native libraries are in required splits #9756

Open

Description

@podut

Before submitting

Area

Native analysis or decompilation

Current limitation

inspect-android-jni-bindings reports library_inventory.status: "complete" with zero libraries for a base APK whose manifest requires ABI and density splits, even though the native libraries live in those splits. Nothing in the output says libraries may be elsewhere.

Reproduced on main at e9b6c87c1 (Windows 11, JDK 21, jadx-headless-mcp 0.7.1), on the base APK of a production app (9 DEX files):

library_inventory: {"status":"complete","examined_entries":2776,"selected_libraries":0,"unknowns":[]}
declarations: 136   (native method declarations in DEX)
bindings: 0
the word "split" appears 0 times in the output

In the same sweep, 4 of 5 base APKs declare requiredSplitTypes="base__abi,base__density" in their manifests. For one of them, the arm64 split APK alone contains 11 native libraries (lib/arm64-v8a/), so the base APK's zero is not "no libraries", it is "none in this file". The other results: 136 / 295 / 2,089 / 7 native declarations in four APKs, all with complete and zero libraries. (The requiredSplitTypes attribute was read by the sweep, not re-verified by me.)

Use cases

  • An agent reads complete and zero libraries and concludes the app has no native code, while the 136 declarations point to JNI methods whose libraries it never looked at.

Desired outcome and success criteria

  • When the manifest declares required split types (or isSplitRequired), report that native libraries may be in splits as an explicit unknown or limitation on the library inventory, instead of an unqualified complete.
  • No change to behavior for APKs without required splits.
  • Success: the base APK above reports an unknown naming the required split types, with declarations unchanged.

Expected interaction with targets

Read existing files or captured data.

Verification available so far

Reproduced twice on the base APKs; the complete/zero/no-"split" output is the same each time. I did not check how inspect-android-package presents the same fact.

Verification details

Activity

  1. Huyvux12 commented on Nov 10, 2026

    @Huyvux12

    Reproduced on main at d4a7c20e: a base APK fixture with a binary AndroidManifest.xml declaring android:requiredSplitTypes="base__abi,base__density" (plus android:isSplitRequired) and no lib/*.so entries reports library_inventory complete with 0 libraries and no unknowns mentioning splits — the same complete/0/no-"split" outcome as the report.

    I plan to fix it in src/android/AndroidJniLibraries.ts: read the root manifest's split requirements from the admitted APK and append an explicit unknown to library_inventory.unknowns naming the required split types (or isSplitRequired when no types are named), leaving status as complete for this file and leaving behavior unchanged for APKs without required splits. Adding regression tests in tests/boundary/android/androidJniLibraries.test.ts (fail before, pass after), including a no-splits control case.

  2. 2SinceJuly commented on Nov 10, 2026

    @2SinceJuly
    Contributor

    Opened #9769: the admitted APK's binary manifest is now read for requiredSplitTypes/isSplitRequired, and the library inventory reports an explicit unknown naming the required splits instead of a bare complete. Manifests without split declarations are unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions