2015-05-25 15:17:17 +08:00
2015-04-12 21:10:11 +08:00
2015-01-09 11:57:12 +08:00
2015-01-20 14:45:46 +08:00
2015-05-25 15:17:17 +08:00
2014-11-21 14:09:09 +08:00
2015-04-12 21:10:11 +08:00
2015-02-02 13:32:11 +08:00
2015-04-12 21:10:11 +08:00
2015-02-02 13:32:11 +08:00
2015-05-25 15:17:17 +08:00
2015-01-11 21:57:58 +08:00
2015-03-25 17:47:31 +08:00
2015-05-25 15:17:17 +08:00

Dump WeChat Messages from Android

WeChat(微信), as the most popular mobile IM app in China, failed to allow users to export well-formatted chat history. This tool can parse and dump WeChat chat history on a rooted android phone.

How to use:

Dependencies:

  • python-PIL
  • PyQuery
  • pysox
  • dill
  • python-csscompressor(optional)
  • adb and rooted android phone connected to PC

Get Necessary Data:

  • Get decrypted WeChat database (Linux & Mac Only):
    • Automatic: ./android-interact.sh db_decrypt
    • Manual:
      • Get /data/data/com.tencent.mm/MicroMsg/long-long-name/EnMicroMsg.db from root filesystem, possible ways are:
        • ./android-interact.sh db
        • Use your rooted file system manager app
      • Get WeChat uin, possible ways are:
        • ./android-interact.sh uin
        • Login to web wechat, get wxuin=1234567 from document.cookie
      • Get your phone IMEI number, possible ways are:
        • ./android-interact.sh imei
        • Call *#06# on your phone
        • Find IMEI in system settings
      • Decrypt database, will produce decrypted.db:
      ./decrypt_db.sh <path to EnMicroMsg.db> <imei> <uin>
      
  • Get WeChat user resource directory from your phone to resource directory:
    • ./android-interact.sh res # you might need to change the resource location in this script if the default doesn't work

Run:

  • Parse and dump text messages of every contact (resource directory is not required to run this):
./dump_msg.py decrypted.db output_dir
  • Dump messages of one contact to rich-content html, containing voice messages, emojis, and images:
./dump_html.py decrypted.db resource <contact name> output.html
  • Generate statistical report on text messages:
./report.sh message_dir

Examples:

See here for an example html.

Screenshots:

byvoid

TODO

  • (IMPORTANT) Audio file encryption method for latest version of wechat.
  • Export all messages to libchat, and render messages from libchat
  • Search by uid/username
  • Skip existing files when copying android resources
  • Fix rare unhandled types: > 10000 and < 0
  • Use alias name in group chat, instead of id
  • Better user experiences... see grep 'TODO' lib -R
  • more easy-to-use for non-programmers (GUI?)

Disclaimers

This tool is still under development and testing, therefore it might not work very well on every device.

Use this software at your own risk. The author is not responsible for any potential damage/loss/privacy issues related to the use of this tool.

S
Description
No description provided
Readme
12 MiB
Languages
Python 78.1%
Java 13.7%
HTML 3.8%
Shell 3.7%
JavaScript 0.6%