sensorManager.registerListener(new SensorEventListener() { @Override public void onSensorChanged(SensorEvent event) { } @Override public void onAccuracyChanged(Sensor sensor, int accuracy) { } }, sensorGravity, SensorManager.SENSOR_DELAY_NORMAL);怎么hook这里的SensorEventListener?目标是hook住android.hardware.SensorManager.registerListener(SensorEventListener listener, Sensor sensor, int samplingPeriodUs) 的listener里的onSensorChanged(SensorEvent event)这个函数.XposedHelpers.findAndHookMethod("android.hardware.SensorManager", loadPackageParam.classLoader, "registerListener", SensorEvent.class, new XC_MethodHook() { @Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { SensorEventListener event = (SensorEventListener) param.args[0]; }});在官方教程里找不到描述这种hook的方法
添加回答
举报
0/150
提交
取消