首页
社区
课程
招聘
xposed hook 总是找不到apk 搞不清楚原因,求指教
发表于: 2020-4-24 12:52 3934

xposed hook 总是找不到apk 搞不清楚原因,求指教

2020-4-24 12:52
3934
04-24 11:06:01.297 I/Xposed  (  768): -----------------
04-24 11:06:01.297 I/Xposed  (  768): Starting Xposed version 89, compiled for SDK 23
04-24 11:06:01.297 I/Xposed  (  768): Device: MI 5 (Xiaomi), Android version 6.0 (SDK 23)
04-24 11:06:01.297 I/Xposed  (  768): ROM: MRA58K
04-24 11:06:01.297 I/Xposed  (  768): Build fingerprint: Xiaomi/gemini/gemini:6.0/MRA58K/6.5.12:user/release-keys
04-24 11:06:01.297 I/Xposed  (  768): Platform: arm64-v8a, 64-bit binary, system server: yes
04-24 11:06:01.297 I/Xposed  (  768): SELinux enabled: yes, enforcing: yes
04-24 11:06:01.422 I/Xposed  (  768): -----------------
04-24 11:06:01.422 I/Xposed  (  768): Added Xposed (/system/framework/XposedBridge.jar) to CLASSPATH
04-24 11:06:01.831 I/Xposed  (  768): Detected ART runtime
04-24 11:06:01.863 I/Xposed  (  768): Found Xposed class 'de/robv/android/xposed/XposedBridge', now initializing
04-24 11:06:02.451 I/Xposed  (  768): Loading modules from /data/app/com.example.MainActivity-2/base.apk
04-24 11:06:02.468 E/Xposed  (  768):   Cannot load module:
04-24 11:06:02.468 E/Xposed  (  768):   The Xposed API classes are compiled into the module's APK.
04-24 11:06:02.468 E/Xposed  (  768):   This may cause strange issues and must be fixed by the module developer.
04-24 11:06:02.468 E/Xposed  (  768):   For details, see: http://api.xposed.info/using.html
04-24 11:06:11.979 I/Xposed  (  769): -----------------
04-24 11:06:11.979 I/Xposed  (  769): Starting Xposed version 89, compiled for SDK 23
04-24 11:06:11.979 I/Xposed  (  769): Device: MI 5 (Xiaomi), Android version 6.0 (SDK 23)
04-24 11:06:11.979 I/Xposed  (  769): ROM: MRA58K
04-24 11:06:11.979 I/Xposed  (  769): Build fingerprint: Xiaomi/gemini/gemini:6.0/MRA58K/6.5.12:user/release-keys
04-24 11:06:11.979 I/Xposed  (  769): Platform: arm64-v8a, 32-bit binary, system server: no
04-24 11:06:11.979 I/Xposed  (  769): SELinux enabled: yes, enforcing: yes
04-24 11:06:11.981 I/Xposed  (  769): -----------------
04-24 11:06:11.981 I/Xposed  (  769): Added Xposed (/system/framework/XposedBridge.jar) to CLASSPATH
04-24 11:06:12.155 I/Xposed  (  769): Detected ART runtime
04-24 11:06:12.168 I/Xposed  (  769): Found Xposed class 'de/robv/android/xposed/XposedBridge', now initializing
04-24 11:06:12.420 I/Xposed  (  769): Loading modules from /data/app/com.example.MainActivity-2/base.apk
04-24 11:06:12.433 E/Xposed  (  769):   Cannot load module:
04-24 11:06:12.433 E/Xposed  (  769):   The Xposed API classes are compiled into the module's APK.
04-24 11:06:12.433 E/Xposed  (  769):   This may cause strange issues and must be fixed by the module developer.
04-24 11:06:12.433 E/Xposed  (  769):   For details, see: http://api.xposed.info/using.html
04-24 11:07:03.599 E/XposedInstaller( 5268): Xposed Installer is outdated (resource string "installer_needs_update" is missing)


package hook;

import android.util.Log;

import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_LoadPackage;


public class hookgifmaker implements IXposedHookLoadPackage {
    private final String PAGE_NAME = "com.smile.MainActivity";

    @Override
    public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable {
        XposedBridge.log("afterHookedMethod 函数返回值:");
        final Class<?> clazz = XposedHelpers.findClass("g.d0.d.a.j$q", lpparam.classLoader);

        if (!lpparam.packageName.equals(PAGE_NAME)) return;

        XposedHelpers.findAndHookMethod(clazz, "b", null, new XC_MethodHook() {

            @Override
            protected void afterHookedMethod(MethodHookParam param) throws Throwable {

                super.afterHookedMethod(param);

                XposedBridge.log("afterHookedMethod 函数返回值:" + param.getResult());
                Log.i("hook到的信息", "正在hook 请注意");
                Log.i("hook的结果为", String.valueOf(param.getResult()));

            }

        });

    }

}


[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!

最后于 2020-4-24 12:52 被Erlösung编辑 ,原因:
收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 86
活跃值: (2475)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
XposedBridgeApi-89.jar需要使用compileOnly方式。
或者删掉XposedBridgeApi-89.jar,build.gradle 增加 compileOnly 'de.robv.android.xposed:api:82'

最后于 2020-4-24 13:16 被jpacg编辑 ,原因:
2020-4-24 13:13
0
游客
登录 | 注册 方可回帖
返回
//