Closed MPeti1 closed 6 years ago
Solution: Can you see that param.thisObject in callMethod? Yes, I forgot to replace it here when i realized it's null if you hooked a static method.. I should get used to rubber duck debugging, because it will happen many times int the future. How did I figure it out? In the Logcat menu in AS, I clicked the first method in the stack trace, and I quickly realized that method is not setIntField, but instead callMethod, where I forgot to replace param.thisObject to param.args[0]
Here is my code: `@Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { applicationContext = AndroidAppHelper.currentApplication().getApplicationContext();
The second XposedHelpers.setIntField() throws an NPE while trying to get the class of the first argument (it's the class). But it only happens for the second time, and the AS debugger says the param.args[0] is not null, nor is it changed.
What is happening here? Why XposedHelpers don't receive that (class) object?