https://mp.weixin.qq.com/s?__biz=MzIzNDA3MDgwNA==&mid=2649230245&idx=1&sn=3746423a481976b0d6062c508803e415&chksm=f0e75ddec790d4c8b60a905b844e782ddb310d18cb87c985510113dfabf8a82e4bee1ba8f0a0&mpshare=1&scene=23&srcid=0823VdBOlxgj3ccUc92hdYQA#rd
"EnMicroMsg.db"
public class WXMain implements IXposedHookLoadPackage{ private String CLASS_NAME_DB="com.tencent.mm.bj.e"; @Override public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable { if (lpparam.packageName.equals("com.tencent.mm")){ final Context context = (Context) callMethod(callStaticMethod(findClass("android.app.ActivityThread", null), "currentActivityThread", new Object[0]), "getSystemContext", new Object[0]); Class<?> dbClazz= XposedHelpers.findClass(CLASS_NAME_DB,lpparam.classLoader); XposedHelpers.findAndHookMethod(dbClazz, "insert", String.class, String.class, ContentValues.class, new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { super.afterHookedMethod(param); Toast.makeText(context, "insert", Toast.LENGTH_SHORT).show(); printTableInfo(param); } }); } } private void printTableInfo(XC_MethodHook.MethodHookParam param) { XposedBridge.log("\n-------------记录数据START--------\n"); String tableName= (String) param.args[0]; String str1= (String) param.args[1]; ContentValues contentValues= (ContentValues) param.args[2]; XposedBridge.log("tablename===:"+tableName+"-----"+str1+"\n"); for (String key : contentValues.keySet()) { XposedBridge.log("key--:"+key+":------:"+"value---:"+contentValues.get(key )+"\n"); } XposedBridge.log("\n-------------记录数据END--------\n"); }}
时间: 2024-10-06 22:39:28