|
|
@@ -8,14 +8,14 @@ We reverse-engineered the storage protocol of WeChat messages, and
|
|
|
provide this tool to decrypt and parse WeChat messages on a rooted android phone.
|
|
|
It can also render the messages into self-contained html files including voice messages, images, emojis, videos, etc.
|
|
|
|
|
|
+The tool is last verified to work with latest version of wechat on 2025/01/01.
|
|
|
If the tool works for you, please take a moment to add your phone/OS to [the wiki](https://github.com/ppwwyyxx/wechat-dump/wiki).
|
|
|
|
|
|
## How to use:
|
|
|
|
|
|
#### Dependencies:
|
|
|
+ adb and rooted android phone connected to a Linux/Mac OSX/Win10+Bash.
|
|
|
- If the phone does not come with adb support, you can try download an app.
|
|
|
-+ Python >= 3.6
|
|
|
++ Python >= 3.8
|
|
|
+ [sqlcipher](https://github.com/sqlcipher/sqlcipher) >= 4.1
|
|
|
+ sox (command line tools)
|
|
|
+ Silk audio decoder (included; build it with `./third-party/compile_silk.sh`)
|
|
|
@@ -26,7 +26,8 @@ If the tool works for you, please take a moment to add your phone/OS to [the wik
|
|
|
1. Pull database file and (for older wechat versions) avatar index:
|
|
|
+ Automatic: `./android-interact.sh db`. It may use an incorrect userid.
|
|
|
+ Manual:
|
|
|
- + Figure out your `${userid}` by inspecting the contents of `/data/data/com.tencent.mm/MicroMsg` on the __root__ filesystem of the device. It should be a 32-character-long name consisting of hexadecimal digits.
|
|
|
+ + Figure out your `${userid}` by inspecting the contents of `/data/data/com.tencent.mm/MicroMsg` on the __root__ filesystem of the device.
|
|
|
+ It should be a 32-character-long name consisting of hexadecimal digits.
|
|
|
+ Get `/data/data/com.tencent.mm/MicroMsg/${userid}/EnMicroMsg.db` from the device.
|
|
|
2. Decrypt database file:
|
|
|
+ Automatic: `./decrypt-db.py decrypt --input EnMicroMsg.db`
|
|
|
@@ -52,11 +53,12 @@ If the tool works for you, please take a moment to add your phone/OS to [the wik
|
|
|
If the above decryption doesn't work, you can also try the [password cracker](https://github.com/chg-hou/EnMicroMsg.db-Password-Cracker)
|
|
|
to brute-force the key. The encryption key is not very strong.
|
|
|
|
|
|
-3. Copy the WeChat user resource directory `/mnt/sdcard/tencent/MicroMsg/${userid}/{avatar,emoji,image2,sfs,video,voice2}` from the phone to the `resource` directory:
|
|
|
+3. Copy the WeChat user resource directory `/data/data/com.tencent.mm/MicroMsg/${userid}/{avatar,emoji,image2,sfs,video,voice2}` from the phone to the `resource` directory:
|
|
|
+ `./android-interact.sh res`
|
|
|
+ Change `RES_DIR` in the script if the location of these directories is different on your phone.
|
|
|
- + This can take a while. Can be faster to first archive it with `tar` with or without compression, and then copy the archive,
|
|
|
- `busybox tar` is recommended as the Android system's `tar` may choke on long paths.
|
|
|
+ For older version of wechat, the directory may be `/mnt/sdcard/tencent/MicroMsg/`
|
|
|
+ + This can take a while. It can be faster to first archive it with `tar` with or without compression, and then copy the archive,
|
|
|
+ `busybox tar` is recommended as the Android system's `tar` may choke on long paths.
|
|
|
+ In the end, we need a `resource` directory with the following subdir: `avatar,emoji,image2,sfs,video,voice2`.
|
|
|
|
|
|
4. (Optional) Download the emoji cache from [here](https://github.com/ppwwyyxx/wechat-dump/releases/download/0.1/emoji.cache.tar.bz2)
|
|
|
@@ -101,10 +103,10 @@ Screenshots of generated html:
|
|
|
|
|
|
See [here](http://ppwwyyxx.com/static/wechat/example.html) for an example html.
|
|
|
|
|
|
-### TODO List
|
|
|
-+ Fix rare unhandled message types: > 10000 and < 0
|
|
|
-+ Better user experiences... see `grep 'TODO' wechat -R`
|
|
|
-
|
|
|
+### TODO List (help needed!)
|
|
|
+* __IMPORTANT__ Some emojis and chat images are stored in a proprietary "wxgf" format. We don't yet know how to decode this format.
|
|
|
+* Fix rare unhandled message types: > 10000 and < 0
|
|
|
+* Better user experiences... see `grep 'TODO' wechat -R`
|
|
|
|
|
|
### Donate!
|
|
|
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=7BC299GRDLEDU&lc=US&item_name=wechat%2ddump&item_number=wechat%2ddump¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted">
|