# 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.

- Type: Tool
- Targets: App · Binary
- Category: Android tools
- Relationship: Foundation tool
- Sources reviewed: 2026-10-27
- Added to the catalog: 2026-11-03
- Original resource: <https://github.com/Ayrx/JNIAnalyzer>
- Primary source: <https://github.com/Ayrx/JNIAnalyzer/blob/7170ce6bd138caa6be702e357b3aeb74231ae12f/README.md>
- Catalog page: <https://awesomerea.org/resources/jnianalyzer/>
- Record JSON: <https://awesomerea.org/resources/jnianalyzer/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/jnianalyzer/index.md)

## 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; the vendored dependency JARs remain under their respective licenses. A Binary Ninja port exists in the author's separate binja-JNIAnalyzer repository.

## Primary sources

1. <https://github.com/Ayrx/JNIAnalyzer/blob/7170ce6bd138caa6be702e357b3aeb74231ae12f/README.md>
2. <https://github.com/Ayrx/JNIAnalyzer/blob/7170ce6bd138caa6be702e357b3aeb74231ae12f/JNIAnalyzer/ghidra_scripts/JNIAnalyzer.java>
3. <https://github.com/Ayrx/JNIAnalyzer/blob/7170ce6bd138caa6be702e357b3aeb74231ae12f/JNIAnalyzer/ghidra_scripts/RegisterNatives.java>
4. <https://github.com/Ayrx/JNIAnalyzer/blob/7170ce6bd138caa6be702e357b3aeb74231ae12f/JNIAnalyzer/ghidra_scripts/TraceRegisterNatives.java>
5. <https://github.com/Ayrx/JNIAnalyzer/tree/7170ce6bd138caa6be702e357b3aeb74231ae12f/JNIAnalyzer/lib>
6. <https://github.com/Ayrx/JNIAnalyzer/blob/7170ce6bd138caa6be702e357b3aeb74231ae12f/JNIAnalyzer/data/README.txt>

## More in Apps

- [Android Reverse](https://awesomerea.org/resources/ultrasina-android-reverse/index.md) · Tool
- [jsc-decompile-mozjs-34](https://awesomerea.org/resources/jsc-decompile-mozjs-34/index.md) · Tool
- [Andromeda](https://awesomerea.org/resources/andromeda/index.md) · Tool
- [Dex-Editor-Android](https://awesomerea.org/resources/dex-editor-android/index.md) · Tool
- [smali/baksmali](https://awesomerea.org/resources/smali-baksmali/index.md) · Tool
- [dalvikus](https://awesomerea.org/resources/dalvikus/index.md) · Tool

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
