Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为何没有使用demo #11

Open
haungjian opened this issue Feb 26, 2019 · 4 comments
Open

为何没有使用demo #11

haungjian opened this issue Feb 26, 2019 · 4 comments

Comments

@haungjian
Copy link

No description provided.

@openproject
Copy link

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

@csrbzhb
Copy link

csrbzhb commented Mar 6, 2019

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

@openproject openproject mentioned this issue Apr 7, 2019
@fettdrac
Copy link

fettdrac commented Apr 13, 2019

这个的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类的实现就知道怎么回事了

@WindySha
Copy link

WindySha commented Jun 4, 2019

Demo :
xposed-hook-based-on-whale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants