Tool
JNIAnalyzer
A Ghidra extension by Terry Chia (Ayrx) with scripts for analyzing the native libraries of Android NDK apps. JNIAnalyzer.java uses the bundled JADX decompiler to extract the signatures of all native methods declared in an APK and applies the return types, parameter names and parameter types to the matching functions in the loaded .so. RegisterNatives.java uses Ghidra's P-Code API to find RegisterNatives calls and lay down the JNINativeMethod structures for dynamically registered methods, and TraceRegisterNatives.java applies the output of the author's trace_registernatives tool. A JNI data-type archive sets up the jni.h types.
- Targets
- App · Binary
- Category
- Android tools
- Relationship
- Foundation tool
- Sources reviewed
Requirements & limits
- Reviewed at master 7170ce6 (2023-01-02); there are no releases and the default branch has had no commits since that date, so treat it as unmaintained and check compatibility with current Ghidra. Build the extension with Gradle against a Ghidra install (gradle -PGHIDRA_INSTALL_DIR=<dir>), then install the produced zip through Ghidra's Install Extensions dialog and restart.
- Analysis runs inside Ghidra on an Android native library the analyst has loaded and is authorized to examine. JNIAnalyzer.java reads a supplied APK with JADX to recover native-method signatures; the README warns it overwrites existing function return types and parameter names and types, and that a function annotated JNIAnalyzer:IGNORE is skipped. RegisterNatives.java is marked experimental.
- No third-party target files are committed. The repository vendors its Java build dependencies as JARs under JNIAnalyzer/lib/, including JADX, smali/baksmali, dexlib2, dx, apksig, Guava, ANTLR, RxJava, logback and others, each keeping its own open-source license; the committed android-5.1.jar is a 4-entry stub (a single android/R$style class plus JADX resources), not the Android SDK. The Gradle wrapper JAR is also committed, and data/jni_all.gdt is a Ghidra data-type archive of the JNI types.
- The repository has no license file, so reuse terms are unstated; a reviewer should confirm licensing with the author, and the vendored dependency JARs remain under their respective licenses. A Binary Ninja port exists in the author's separate binja-JNIAnalyzer repository.
- This collection read the README, script sources, build files and bundled-library listing at the reviewed commit; it did not build or run the extension, and no APK or native library was analyzed. Nothing in the project mentions AI or REA, so no REA connection is established.
About this entry
The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.
Primary sources
- README.md GitHub · Ayrx/JNIAnalyzer · Revision 7170ce6
- JNIAnalyzer/ghidra_scripts/JNIAnalyzer.java GitHub · Ayrx/JNIAnalyzer · Revision 7170ce6
- JNIAnalyzer/ghidra_scripts/RegisterNatives.java GitHub · Ayrx/JNIAnalyzer · Revision 7170ce6
- JNIAnalyzer/ghidra_scripts/TraceRegisterNatives.java GitHub · Ayrx/JNIAnalyzer · Revision 7170ce6
- JNIAnalyzer/lib GitHub · Ayrx/JNIAnalyzer · Revision 7170ce6
- JNIAnalyzer/data/README.txt GitHub · Ayrx/JNIAnalyzer · Revision 7170ce6
More in Apps
- Android Reverse · Tool
- jsc-decompile-mozjs-34 · Tool
- Andromeda · Tool
- Dex-Editor-Android · Tool
- smali/baksmali · Tool
- dalvikus · Tool