前言
最近了解到Frida这个框架,感觉很神奇,同样是hook,但是不用像xposed那么麻烦。而且安装也十分的简单。安装可以看这篇文章
XposedHook
这里用xposed框架实现了一遍。比较简单,就不多讲了。
主要代码如下:
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam) throws Throwable {
if(loadPackageParam.packageName.equals("com.example.seccon2015.rock_paper_scissors")){
Log.d("hx", "handleLoadPackage: "+loadPackageParam.packageName);
XposedHelpers.findAndHookMethod("com.example.seccon2015.rock_paper_scissors.MainActivity", loadPackageParam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod