I have a problem to send data from java to my ndk the problem is that i have 3 files which is inject.cpp, inject.h and inject_main.cpp all this 3 files are converting to 1 library after compiling the app with the name injectcm.so.
In inject.cpp I have my c++ codes and in inject_main.cpp I'm calling the methods of inject.cpp and now I'm trying to send an integer from java to inject.cpp with this method
java:
static {
System.loadLibrary("injectvm");
}
public native int Calculate(int num);
but in this way I can not add like this code to my inject.cpp
extern "C"
JNIEXPORT void JNICALL
Java_com_example_esp_MainActivity_Calculate (JNIEnv *env, jobject) {
__android_log_print(ANDROID_LOG_DEBUG, "LOG_TAG", "hello");
}
but this method can not work with my code is there any other way either this method to send string to ndk?
Source code I use: ---but with my codes I use it because I can access to kernel with this source https://github.com/Chainfire/injectvm-binderjack