首页
社区
课程
招聘
未解决 [求助]求助各位大佬 , xposed模块如何向目标进程注入so
发表于: 2020-6-9 17:09 2398

未解决 [求助]求助各位大佬 , xposed模块如何向目标进程注入so

2020-6-9 17:09
2398

我用 callMethod 调用 doload 报错:
java.lang.NoSuchMethodError: dalvik.system.PathClassLoader#doLoad(java.lang.String)#bestmatch
求助各位大佬,我该用什么方法才能向目标进程注入一个so
代码如下:

public class HookTest implements IXposedHookLoadPackage {
    public static final String PackageName = "bin.mt.plus";
    public static final String SoPath = "/storage/emulated/0/libmt1.so";

    @Override
    public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam) throws Throwable {
        if (loadPackageParam.packageName.equals(PackageName)) {
            findAndHookMethod(Runtime.class, "doLoad", String.class, ClassLoader.class, new XC_MethodHook() {
                @Override
                protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                    XposedHelpers.callMethod(param.args[1], "doLoad", SoPath);
                }
            });
        }
    }
}

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 1
支持
分享
最新回复 (0)
游客
登录 | 注册 方可回帖
返回
//