一、新建一个无界面项目
二、下载xposedBridgeAPI模块
https://github.com/924587628/XposedBridgeAPI
三、将下载的api拖进libs文件夹
四、右击jar包,选择add as library
五、修改xml文件
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" > <meta-data android:name="xposedmodule" android:value="true" /> <meta-data android:name="xposeddescription" android:value="逆向有你xposed模块" /> <meta-data android:name="xposedminversion" android:value="53" /> </application>
六、修改build.gradle,将此处修改为compileOnly 默认(implementation)
七、右击main,新建--》Folder--》Assets Folder
八、新建一个hook类,代码如下
package com.bucuo.xposedmk; import android.util.Log; import de.robv.android.xposed.IXposedHookLoadPackage; import de.robv.android.xposed.XposedBridge; import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam; public class hook implements IXposedHookLoadPackage { public void handleLoadPackage(final LoadPackageParam loadPackageParam) throws Throwable { Log.d("tag", "hook开始......"); if(!loadPackageParam.packageName.equals("com.cwvs.jdd")) return; Log.d("test","hook结束....."); } }
九、新建xposed_init文件,将内容改为包名
十、安装xposed模块,重启模拟器
禁止非法,后果自负