I'm trying to perform static analysis on Android framework code, and I'm coming across some Java methods that are calling JNI functions. How do I figure out which native libraries these functions reside in?
I haven't touched Android in almost a year but IIRC:
All JNI libraries need to be loaded from Java side first e.g.
which translates to
invoke-virtual in compiled Java.
Also, IDA Pro identifies fully qualified names in
.sos it decompiles, so you will be able to figure out Java names for those JNI functions. See also http://www.hexblog.com/?p=809.
This tool may also be of help, although it's rather old https://github.com/maaaaz/jnianalyzer.
It's been a while, but there should be a static code block with the .so they are calling. I would need to disassemble a file using a shared library.