Remove All Ads from XDA
Win Honor 9 Lite

[TOOL] Whatsapp Xtract: Backup Messages Extractor / Database Analyzer / Chat-Backup

205 posts
Thanks Meter: 282
By ztedd, Senior Member on 5th April 2012, 07:13 AM
Post Reply Email Thread
26th June 2017, 06:41 PM |#1351  
Thanks Meter: 4
So where is the key file stored nowadays on Android Marshmallow? I'm thinking I should make a backup of mine just in case.
3rd August 2017, 07:43 PM |#1352  
Junior Member
Thanks Meter: 3
I accidentally saw password of my brothers phone, then I head on to unlock his phone and check his WhatsApp and what I found was a chat with his girlfrnd, I definitely couldn't read the whole chat as it was way too long to read in under 10 mins, so My question is is there any way I forward the whole conversation from his whatsapp to my whatsapp and later delete my chat from his whatsapp? Or is there any other way? Please explain in detail. I can access his mobile for only about 15 minutes as he never keeps his mobile away from him.
P.S. : I am definitely interfering in his personal stuffs but in a good way as he stays depressed all day I can find out what the problem and help him.
8th September 2017, 01:28 PM |#1353  
Junior Member
Thanks Meter: 0
using whatsapp xtract tool
i am getting this error :

on giving this command: python msgstore.db.crypt12
Python Version 2.x
Android mode!

trying to repair android database...
trying to decrypt android database...
Traceback (most recent call last):
File "", line 2062, in <module>
File "", line 995, in main
decoded = cipher.decrypt(open(options.infile,"rb").read())
File "/home/ria/.local/lib/python2.7/site-packages/Crypto/Cipher/", line 295, in decrypt
return self._cipher.decrypt(ciphertext)
ValueError: Input strings must be a multiple of 16 in length
i am not able to resolve it at all! please help
29th October 2017, 03:10 PM |#1354  
Senior Member
Thanks Meter: 5
Can i use this to view my Whatsapp windows phone bkp ? Thanks
14th December 2017, 03:21 AM |#1355  
Junior Member
Thanks Meter: 0
error in restoring database
i am able to view msgs in whatsapp viewer but unable to restore it
1. whatsapp db got corrupted couldnt restore backups
2. repaired database after getting key using pycrypto
3.still unable to restore db when installing whatsapp.restore gets stuck at 32%

---------- Post added at 03:21 AM ---------- Previous post was at 03:12 AM ----------

Originally Posted by ztedd

Merging of multiple whatsapp databases is still on the feature request list.

