Sorry to bother again, after a few hours reading and trying i am still in need of a bit of assitance.
OnCreate wasnt working the way i intended so i switched to a loadlibrary hook, i intended to load my library after the last unique library is loaded from the application, i need to obviously add in the param result check to make sure lib is loaded successfully but at the moment i can see through catlog the lib is loaded without a problem.
The lib i am using is just the sample/hello-jni from NDK
Defined as:
jstring Java_com_example_hellojni_HelloJni_stringFromJNI( JNIEnv* env,
jobject thiz )
public native String stringFromJNI(); // should just return a simple string
so com.example.hellojni.HelloJni.stringFromJNI(); is what i wanna call, trying the following i always get a class not found exception.
Code:
try {
Class<?> exampleclass = XposedHelpers.findClass("com.example.hellojni.HelloJni", (ClassLoader)lpparam.classLoader);
if (exampleclass != null){
XposedBridge.log("NativeCALL-Result: " + (String)exampleclass.getMethod("stringFromJNI").invoke(null));
}
} catch (Exception e) {
e.printStackTrace();
}
any clue ? i know the library is loaded successfully through cat log.