public static String getWxIMEI(String CompatibleInfoPath) {
String imei = "";
FileInputStream campatiFile = null;
try {
campatiFile = new FileInputStream(CompatibleInfoPath);
ObjectInputStream localObjectInputStream = new ObjectInputStream(campatiFile);
Map DL = (Map) localObjectInputStream.readObject();
imei = (String) DL.get(258);
campatiFile.close();
} catch (Exception e) {
e.printStackTrace();
}
return imei;
}
TelephonyManager tm = (TelephonyManager) getApplicationContext().getSystemService(TELEPHONY_SERVICE);
String strIMEI =tm.getDeviceId();
public void getUins(String filePath) {
try {
File app_brand_global_sp = new File(filePath);
if (app_brand_global_sp.exists()) {
FileInputStream in = new FileInputStream(app_brand_global_sp);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); //取得DocumentBuilderFactory实例
DocumentBuilder builder = factory.newDocumentBuilder(); //从factory获取DocumentBuilder实例
Document doc = builder.parse(in); //解析输入流 得到Document实例
Element rootElement = doc.getDocumentElement();
NodeList items = rootElement.getElementsByTagName("set");
for (int i = 0; i < items.getLength(); i++) {
Node item = items.item(i);
NodeList properties = item.getChildNodes();
for (int j = 0; j < properties.getLength(); j++) {
Node property = properties.item(j);
String nodeName = property.getNodeName();
if (nodeName.equals("string")) {
String Uin = property.getFirstChild().getNodeValue();
mapUIN.put(Common.getMD5("mm" + Uin).toLowerCase(), Uin);
LogInputUtil.e(TAG, "MMUIN = " + Common.getMD5("mm" + Uin).toLowerCase() + ", UIN = " + Uin + ",path = " + filePath);
}
}
}
}
} catch (Exception e) {
MyLog.inputLogToFile(TAG, "获取Uin异常 getUin errMsg = " + e.getMessage() + ",path = " + filePath);
}
}
String pass = Common.getMD5(wxIMEI + mapUIN.get(wxFolderPath)).substring(0, 7).toLowerCase();
String dbPath = "/data/data/com.tencent.mm/wxFolderPath/EnMicroMsg.db";
SQLiteDatabase dataTarget SQLiteDatabase.openOrCreateDatabase(dbPath , pass , null, hook);
数据库可视化工具可下载:SQLite Database Browser
核心代码示例 请点击我