xposed修改微信步数

 通过Hook到手机传感器,修改传感每次运动的真实数据,增加自定义步数

```
      //Hook到手机传感器,模拟步数
      final Class sensorEL = findClass("android.hardware.SystemSensorManager$SensorEventQueue", loadPackageParam.classLoader);
     private  int sportsCount = 1;
        XposedBridge.hookAllMethods(sensorEL, "dispatchSensorEvent", new XC_MethodHook() {
            @Override
            protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                Log.e(" wx_wx_sports ", " param.args[0]= " + param.args[0]);
                Log.e(" wx_wx_sports ", " param.args[1]= " + param.args[1]);
                Log.e(" wx_sports ", " start= " + ((float[]) param.args[1])[0]);
                ((float[]) param.args[1])[0] = ((float[]) param.args[1])[0] + 1234 * sportsCount;
                sportsCount++;
                Log.e(" wx_sports ", " end= " + ((float[]) param.args[1])[0]);
            }
        });
```

你可能感兴趣的:(xposed)