frida
frida copied to clipboard
[ASK FOR TIPS] How can i find native function source?
Hi all,
There ise a native function but i dont know which library has it. How can i find?
public static native Object m45a(int r0, int r1, long j, String str, Object obj);
There are 2 possible ways to achieve that.
Method 1: You could find whether there is System.loadLibrary(<modname>) or System.load(<modname>) in the same class where the native function declared, then the library should be lib<modname>.so. As example bellow, the library contains stringFromJNI() is libtestnativelibrary.so

Method 2: Using APIResolver from frida.
var resolver = new ApiResolver('module');
resolver.enumerateMatches('exports:{module name wildcard}!{exported function name wildcard}');
Example:
