yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] habibalby:
After installing the 32bit version started working :) waw what a great work :)

D:\D Drive\Softwares\Whatsapp_Xtract_V2.1_2012-05-10-2>python -i whatsapp_xtract.py msgstore-2013-01-01.1.db.crypt

Python Version 2.x

Android mode!

trying to repair android database...

trying to decrypt android database...

decrypted database written to msgstore-2013-01-01.1.plain.db

printing output to msgstore-2013-01-01.1.db.html ...

done!

>>>
[Android Apps and Games] mukkl:
instead of names only numbers

hey guys,

first of all thanks for the awesome tool! you did a great job!

well, now the small problem. I performed it like in the discription and everything works fine but instead of the names of the contacts I only see the numbers (see attachment).

My phone is rooted, so I performed it with the files "msgstore.db" and "wa.db" but it did not work.

Does anybody have an idea to make it working?

greetings
[Android Apps and Games] g125:
I have about 300000:eek:messages to backup, and it seems like this is having difficulty to handle database file so large (~30mb)

I can't backup all my chats:( It's difficult to navigate through the huge html file, but from I've gathered so far it seems like random chunks

of chats in the middle somehow went missing :( The command prompt said "done" and didn't say it encountered any errors..:(
[Android Apps and Games] ztedd:
You need to run whatsapp_xtract_android.bat. Make sure that the following command is executed:

python whatsapp_xtract.py msgstore.db -w wa.db

You can do this manually by running whatsapp_xtract_console.bat and then typing that command.
[Android Apps and Games] ztedd:
You can be sure that everything of the chats is exported to the html file, even if it's a large file. Only deleted messages won't appear. Use Google Chrome which is so far the best performing browser to view at such a large file and make sure to wait long enough for it to load the file.
[Android Apps and Games] ErMeglio:
Hi, first of all thanks for the help you are giving.

I went from a desire hd to the nexus 4 and I did a little error: I forgot restoring the old backup at first.

So after a pair of days I'd like to merge the two backups I managed to have. I followed the steps found in this thread and the messages table went ok.

Now I have some doubts on this:

If I try to do the same with chat_list, I get errors because

I found out old and new _id and message_table_id for the same numbers.

How should I solve this matter now? Well, should I do it at first (there are not new numbers)?

Then, second doubt, how to restore the backup? I tried creating /sdcard/WhatsApp/Databases/msgstore.clean.db but it didn't even see it. I saw at least a post in this thread saying it will like the unencrypted backup but I don't get how. Well, I don't want to root the phone at the moment so the /data/ method is not for me...right?

Other solutions?

Thanks!

---edit---

Ok, doubt 2 solved, the right filename is just msgstore.db and it works perfectly.

Problem is when I try to open a conversation with the "dubious" numbers of chat_list it crashes, so I need some solution for it :)

--edit--

Ok, it went not so good. It just seemed: general screen shows the -real- last message. If I open the conversation (well, the conversations that do work) I can't see newer messages! Weird.
[Android Apps and Games] ztedd:
No, you don't need to merge or change anything in the table chat_list if the numbers haven't changed. Just leave it as is.

Yes, that's it. It has to be named msgstore.db or as a crypted file msgstore.db.crypted.

Maybe you try again to just merge the messages table.

- The first messages should be the one from the old database (which is opened on the left side), then the newer entries from the right side should be merged to the left side. The numbers should correctly count up.

- Compare if the database structure has changed from the old to the new file: Do both databases have the same fields in the table messages? (Some months ago, Whatsapp introduced new fields e.g. media_hash).

But if you have the same version of Whatsapp on the old and the new phone, it shouldn't be a problem.
[Android Apps and Games] anbiarsy:
Could not open database file

i have already output the database.

But it didn't have anything on the IE.
[Android Apps and Games] gauchito2005:
Blackberry

