jnianalyzer | simple tool to help finding JNI calls | Wrapper library
kandi X-RAY | jnianalyzer Summary
kandi X-RAY | jnianalyzer Summary
A simple tool to help finding JNI calls in a x86/ARM disassembly listing. Originally presented in this article [archived here] the script has been modified in order to support both x86 syntaxes as well as ARM. Thus, it can be used for debugging/reverse engineering Android native libraries using JNI.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Parse the X86 instruction
- Return the name of the JNI call
- Run arm analysis
jnianalyzer Key Features
jnianalyzer Examples and Code Snippets
Community Discussions
Trending Discussions on jnianalyzer
QUESTION
I'm trying to understand an Android app which contains a native method named foo
in class com.app.Bar
Inside class Bar
there is a static clause that loads a shared object System.loadLibrary("libfoo.so")
which I assume is build with -fvisibility=hidden because the only export is JNI_OnLoad
, no JNIEXPORT void JNICALL Java_com_app_Bar_foo
which means public native int foo
does not follow the naming convention.
- What is the process when
foo
is invoked ? - How can I extract the address of
foo
? I'm familiar with Frida - Is there a way to output all
JNINativeMethod[] methods
?
What have I tried so far ?
JNIAnalyzer outputs 13K lines that look like
JNI_OnLoad@@Base+0x712e
Frida script to try to find
foo
address (did not work)
ANSWER
Answered 2019-Nov-06 at 10:30I've solved it using Frida
Hooking art::JNI::RegisterNativeMethods(_JNIEnv*, _jclass*, JNINativeMethod const*, int, bool)
and art::JNI::FindClass
after libart.so
module is loaded.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jnianalyzer
You can use jnianalyzer like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page