whale icon indicating copy to clipboard operation
whale copied to clipboard

为何没有使用demo

Open haungjian opened this issue 6 years ago • 4 comments

haungjian avatar Feb 26 '19 11:02 haungjian

看代码里有很详细的注释文档

openproject avatar Mar 03 '19 15:03 openproject

写一个demo吧。这让我一个刚入门的情何以堪。

csrbzhb avatar Mar 06 '19 07:03 csrbzhb

这个的hook方式跟你写Xposed模块是几乎一样的(it is similar to the way in which you are writing the Xposed module) 这里给个常用的实例方法整体替换示例,如果喜欢用XposedHelpers类也可以

public void hookMethod(Method oldMethod, final Method newMethod) {
        XposedBridge.hookMethod(oldMethod,
                new XC_MethodReplacement() {
                    @Override
                    protected Object replaceHookedMethod(MethodHookParam param) throws Throwable {
                        Log.i(TAG, "调用替换方法");//a meaning less log to prevent crash(replacement method is too short?)
                        return newMethod.invoke(param.thisObject, param.args);
                    }
                });
    }

看看XposedBridge类的实现就知道怎么回事了

fettdrac avatar Apr 13 '19 04:04 fettdrac

Demo : xposed-hook-based-on-whale

WindySha avatar Jun 04 '19 13:06 WindySha