码迷,mamicode.com
首页 > 微信 > 详细

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

时间:2017-08-24 01:05:29      阅读:338      评论:0      收藏:0      [点我收藏+]

标签:dbr   end   current   string   ati   .class   sha   ram   text   

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获取微信聊天记录

标签:dbr   end   current   string   ati   .class   sha   ram   text   

原文地址:http://www.cnblogs.com/lzh-Linux/p/7420963.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!