- have a useful backup of your whatsapp chats?
- be able to read your whatsapp chats again using a backup file?
- delete the grown-too-big message history of whatsapp without losing the possibility to read the old conversations?
- read older messages without the need of endlessly pressing the annoying "load older messages" button?
- be able to search old messages?
Here is a little Tool to display whatsapp chats on your computer, using the database files from your android installation of whatsapp.
It's called WhatsApp Xtract and was created by Fabio Sangiacomo and me.
Preview of the result:
So here is WhatsApp Xtract v2.3
Released on April 25th, 2018
Tested with Whatsapp (Android) 2.18.46
Tested with Whatsapp (iPhone) 2.5.1
v2.3 (updated by ztedd - Apr 25, 2018)
- fixed image preview to work with new Whatsapp database format
- some minor fixes
v2.2 (updated by ztedd - Nov 17, 2012)
- now supports new emoji smileys
- (Android Version) hotfix for TypeError in b64encode
- (Android Version) decoded file won't be deleted even if it can't be opened
v2.1 (updated by Fabio Sangiacomo and ztedd - May 7th, 2012)
- improved install pyCrypto.bat
- added easy drag and drop possibility with whatsapp_xtract_drag'n'drop_database(s)_here.bat
- (Android Version) added support to fix corrupted android whatsapp database (needs sqlite3, for windows sqlite3.exe is contained in the archive)
- (Android Version) removed wrong extraction of owner in android version
- (Iphone Version) information from Z_METADATA table will be printed to shell
- (Iphone Version) fixed bug in support of older Iphone whatsapp databases
V2.0 (updated by Fabio Sangiacomo and ztedd - Apr 28, 2012)
- supports WhatsApp DBs coming from both Android and iPhone platforms
- (Android Version) wa.db is optional
- (Android Version) now also crypted msgstore.db.crypt from the SD card can be imported
- chat list is sorted by the last sent message
- fixed some bugs (e.g. that the script didn't work with python 3)
Feel free to take the code and improve it. So maybe we could include some code from this different version which is able to export separate htmls for each chat:
How to use:
(instrucciones en español / deutsche Anleitung - old)
- You need a copy of the whatsapp database and (if no root) get your key.
a) if your Android phone is rooted:
get these files:
/data/data/com.whatsapp/databases/msgstore.db and wa.db
(for this you need root access. detailed instructions in the bottom of this file.
The advantage of having wa.db is that the corresponding contact names of phone numbers will be displayed.)
b) if you have a normal Android (not rooted):
you need this to get the key:
[Tool] WhatsApp Key/DB Extractor | CRYPT6-12 | NON-ROOT
then you need the .crypt12 database from /sdcard/WhatsApp/Databases/
then you need a tool like Whatsapp Viewer to decrypt the database file:
The decrypted database can already be viewed in Whatsapp Viewer. If you want the output style from Whatsapp xtract then you can continue with the decrypted file.
c) On IPhone, get this file (don't know if it still works in 2018):
(You can use an Iphone Backup Tool to get the file, e.g. I-Twin or Iphone Backup Extractor. Make sure to create an unencrypted backup with Itunes, as these tools can't handle encrypted backups. Another possibility are forensic tools like UFED Physical Analyzer.)
- Extract this archive (Whatsapp_Xtract....zip) to a certain folder on your computer, e.g. C:\WhatsApp.
- Copy the database(s) to e.g. C:\WhatsApp (on Android, you simply copy the whole folder WhatsApp on SD card to your computer e.g. to C:\WhatsApp and then copy the database file from C:\WhatsApp\Databases to C:\WhatsApp)
- You need Python
It's available for Windows, Linux and Mac. However in my HowTo, I focus on Windows.
- Now run whatsapp_xtract_android.bat or whatsapp_xtract_iphone.bat
OR simply drag and drop the database file(s) to whatsapp_xtract_drag'n'drop_database(s)_here.bat
OR whatsapp_xtract_console.bat and then manually specify the input file with one of these commands:
COMMAND LINE OPTIONS:
For Android DB:
python whatsapp_xtract.py msgstore.db -w wa.db
OR (if wa.db is unavailable)
python whatsapp_xtract.py msgstore.db
For iPhone DB: (-w option is ignored)
python whatsapp_xtract.py ChatStorage.sqlite
The resulting file size of the .html file will be slightly bigger than the size of the original .db.crypt12 database.
Whatsapp Xtract 2.3 2018-04-25 (~ 1,8 MB)
samples of needed input files and Media folder
also available here:
IF SOMETHING DOESN'T WORK:
1. First check if you already have the newest download (check full name of the .zip file: is it the same as in mentioned in this thread?). Maybe your error already has been fixed.
2. Read the post Some additional information and read the last pages of this thread to see if your problem is already being discussed.
Use the Search inside this thread function!
3. If not or if it doesn't help, post your error with a detailed description (and error message) in the thread.