frida icon indicating copy to clipboard operation
frida copied to clipboard

[ASK FOR TIPS] How can i find native function source?

Open tahafatih opened this issue 3 years ago • 1 comments

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);

tahafatih avatar Sep 04 '22 21:09 tahafatih

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 image

Method 2: Using APIResolver from frida.

var resolver = new ApiResolver('module');
resolver.enumerateMatches('exports:{module name wildcard}!{exported function name wildcard}');

Example: image

kiven7299 avatar Sep 15 '22 02:09 kiven7299