No funciona para BLACKBERRY?
[Android Apps and Games] ztedd:
It's not possible. The file is encrypted. Someone would need to discover how to access the Blackberry Whatsapp data in an unencrypted way. I guess one would need to know his or her strong Blackberry password to do this. However, up to now, no one found a way how to access the Blackberry unencrypted Whatsapp database and thus it's totally impossible to convert it.
[Android Apps and Games] Sheepishh:
I have a nokia n8. Found 3 files in a folder called wa. msgstore.bak.1, msgstore.bak.2, msgstore.bak.3. How can I open any of these? Ive tried all sorts! :( SQLITE tells me its "Its not a sqllite3 database"

Think nokia n8 is symbian!
[Android Apps and Games] ztedd:
That's because, in fact, it isn't a sqlite3 database! :P :(

The msgstore.bak files are somehow encrypted, I don't know how. But if the Phone is hacked, you can access the "Private" folder in phone memory and copy the Whatsapp program folder from there. It will include the file MsgStore.db, which is unencrypted.

However, sadly to say, it's still a different format than sqlite3. It's some Nokia-Symbian specific database format and there is no easy way to read it using Python.

So I can't help you now. You may copy the mentioned program folder with the unencrypted databases to have a backup which maybe eventually could be read later.
[Android Apps and Games] jayumodha:
error

help me
[Android Apps and Games] atulio6:
Putting merged database back into Whatsapp
[Android Apps and Games] db_dog:
ChatStorage.sqlite larger than HTML

edit, edit: Then again, maybe not. The ZWACHATSESSION tables' ZDELETED column shows none of the messages in a deleted state...(see attachment, personal data redacted), so...?????

edit: I see now this question may have been answered inasmuch as the plain text I see in the ChatStorage could be deleted messages.

Hi,

Very useful tool, thanks. I seem to be having an issue trying to get the HTML output, though.

My `ChatStorage.sqlite` is 338k, but the HTML file the script outputs is only 17k. I can see the summary of my chat history with contacts, how many messages sent to each and last date, etc. However, the fields below that table contain no data (besides the column headers).

If I open the ChatStorage.sqlite in Notepad++, I can definitely see message text in and between assorted NULs and other binary flotsam. If I open the file in SQLite DB Broswer, the ZWACHATSESSION table is populated, but the ZWAMESSAGE table is not. I extracted the ChatStorage.sqlite from my iPhone using the iExplore iPhone backup broswer.

Any suggestions as to what I'm doing wrong? Thanks for your time in advance.
[Android Apps and Games] ztedd:
Error: No module named Crypto.Cipher

You didn't install pyCrypto. Follow again the instructions to install pyCrypto. Make sure that you have installed x86 (32bit) version of ActivePython. Then run "!install_pyCrypto.bat" with administrator rights (right click on it, "run as administrator").

Make sure to use the newest version of Whatsapp Xtract which can be downloaded on the first page - the one on google code is outdated!
[Android Apps and Games] ztedd:
deleted messages

I don't know if you had a look at the feature requests since this behaviour of Whatsapp already is known, but currently there is no solution.

The problem is that the messages are somehow not completely deleted but apparently it's not possible to recover them with known SQlite or similar tools. So if someone finds a solution, it would be interesting.

The only thing you can do is open the file with editor or hex editor. Maybe you create your own Python or MS Word script which looks for each occurence of a [somenumbers]@s.whatsapp.net string and copies the text which is located behind it till the end of that line.

Also it could be possible to extract the key id which can be found behind the [somenumbers]@s.whatsapp.net string and looks somehow like this: "1349197671-32", then check if it's contained inside the "official" part of the sqlite database and if not, display it in the unfriendly plain-text format.

However, I won't develop it. It's not on my agenda.
[Android Apps and Games] ztedd:
merging of database files and importing in Whatsapp

There isn't some magical step between - you

just

have to follow the 6 steps above. Finishing with the merging in SQLite Compare, you save the merged db file. And then it just needs do be renamed to msgstore.db and copied to the sdcard location where whatsapp looks for old databases to import during installation. So after this step, you

don't use Whatsapp Xtract

! You just copy the database file.

Again, you don't get an html file. SQLite Compare gives you a db file. This you copy, you don't use Whatsapp Xtract which gives you an html file.

Whatsapp Xtract is only needed if you want a nice Browser output to look at by

yourself

. To import in Whatsapp again, this browser html file is completely useless.
[Android Apps and Games] cotary:
i want to know if this works with Mac

and if yes how do i install it?
[Android Apps and Games] solom2010:
ocusteoheavily

thx for this app
[Android Apps and Games] atulio6:
Successfully merged 2 Whatsapp files and reinstalled into phone

SQLite Compare is awesome and you're a lifesaver!! :cool:

I realized that:

1. After doing the merging, the database file that I used in SQLite Compare gets changed automatically; I was looking for a "save" button which naturally wouldn't be there.

2. I was picking the wrong file to put back into my phone. I was working off the Whatsapp Xtract folder and had selected the .db file (which was html) instead of the .plain file. I also thought that Whatsapp will only use a .crypt file but actually a .plain file is acceptable also.

Thanks again for your help!
[Android Apps and Games] ztedd:
With pleasure! :)
[Android Apps and Games] ztedd:
Whatsapp Xtract on Apple Mac OS X

Since Whatsapp Xtract is written in the cross-platform script language "Python", it works on every system, including Mac.

1. Go to http://www.activestate.com/activepython/downloads

and download + install ActivePython for Mac (it shouldn't be important whether to use version 2.7 or 3.2, both should work).

2. From the Mac equivalent of the windows Start menu (I don't know how it's organized there), run the

"Python Package Manager (PyPM)"

Then type and run:

install pycrypto

( Alternatively, if it doesn't work, open terminal and run --- pip install pycrypto --- or --- easy_install pycrypto ---)

3. Now prepare Whatsapp Xtract and your database files, follow steps 1, 2 and 3 from the how to on the first page. That's to say, extract the Whatsapp_Xtract_V2.2_2012-11-17.zip to a specific folder Whatsapp Xtract and copy your database file msgstore.db.crypt or Chatstorage.sqlite to that folder.

4. Now open Mac terminal and go to that folder. First start the terminal (like shown here). Then drag and drop the Whatsapp folder to the terminal window. So terminal will automatically switch to that folder. Alternatively, use the cd command to manually switch to the Whatsapp folder.

5. Run one of the commands that I told you in the how to on the first page in step 5:

If you have troubles installing Python (or pyCrypto module) on Mac, please don't ask me (I don't own a Mac), but ask the internet.

http://community.activestate.com/forums/activepython/activepython-support

http://www.python.org/getit/mac/

etc.
[Android Apps and Games] ShankyJain:
Thanks for this. Its great!!

The primary key in my newer file are single digit numbers whereas in my old file I have more than 17k entries. This causes the messages when restored / viewed in browser to go out of sync. I see the latest msgs as the oldest in phone (date is still correct). I couldnt find this issue answered in the thread. Any help?
[Android Apps and Games] ztedd:
Update on how to merge databases

You are right, I have to update the merging howto. Here is what you have to do first:

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. Continue with the merging howto.

Here is the updated howto for merging Whatsapp databases:

http://xdaforums.com/showthread.php?t=1583021&page=24#post28899881
[Android Apps and Games] fguy85:
thanks
[Android Apps and Games] sorcererapp:
Thanks a lot for your help.
[Android Apps and Games] membersound:
Names missing

What can I do if I only have the whatsapp #numbers displayed, and no usernames (beside "me")?
[Android Apps and Games] ztedd:
For Android, you need the wa.db file from /data/data/com.whatsapp/databases.

Root necessary to get the file. You can use Titanium Backup to get it: see howto.
[Android Apps and Games] gernimo07:
Hi can somebody hep me.. ?

have read nearly all the pages..have done a lot of googling but haven't found any solution to this..

was updating my Sony Xperia P to the latest firmware. Took normal backup of whatsapp, copied the backup data to my pc.

now after a clean format and update of the cell, did the whatsapp restore, but it wasn't successful.

used whatsapp extractor...faced this error..

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

C:\Whatsapp extractor>python whatsapp_xtract.py msgstore.db.crypt

Python Version 2.x

Android mode!

trying to repair android database...

trying to decrypt android database...

decrypted database written to msgstore.plain.db

Error sqlite3.Error while reading chat #43168: database disk image is malformed

C:\Whatsapp extractor>pause

Press any key to continue . . .

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Please Help me.

Thanks
[Android Apps and Games] vitucciog:
convert iphone to android whatsapp database

Hello everyone,

maybe someone already asked for this, but... do you think is possible to use this (or any other) tool to convert iphone ChatStorage.sqlite to msgstore.db.crypt in order to export chats from iPhone and import them on an android device?

Thank you!
[Android Apps and Games] ark0n3:
hi vitucciog, just click on the google drive i posted some threads before so that i can add you to the project. the program is already working and free and 50 people already used it!
[Android Apps and Games] vitucciog:
Thank you! I've just asked for the access... I've read some of your posts, how is going with the emoji and media management?
[Android Apps and Games] ark0n3:
emoji should be copied with no problem while media management is still work in progress as i had no time to work on the tool (anyway should be pretty straightforward)
[Android Apps and Games] quicky:
Emojis missing again

Hi guys,

I just tried your script with my iPhone-DB and it's awesome. It works like charme, however the almost all of the emojis are missing. I just see very view special-ones. Most of them are displayed as squares. The interesting thing is, that they are in the directory, so even the default smiley doesn't get converted correctly. I guess it has no impact, but I'm using iOS 6.1 and the the newest WhatsApp version.

Your script was also the newest version which I downloaded directly from here.

Thanks for your support!

cheeeers!
[Android Apps and Games] ark0n3:
thanks for your feedback! i added the emojis support in the todo list
[Android Apps and Games] quicky:
Hi ark0n3,

I was actually talking about the "normal" xtractor. Not about your converter :) However, as soon as my issue is solved I'm happy to try your converter as I'm moving to android back again.

Best regards
[Android Apps and Games] ztedd:
Use WhatsAppMigrator, which is being developed by ark0n3:

http://xdaforums.com/showthread.php?p=35842823#post35842823

https://docs.google.com/folder/d/0B5t-Ej5NEPygalh1bUpJNFZlYzA/edit
[Android Apps and Games] ztedd:
I don't understand that. In the newest version, explicitly the new emoji smileys have been included. Maybe the encoding of the smileys in the Iphone database changed in a newer version?

Please send me a sample of your Chatstorage.sqlite with the not-working smileys.
[Android Apps and Games] Snorkel79:
BlackBerry

Hello for blackberry messageStore.db can see already?? or is encrypted and is impossible. Thanks in advance
[Android Apps and Games] crazyguns:
just wanted to thank you personally for an awesome application! I have my old iphone which asks me to reverify to use whatsapp and i dont have the patience to go through that hassle, just got the chatstorage db via ifunbox and xtract did it in one simple drag drop command! thank you for such an amazing application!
[Android Apps and Games] ztedd:
Whatsapp Xtract for Blackberry

I have found a way to include blackberry support in Whatsapp Xtract, however it will still take some time for me to do it.

To be able to do it, I would kindly ask you to support me by buying a gift card or cash code and sending it to me.
[Android Apps and Games] ztedd:
I'm glad you can use it! :)
[Android Apps and Games] orei:
Sorry my friend, i'm unable to find the howto you linked.. is my problem?

Another question.. with the to-do that i've quoted.. when open a whatsapp conversation and scroll to an old message (not too old..3-4 days..) .. i've an fc and application close.

Another question.. when merge the 2 database, i use the first database bigger, and second smallest, copy message from left to right, but when try to copy conversation list i've many error.. i can copy only 4-5 conversation list.. (have 25-30 conversation total).

Another tings.. you write to increase the id for the message that i've to add (so the smallest database) from the last number on older (bigger), but what about for conversation list?

haven't to do anything?

Thanks a lot my friend
[Android Apps and Games] ztedd:
The howto is here:

http://xdaforums.com/showthread.php?t=1583021&page=24#post28899881

If that doesn't help you, you may send me your two database files you want to merge and I try to do it for you.
[Android Apps and Games] madimadi:
ask

hi..

this is very usefull thank u very much:good:

i want to ask.. an older whatsapp back up (db.script) can be download?

because in this data base just have 7 days conversation.

thank u
[Android Apps and Games] veldiesneek:
Half of my messages

Hello, I have a question. I can only see the first messages but I want to see the rest of the messages too. How can I do this? My most importent contact is not above, and I can't see the messages from this person.
[Android Apps and Games] P-7:
iPhone

Hi there, worked fine, I uses itwin and followed all the steps and it showed some chats, but only the ones that were open in the application when the backup was done.

Is there a way to recover old chats that have been closed/deleted from whatsapp in the iPhone?

Thanks!
[Android Apps and Games] housert:
RFC: add option to create statistics.

metrics:

- messages per hour/day/month/year

- statistics per group conversation (for example: who types the most messages, who contributes most media, what time/day/month/etc is most active)

- most frequently contacted person

I think this would be a great addition to your -very usefull- tool.
[Android Apps and Games] Cimmero:
Sorry for the bad English.

I need to see my history copied from sd blackberry broken.

I understand that the whatsapp_xtract can not do it yet?

only works for Android and iPhon?

thanks
[Android Apps and Games] entauba:
Easier Merging of Old and New

First of all, thanks for the great tool to convert from crypt db to plain db. I followed your instructions up to step (3) to merge the messages tables from my old and new msgstore.db files. Thanks to lost_ (see here: http://xdaforums.com/showpost.php?p=31595785&postcount=270), I stopped trying SQLite Compare as I was also getting FCs in particular sections of message threads with BLOBs.

To merge my old and new messages tables, after step 3, I followed the instructions here and did a:

$ sqlite3 msgstore.plain.db ".dump" | sqlite3 msgstore-old.plain.db

Then updated the key _id and message_table_id in the chat_list table to point to latest thread.

Worked perfectly! Thanks again.
[Android Apps and Games] jgpg1982:
Error in db.crypt

Hey i have a question, I try everthing posted here, but everytime i open de database it keeps showing this error.

D:\Tempo\xtract\Whatsapp_Xtract_V2.1_2012-05-10-2>whatsapp_xtract.py msgstore.db

.crypt -o c:\1.html

Python Version 2.x

Android mode!

trying to repair android database...

trying to decrypt android database...

Traceback (most recent call last):

File "D:\Tempo\xtract\Whatsapp_Xtract_V2.1_2012-05-10-2\whatsapp_xtract.py", l

ine 2062, in <module>

main(sys.argv[1:])

File "D:\Tempo\xtract\Whatsapp_Xtract_V2.1_2012-05-10-2\whatsapp_xtract.py", l

ine 988, in main

from Crypto.Cipher import AES

ImportError: No module named Crypto.Cipher

D:\Tempo\xtract\Whatsapp_Xtract_V2.1_2012-05-10-2>

can someone please explain to me what am i doing wrong???:silly::silly::silly::silly::silly:

THANKS IN ADVANCE
[Android Apps and Games] jgpg1982:
Error in db.crypt

Im getting an error please let me know if u can help me.... thanks....
[Android Apps and Games] ali23:
Hey , did anyone figure out how to open the whatsapp bak/db files from blackberry devices?
[Android Apps and Games] advance512:
*Unofficial* WhatsApp Xtract version 2.3

Hi there,

Just wanted to post my "unofficial" (as in - I needed extra features for my own usage of this tool, so I coded them, but I am not a part of the official dev team) version 2.3 of this tool.

--------------

CHANGELOG:

v2.3 (updated by Alon Diamant - Mar 05, 2013)

- now generates separate file for each contact

- fixed file search to search for image files in days prior to date given (to fix a bug where because of timezone differences the image file exists but is not found)

- fixed message counts for contacts

- does not list contacts with 0 messages

- now writes version number in generated files

- (Android Version) displays WhatsApp name (server based) if no display name is found for a contact

- (Android Version) Supports Python 2.6

--------------

How to use:

After doing step 2 of the original post, and before doing step 3 - extract attached archive (Whatsapp_Xtract_Py_2_3.zip) to the same folder selected in step 2. Continue to step 3 normally.

Good luck :)

--------------

Original poster: feel free to merge this into your code base, if you feel like it, or contact me to take it down, if you don't like it. :)
[Android Apps and Games] advance512:
If you get this error, it is becaues you do not have PyCrypto installed.

You can install it from here:

http://www.voidspace.org.uk/python/modules.shtml#pycrypto
[Android Apps and Games] NoneSkillZ:
can somebody help me???

im trying to understand what i need to do but i cant for some reason i cant do it

i understand that i need to decrypt my encrypted files but i have no idea how

and i need it kinda fast

plz some help me
[Android Apps and Games] advance512:
What's the actual problem, NoneSkillZ?

Where did you get stuck, following the original post's steps?