0

I want to learn how listen certain .so files. I mean what is the way to know which fuctions are called which body of code executed in shared library at Android? I just wanted mofify stock camera on my Samsung device unlock some fps modes, maybe build my own custom rom and etc

1 Answer 1

0

Usually when an Android app calls a method that is implemented as native code in a .so you can find those methods in the decompiled DEX code in the APK file. If you for example decompile the APK with Jadx you will find certain Java methods are marked as native and that doe not have a Java method body.

For each native method there should be a corresponding function in one of the loaded .so files. The common way is to export Java Native (JNI) functions, so loading the .so file in a tool like Ghidra or IDA Pro and check the exported functions list. The JNI methods have a special naming scheme that includes the full package name, class name, method name. For more details see e.g. this answer.

For identifying called methods on Java and native level frida-trace (requires rooted Android device) is a very helpful tool. You can mark certain Java or native methods to be traced. Using wildcards you can mark a large list of methods to be traced. This way you can identify if methods that may sound interesting based on their name are really called when you execute a certain function.

Not the answer you're looking for? Browse other questions tagged or ask your own question.