How chame1eon/jnitrace works
jnitrace is a Frida-based dynamic analyzer for JNI calls in Android apps. The user selects an installed app, libraries and trace options; the Python CLI connects to Frida and injects the tracing script. The injected runtime watches libraries, configures JNI/JavaVM interceptions, turns calls into structured trace data, and reports it for console display or JSON output. The graph includes the sampled data-model and type helpers. README capabilities such as filtering, backtraces and custom scripts are represented where supported; unsampled host-side callback wiring is not inferred.
Main entry points: jnitrace.py CLI and injection · main.ts JNI interception · data_transport.ts Trace transport · method_data.ts Call data model
Components 12
Host CLI
- CLI and injection
jnitrace/jnitrace.py - Trace output
jnitrace/jnitrace.py
Injected tracer
- Library watcher
jnitrace/src/main.ts - JNI interception
jnitrace/src/main.ts
Trace data
- Trace transport
jnitrace/src/transport/data_transport.ts - Call data model
jnitrace/src/utils/method_data.ts - JNI type conversion
jnitrace/src/utils/types.ts - Java signature parser
jnitrace/src/utils/java_method.ts
External runtime
- JNI tracing engine
- Frida device/server
- Android app
Other components
- Analyst
Connections 14
- Analyst → CLI and injection: configures trace
README.md - CLI and injection → Frida device/server: connects and injects
README.md - CLI and injection → Library watcher: posts configuration
jnitrace/jnitrace.py - Frida device/server → Android app: runs script in
README.md - Library watcher → JNI tracing engine: registers load callback
jnitrace/src/main.ts - JNI interception → JNI tracing engine: attaches callbacks
jnitrace/src/main.ts - Android app → JNI interception: invokes JNI calls
- JNI interception → Call data model: constructs call data
jnitrace/src/main.ts - JNI interception → Trace transport: reports calls
jnitrace/src/main.ts - Trace transport → Call data model: reads call fields
jnitrace/src/transport/data_transport.ts - Trace transport → JNI type conversion: uses type helpers
jnitrace/src/transport/data_transport.ts - Java signature parser → JNI type conversion: converts signatures
jnitrace/src/utils/java_method.ts - Trace transport → Trace output: sends trace records
- CLI and injection → Trace output: renders and saves
README.md