I'm doing reverse engineering of a mobile application for android and I had a question how to find the executable code of the native method in the library * .so. From the code of the code, the native method void method(int i)
is called. But it is not in the list of exported functions in the library!
I made a test project. The fact is that when we declare the native method in Java code, we write this:
extern "C"
JNIEXPORT jstring
JNICALL
Java_com_test_MainActivity_stringFromJNI(
JNIEnv *env,
jobject /* this */) {
std::string hello = "Hello from C++";
return env->NewStringUTF(hello.c_str());
}
in this case the method will be in the list of exported library methods. I do not understand how to define the native function so that it is not visible in the list of exported functions? And how to look for the source code for such functions?