The naming conventions for JNI functions are given by the Dalvik VM, a library couldn't change them and expect them to work, i.e. be callable from the Java part of the application. But, the Java_package_function convention is only needed for functions that Java wants to call, it it not neccesary for a C/C++
function calling another one.
If you compile
jint Java_com_example_foo(JNIEnv* env, jobject this) { return bar(); }
int bar() { return 3; }
into a library, you can call Java_com_example_foo
from java, and you won't be able to call bar
from java, but nothing prevents Java_com_example_foo
from calling bar
.
So, there are 2 possibilities that come to mind:
- the Java part is nothing but a stub that calls a
main
function in one library, and all the rest is done in C
or C++
. This main
function probably will be called Java_package_function
, not main
, but it's the only function that uses this naming convention.
- There's another wrapper library which provides the
Java_package_function
JNI API calls to the Java part, and calls the C/C++ functions which it imports from a different library. This library would probably be very small, so you might not have considered it interesting, and missed it in your previous analysis.