But you can use this tool to merge two sqlite databases and afterwards convert the merged database with Whatsapp Xtract:
SQLite Compare


  • 1. Open the old database file in SQLite Database Browser ( ). Open the table messages in Browse Data. Press the Button " > " as often as necessary to get to the last page. Scroll down to the last message. Now write down the number (_id) of that last message, e.g. 65422
  • 2. Now open the new database file in SQLite Database Browser. Open the table messages in Browse Data. Click on the first entry (which has most fields with value "-1"). Click on Delete Record. Have a look at the now first entry and write down the number (_id) of that first message, e.g. 12
    Now Click on Execute SQL and execute the following SQL statement:
    UPDATE messages set _id = (65422 + 1 + _id - 12)
    (replace 65422 by your last message _id in the old database and 12 by your first message _id in the new database)
  • 3. Now all messages in the new database have the correct _id's.
    Click on Save. Close all windows of SQLite Database Browser.
  • 4. Download & Install SQLite Compare ( ). Open SQLite Compare.
  • 5. File - Compare
    For example:
    Left file: msgstore-2012-06-01.1.plain.db
    Right file: msgstore-2012-06-07.1.plain.db
    (Make sure to have a backup of both files!)
    x Compare schema and data
    x Compare BLOB fields
  • 6. Double Click on table "messages" in the result window OR left click on table "messages" and hit button "Edit selected difference..."
  • 7. A new window opens, "Table messages"
    Click on blue button "R" (it's located after "Refresh Comparison", "L" and before "≠", "=")
  • 8. Now on the right side all messages are shown that aren't included in the left file.
    Now you can select multiple messages (first left click on the first message to select, then scroll down to the last message to select and press SHIFT + left click on the last message to select).
    I noticed that you can't handle too many messages at once as it produces an error. Just try. I succeeded with about 1000-1500 messages.

    Now click on the button with the arrow from right to left: ←

    Now the selected messages are copied from the right database to the left database.
  • 9. Repeat the steps in (8.) until all the messages are copied from the right file to the left file.
  • 10. Maybe you also need to to this for the table chat_list if there are some new chat contacts in the newer backup file.
  • 11. Now the left file (e.g. msgstore-2012-06-01.1.plain.db) contains all the messages from the prior file msgstore-2012-06-01.1.plain.db and the newer file msgstore-2012-06-07.1.plain.db. (No saving necessary as the tool automatically applies the changes to the file after pressing the ← button).
  • 12. Now you have 3 options how to go on:

    a) Do you want to merge another database file, appending it to the merged file? Then repeat the steps with an even newer database file on the right, e.g. msgstore-2012-06-12.1.plain.db, if you have multiple database files to merge.

    b) Do you want to import the merged database file to Whatsapp? Then rename the merged database file (the left one) to "msgstore.db", copy it to the sdcard to location /sdcard/WhatsApp/Databases/msgstore.db and make sure that it's the only file in that folder. Now install Whatsapp and confirm when asked to import the Backup during installation.

    c) Or do you want to convert the merged database file to browser-friendly html using Whatsapp Xtract? Then give the left file msgstore-2012-06-01.1.plain.db to Whatsapp Xtract, e.g. using drag and drop onto the whatsapp_xtract_drag'n'drop_database(s)_here.bat.

i get the following:

H:\Whatsapp_Xtract_V2.2_2012-11-17>python "H:\Whatsapp_Xtract_V2.2_2012-11-17\" H:\Whatsapp_Xtract_V2.2_2012-11-17\msgstore.db
Python Version 2.x
Android mode!

printing output to H:\Whatsapp_Xtract_V2.2_2012-11-17\msgstore.db.html ...
Traceback (most recent call last):
File "H:\Whatsapp_Xtract_V2.2_2012-11-17\", line 2453, in <module>
File "H:\Whatsapp_Xtract_V2.2_2012-11-17\", line 1921, in main
linkimage = findfile ("IMG", y.media_size, y.local_url, date, 2)
File "H:\Whatsapp_Xtract_V2.2_2012-11-17\", line 1266, in findfile
timestamptoday = int(str(time.mktime(datetime.datetime.strptime(dat e, "%Y%m%d").timetuple()))[:-2])
File "C:\Python27\lib\", line 332, in _strptime
(data_string, format))
ValueError: time data 'N/A' does not match format '%Y%m%d'
Press any key to continue . . .
20th January 2018, 10:12 AM |#1356  
Senior Member
Thanks Meter: 6
Is this tool still working with actual versions of WhatsApp-databases?
I tried today, but I'm getting following error after using it on my msgstore.db/wa.db ->

Python Version 2.x
Android mode!

Traceback (most recent call last):
  File "", line 2453, in <module>
  File "", line 1486, in main
    curr_chat = Chatsession(chats["id"],chats["display_name"],chats["jid"],None,
IndexError: No item with that key
Or is there another tool, which can extract the chat history to a .html file?
20th February 2018, 05:44 PM |#1357  
Junior Member
Thanks Meter: 0
What a great Tool, but no luck i cannot use it because i think it is too old. i already use my own db but not works. Can you please update.
Can you please seperate the tools from extract and opening, i already try using to Whatsapp Viewer (it works), but I saw that your database browser looks better. It can show the name of the sender/contact
Would you please create the database opener separately from extractor?

Thanks before.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes