Xposed 常用

心住神明發表於2024-06-15

阻止或者替換某個方法業務邏輯

  XposedBridge.hookAllMethods(XposedHelpers.findClass( "com.android.xx.transaction.xx$h",
                    lpparam.classLoader),"handleMessage",new XC_MethodReplacement() {

                @Override
                protected Object replaceHookedMethod(MethodHookParam param) throws Throwable {
                    return null;
                }

            });

  

360 數字加固。某60 xposed hook 入口點

XposedHelpers.findAndHookMethod("com.stub.StubApp",
                loadPackageParam.classLoader,
                "attachBaseContext",
                Context.class,
                new XC_MethodHook() {
                    @Override
                    protected void afterHookedMethod(MethodHookParam param) throws Throwable {
                        super.afterHookedMethod(param);
                        //獲取到Context物件,透過這個物件來獲取classloader
                        Context context = (Context) param.args[0];
                        //獲取classloader,之後hook加固後的就使用這個classloader
                        ClassLoader classLoader = context.getClassLoader();
                        //已經繞過360加固取得classloader
                    }
                });

  

相關文章