Xp根据数据库insert获取微信聊天记录

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Xp根据数据库insert获取微信聊天记录相关的知识,希望对你有一定的参考价值。

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");

}
}





































以上是关于Xp根据数据库insert获取微信聊天记录的主要内容,如果未能解决你的问题,请参考以下文章

discuz X3.1 源代码阅读,记录代码片段

微信小程序-模仿绘制聊天界面

INSERT INTO .. ON DUPLICATE KEY更新多行记录

错误记录Flutter 混合开发获取 BinaryMessenger 报错 ( FlutterActivityAndFragmentDelegate.getFlutterEngine() )(代码片段

获取 Bulk.Insert() -Mongoskin 的插入 ID

获取 Bulk.Insert() -Mongoskin 的插入 ID