公司换了打卡程序了,LSposed 已装好,找不到合适的模块。
举报· 206 次点击
登录 注册 站外分享
1 条回复  
hadesy 小成 昨天 18:55
private static void HookLocation(ClassLoader classLoader) throws ClassNotFoundException { //坐标拾取系统 https://lbs.qq.com/getPoint/ double latitude = 0.0; double longitude = 0.0; Class clazz = classLoader.loadClass( "com.tencent.map.geolocation.sapp.TencentLocationManager"); XposedHelpers.findAndHookMethod(clazz, "requestLocationUpdates", "com.tencent.map.geolocation.sapp.TencentLocationRequest", "com.tencent.map.geolocation.sapp.TencentLocationListener", new XC_MethodHook() { @Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { XposedBridge.log("requestLocationUpdates"); Class tencentLocationListenerClass = param.args[1].getClass(); XposedHelpers.findAndHookMethod(tencentLocationListenerClass, "onLocationChanged", "com.tencent.map.geolocation.sapp.TencentLocation", int.class, String.class, new XC_MethodHook() { @Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { Class tencentLocation = param.args[0].getClass(); XposedHelpers.findAndHookMethod(tencentLocation, "getLatitude", new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { XposedBridge.log("requestLocationUpdates.getLatitude:"+ param.getResult()); param.setResult(latitude); } }); XposedHelpers.findAndHookMethod(tencentLocation, "getLongitude", new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { XposedBridge.log("requestLocationUpdates.getLongitude:"+ param.getResult()); param.setResult(longitude); } }); } }); } } ); }
返回顶部