XposedHelpers.findAndHookMethod("com.android.server.input.InputManagerService",
lpparam.classLoader, "nativeInjectInputEvent", int.class, lpparam.classLoader.loadClass("android.view.InputEvent"), int.class, int.class, int.class, int.class, int.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.log("lzf called nativeInjectInputEvent:" + param.args[3]);
XposedBridge.log("uid is :" + TargetUid + " " + param.args[3]);
if ((Integer) param.args[3] == TargetUid) {
XposedBridge.log("here:" + param.args[3]);
param.args[3] = 0;
}
}
});
TargetUid 是我程序的UID,我希望他通过系统的权限检测。但我收到此错误:
java.lang.NoSuchMethodError:com.android.server.input.InputManagerService#nativeInjectInputEvent(int,android.view.InputEvent,int,int,int,int,int)#exact
这是源代码的“ InputManagerService”。link
我在做什么错了?