1
chrawsl 246 天前
看源码找找哪个方法用来获取 dpi 呗
目测是 "com.android.server.wm.WindowManagerService" 下的 "getBaseDisplayDensity" 函数 XposedHelpers.findAndHookMethod("com.android.server.wm.WindowManagerService", classLoader, "getBaseDisplayDensity", int.class, new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { super.afterHookedMethod(param); param.result = xxx; } }); 直接改 param.result 就可以修改返回值了 |