You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] inspect-android-jni-bindings reports complete with zero libraries for a base APK whose native libraries are in required splits #9756
I understand the contribution scope must be reviewed before integration; open questions are welcome here.
This request does not include credentials, private samples, or sensitive target data.
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.
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_inventorycomplete 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.
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.
Activity
Huyvux12 commentedon Nov 10, 2026
Reproduced on
mainatd4a7c20e: a base APK fixture with a binaryAndroidManifest.xmldeclaringandroid:requiredSplitTypes="base__abi,base__density"(plusandroid:isSplitRequired) and nolib/*.soentries reportslibrary_inventorycompletewith 0 libraries and no unknowns mentioning splits — the samecomplete/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 tolibrary_inventory.unknownsnaming the required split types (orisSplitRequiredwhen no types are named), leavingstatusascompletefor this file and leaving behavior unchanged for APKs without required splits. Adding regression tests intests/boundary/android/androidJniLibraries.test.ts(fail before, pass after), including a no-splits control case.2SinceJuly commentedon Nov 10, 2026
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 barecomplete. Manifests without split declarations are unchanged.