yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] guy4444:
Iam not success

C:\Users\\\what>python whatsapp_xtract.py ChatStorage.sqlite

Python Version 2.x

Detected an SQLite database

iPhone mode!

*** METADATA PLIST DUMP ***

Plist ver.: 1

UUID: 605A37C0-34EC-4A28-8552-153019847C4D

PicturesInSync: True

ListsRequested: True

NSStoreModelVersionHashesVersion: 3

DefaultWP: True

NSStoreModelVersionIdentifiers: ['2.11.5']

NSPersistenceFrameworkVersion: 419

NSStoreModelVersionHashes:

WAMessageWord: uI3vOPgV67W88Lb/5nQ7H+koKaxi7DrnyUwKRFVk05U=

WAGroupInfo: eSGZH+oIvii5cwqLHsBeWVbSQaWgoMSRfr27k1aBcgQ=

WABroadcast: aryOIMrXvcETzP0GUb2TAlCvB//b82ISmkfbcW5z7Nk=

WAGroupMember: Bixzg/JWorjHdKKG9ChcELk99mA9hKpKFCKvr37iW34=

WAMessage: PxbcN/a/eSEU1PaJ38KqxU/3pOD4maxxcWYdZFI1v+M=

WAChatSession: IPc7JcSLIDJEKbreSwyThbwrostnkKlkA0fTUuDvF40=

WAChatProperties: F4Z/TeC3UHNEjwQKYM7jaTKQUjuIIS1dGFGW9cRKyYg=

WAMediaItem: JHz80+O+pUeKqLqw9Ecy8gKXPhg3zgmymapluv8fueM=

WABlackListItem: tUA3p+9kSuWHiSPnaawz92JFG1ZbX1lYqXQ5LZKKJrI=

_NSAutoVacuumLevel: 2

GroupsRequested: True

NSStoreType: SQLite

***************************

Traceback (most recent call last):

File "whatsapp_xtract.py", line 2678, in <module>

main(sys.argv[1:])

File "whatsapp_xtract.py", line 1840, in main

curr_message = Message(msgs["Z_PK"],msgs["ZISFROMME"],msgs["ZMESSAGEDATE"],m

sgs["ZTEXT"],contactfrom,msgs["ZMESSAGESTATUS"],media["ZMEDIALOCALPATH"],media["

ZMEDIAURL"],media["ZTHUMBNAILDATA"],ZXMPPTHUMBPATH,mediawatype,media["ZFILESIZE"

],media["ZLATITUDE"],media["ZLONGITUDE"],media["ZVCARDNAME"],media["ZVCARDSTRING

"])

IndexError: No item with that key

C:\Users\\\what>pause

Press any key to continue . . .

It fails me.

It stopped working since two weeks ago - three.

When I insert a ChatStorage.sqlite backup from two weeks ago it works but when I poot a backup 'ChatStorage.sqlite' from This week this show this message.

I tried on two iPhones.

Maybe it's the new version of WhatsApp ??
[Android Apps and Games] WolfBeast-SP:
12524 23238533

I suspect that the structures of WHATSAPP's databases for iPhone have changed. To be more precise, I am practically sure that at least the structure of "contacts.sqlite" has changed in last weeks. Unfortunately I have not a copy of the databases of a few months ago and a current copy to compare and to confirm it. Can someone do it?
[Android Apps and Games] H4CK_H0PP3R:
Are you working on new version which has changed its structured?
[Android Apps and Games] ippieleon:
HTML Output directory

Does someone know how to change the output folder of the .html file?

Inside 'whatsapp.xtract.py' there is a line for replacing the filename, but is there a option to set/change the output directory?
[Android Apps and Games] WolfBeast-SP:
I can't test it at this moment, but i suppose that if outfile takes an associate path in the arguments line ('c:\xxx\yyy\zzz.htm' instead of 'zzz.htm' only), will be generated in the indicated path.
[Android Apps and Games] vSaAmTp:
51 64564528

Any Update for the New Whatsapp??
[Android Apps and Games] chrislunee:
Problems too

ImportError: No module named Crypto.Cipher

anyone see what I am doing wrong?
[Android Apps and Games] vSaAmTp:
8638895 217

Found a Fix for the New Whatsapp on iPhone in the Thread:

Just locate in the Xtract folder the file named whatsapp_xtract.py and hove over to line number 1667 (which reads as follows):

curr_message = Message(msgs["Z_PK"],msgs["ZISFROMME"],msgs["ZMESSAGEDATE"],msgs["ZTEXT"],contactfrom,msgs["ZMESSAGESTATUS"],media["ZMEDIALOCALPATH"],media["ZMEDIAURL"],media["ZTHUMBNAILDATA"],ZXMPPTHUMBPATH,mediawatype,media["ZFILESIZE"],media["ZLATITUDE"],media["ZLONGITUDE"],media["ZVCARDNAME"],media["ZVCARDSTRING"])

Replace the word "media["ZTHUMBNAILDATA"]" in the above line with "None".

So. See the Yellow Color. None, not none:

curr_message = Message(msgs["Z_PK"],msgs["ZISFROMME"],msgs["ZMESSAGEDATE"],msgs["ZTEXT"],contactfrom,msgs["ZMESSAGESTATUS"],media["ZMEDIALOCALPATH"],media["ZMEDIAURL"],None,ZXMPPTHUMBPATH,mediawatype,media["ZFILESIZE"],media["ZLATITUDE"],media["ZLONGITUDE"],media["ZVCARDNAME"],media["ZVCARDSTRING"])
[Android Apps and Games] grotesque02:
A question! A friend change phone number, is possible merge old chat with new?

Because now I have 2 chats with same contact name (but different number of course)
[Android Apps and Games] vkjoe220:
there were many msgs .. i wanted to read all the chats .. but i cud read only one chat :/
[Android Apps and Games] Steffenmeier:
Hi,

does Whatsapp xtract works with whatsapp version 2.11.7.

I wanted to a extract a chatstorage.sqlite file from my Icloud backup but I always got

the error message

".. file is encrypted or is not a database and you tried to open.."

Does anyone has an idea.
[Android Apps and Games] mark88s:
I'm struggling with a smilar issue...

I'm also trying to extract a ChatStorage.sqlite (2.1MB) from my iCloud backup and am getting similar errors...

python whatsapp_xtract.py ChatStorage.sqlite

Python Version 2.x

Detected non-SQLite database, potentially an encrypted Android database

Trying to decrypt Android database...

Decrypted file written to ChatStorage.sqlite.plain.db

Error: File is not an encrypted Android database

I was able to recover photos and audio from the Media folder... But not my conversations.

Does anyone have any idea on how to solve this?

Thanks for your help.
[Android Apps and Games] hackaholic:
works great thnku

awesome man it works
[Android Apps and Games] oscarlima:
I've successfully merged 2 plain db files. Edited the chat_list to make it work, however I run into the same problem as a guy on the beginning of this thread.

When I open the messages that contain copied thumbnails of pictures or videos my whatsapp force closes.

When I delete the records that contain the picture or video everything works fine.

I've read that it had something to do with copying BLOB that's not really working as it should.

Does anyone have a solution for this yet?
[Android Apps and Games] pez8210:
Thanks works perfect!

Dear vSaAmTp your fix works perfect!! thank you very much to share with us
[Android Apps and Games] jutphaas:
Whatsapp merge error

Hi,

I have merged 2 whatsapp db files, for I could not restore the 16-dec-2013 from my broken desire-z unto my borrowed Galaxy S-I9000

I thought at first maybe the folder would be a problem (sdcard0 instead of sdcard) but that is probably not true.

So I decrypted the new made database and the 16-dec auto backup database.

And I could merge them, some conversations (only text) work until probably some picture should show up.

Then the whatsapp crashes.

I have a database structure here

on the right is the new structure.

How can I correctly get the older data into the new structure without errors?

Or rearrange the old structure to a new structure and then merge them?

Any Ideas?

Note: at the right is the new order, at the left is the order in my db of 16-12-2013 when my desire-z broke...

Any advice is welcome!

regards,

Bernhard

p.s. at least i found out how to restore the old database, without the encryption... So most of it is back.

But I still would like to know how to be able to merge some older databases I have with a new database, without strange errors
[Android Apps and Games] oscarlima:
Hi Bernhard,

On the previous page I have explained the exact same problem. Apparently SQLite Compare can't handle these thumbnails.

My workaround was to edit the messages in SQLitebrowser, then Browse Data tab and then messages in the pull down menu.

I then took out all the question marks in the fields 'thumb image' and 'raw data'. Basically copied the link to the video/picture in the text field and made it look like a normal whatsapp text message, with a link to the picture or video. You only have to do this with the messages that were copied to the other database.

i don't know how many messages you'd have to edit.... another less time consuming workaround could be to just delete all the messages with picture/video thumbnails.
[Android Apps and Games] finn.sta:
Hey, can someone tell me if it is possible to view media files? it always says "Invalid media download request" when i click on a link. i have an iphone btw. thanks for help :)
[Android Apps and Games] Coweri:
Want to view the whatsapp attached files from iphone backup?
[Android Apps and Games] finn.sta:
Yes
[Android Apps and Games] TehEbil:
To those having the same issue:

download latest sqlite3.exe: http://www.sqlite.org/sqlite.html

run "sqlite3.exe storage.data" where "storage.data" is the corrupted database file (for example: msgstore.db)

(drag sqlite3.exe into CMD etc.)

Then the following commands:

sqlite> .mode insert

sqlite> .output dump_all.sql

sqlite> .dump

Then exit (Ctrl-C, Ctrl-Z or ".exit") and run again:

"sqlite3.exe storage.fixed.data" where "storage.fixed.data" is name of non-existing file for my resurrected database.

The following script reads commands from "dump_all.sql" script file and recreates all database.

sqlite> .read dump_all.sql

I did it with "C:\storage.fixed.data" to go sure the file will be in the right place. then rename it to something.db and drag it over "whatsapp_xtract_dragndrop_database[...]" and it should work.

credits to:

http://techblog.dorogin.com/2011/05/sqliteexception-database-disk-image-is.html
[Android Apps and Games] Coweri:
You can try this program. iPhone WhatsApp Transfer. It lets you extract whatsapp messages from iphone backup.
[Android Apps and Games] MIKM.xda:
Hi. I got the same problem. I saw many thumb_image fields of pics/videos/utube links are not correctly exported into .SQL, .CSV or whatever i tried. Even dumping with sqlite3.exe didn't work. I mean, working in Whatsapp again.

thumb_image and raw_data contain binary data, not text or integer values. Thats the problem here. After exporting to utf8 encoded text they get destroyed sometimes.

I found a very good tool to handle these fields by transplanting manually every wrong thumb_image or raw_data content in a separate binary file (no text encoding). Saving content of correct old DB fields first, then loading the file in the merged new DB at defected thumb_image fields.

I got 2 DBs merged perfectly in a single new one without loosing any video/pic posts or links. Best way is, to compare the old/new DB fields thumb_image and raw_data with the merged DB one's visually, first. You will easly see the wrong fields. Content is totally different.

The tool is called "Navicat for SQLite"

Google it for a 30 days trail version. Im too "nooby" to post links here...:rolleyes:

Hint: Open the msgstore.db by "File>New Connection...>Database File: (enter path)> double click on msgstore (or whatever) on the left side> open messages table> click on the dopdown button "Memo" (directly obove table) > switch to "Image"

Now a black border appears on the bottom with "File open" and "File save" buttons... ;)
[Android Apps and Games] yucky38:
Does it work on Watsapp Version 2.1.52?

Hi there,

I totally new to this Watsapp extract thing.

I suspect my husband was up to something with a Thai Ladyboy and was trying to access my husband's Watsapp msg.

But using the Whatsapp_Xtract_V2.2_2012-11-17 & install Python 2.7 all still cant work.

Can someone please help?
[Android Apps and Games] MIKM.xda:
@ yucky38

Thai Ladyboy?? Well thats a really serious problem:D

Thats not the purpose of this tool, right? Clear this up with him in some other way. Maybe by talking...:rolleyes:
[Android Apps and Games] chrislunee:
For anyone who is still having trouble with the Import error.

try this line of code to install pycrypto - its taken me hours and hours but this works!

sudo easy_install -Z pycrypto

after installation, then try again and it should work. message me if I am not making myself clear.
[Android Apps and Games] anushakamath:
Problem Merging Whatsapp chat history - Merging two db files

Hi,

I am using Whatsapp on laptop (using bluestacks) and on my Samsung Galaxy Note 2, both with different numbers.

I followed the following steps to merge conversations :

1. Extract the crypted files into .db file using whatsapp xtract

2. Changed the _id fields using SQLlite Browser

3. Here is where I had the problem : while merging the two files using SQLCompare, I get an error message saying "Error Database disk image malformed". Any idea as to what could be the solution for this error ?

Extra Info : One whatsapp version is 2.11.152 and the other one is 2.11.136. Is the version difference causing this problem ? Any solution ?

Thanks in advance
[Android Apps and Games] anushakamath:
Problem Merging Whatsapp chat history - Merging two db files

Please help me out !!!
[Android Apps and Games] thinkajax:
Facing problem for since Dec 1, 2013

Hi,

This is a great tool. I was using it. But since Dec 1 I am not able to see any updates in the generated HTML content. Has something changed?

Note that I tried to look at my log files using File Manager app, but the logs are also dated till 27th Nov. Makes me think something changed in the way whatsapp is logging/ storing messages. Is it true?

Thanks much,

Soumitra
[Android Apps and Games] caprizios:
IndexError: No item with that key

Hi!

I cant extract the messages.

I copied ChatStorage.sqlite (~9 MB) with ifunbox.

There are about 8300 messages in whatsapp. Is the file complete? I thought it have to be greater...

...anyway. Whats going on here? Are i am doing something wrong?

The following error appers:

Python Version 2.x
iPhone mode!

*** METADATA PLIST DUMP ***

Plist ver.: 1
UUID: 44FFDB9B-637D-45AB-BA0E-79B1305D2854
ListsRequested: True
NSStoreModelVersionHashesVersion: 3
DefaultWP: True
NSStoreModelVersionIdentifiers: ['2.11.5']
NSPersistenceFrameworkVersion: 419
NSStoreModelVersionHashes:
WAMessageWord: uI3vOPgV67W88Lb/5nQ7H+koKaxi7DrnyUwKRFVk05U=
WAGroupInfo: eSGZH+oIvii5cwqLHsBeWVbSQaWgoMSRfr27k1aBcgQ=
WABroadcast: aryOIMrXvcETzP0GUb2TAlCvB//b82ISmkfbcW5z7Nk=
WAGroupMember: Bixzg/JWorjHdKKG9ChcELk99mA9hKpKFCKvr37iW34=
WAMessage: PxbcN/a/eSEU1PaJ38KqxU/3pOD4maxxcWYdZFI1v+M=
WAChatSession: IPc7JcSLIDJEKbreSwyThbwrostnkKlkA0fTUuDvF40=
WAChatProperties: F4Z/TeC3UHNEjwQKYM7jaTKQUjuIIS1dGFGW9cRKyYg=
WAMediaItem: JHz80+O+pUeKqLqw9Ecy8gKXPhg3zgmymapluv8fueM=
WABlackListItem: tUA3p+9kSuWHiSPnaawz92JFG1ZbX1lYqXQ5LZKKJrI=
GroupsRequested: True
_NSAutoVacuumLevel: 2
PicturesInSync: True
NSStoreType: SQLite

***************************

Traceback (most recent call last):
File "whatsapp_xtract.py", line 2453, in <module>
main(sys.argv[1:])
File "whatsapp_xtract.py", line 1667, in main
curr_message = Message(msgs["Z_PK"],msgs["ZISFROMME"],msgs["ZMESSAGEDATE"],msgs["ZTEXT"],contactfrom,msgs["ZMESSAGESTATUS
"],media["ZMEDIALOCALPATH"],media["ZMEDIAURL"],media["ZTHUMBNAILDATA"],ZXMPPTHUMBPATH,mediawatype,media["ZFILESIZE"],media["Z
LATITUDE"],media["ZLONGITUDE"],media["ZVCARDNAME"],media["ZVCARDSTRING"])
IndexError: No item with that key

---------- Post added at 07:44 AM ---------- Previous post was at 07:23 AM ----------

The workaorund...

Replace the word "media["ZTHUMBNAILDATA"]" in the above line with "None".

...doesnt work for me. error:

printing output to ChatStorage.sqlite.html ...
Traceback (most recent call last):
File "whatsapp_xtract.py", line 2453, in <module>
main(sys.argv[1:])
File "whatsapp_xtract.py", line 1727, in main
wfile.write(sortable.encode('utf-8'))
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa3 in position 3653: invalid start byte

What could i do now? Is there any solution for this?
[Android Apps and Games] diyasuki:
Facing Problem with Update Messages statement

in SQllite database browser when i use an query "Update messages set _id = (45322 + 1 + _id - 2)" its saying no error.

But _id is not getting changed.

Is any one faced the problem, if so kindly help me with this
[Android Apps and Games] anushakamath:
Even I was faced with the same problem. It happens when for example, when the last _id of your old database is 4387 (as in my case) and the last _id of your new database is 16537. My friend changed the query itself & was able to get the ids changed...but I dont remember what exactly he did with it. Will update the query here soon.

In my case though the id's changed, in SQLCompare, it says "database disk image malformed".
[Android Apps and Games] Hommenoir:
Whatsapp xtractor for symbian Nokia n8

Hi guys. I have searched through and I dont think ive seen yet this posted. If it has then I am saying sorry in advance.

I have my whatsapp backups MsgStore.bakfiles I had stored on PC a while back but since my Nokia N8 was stolen I am unable to access them and those on PC cannot be opened either. I really need some info from these conversations and I was wondering if there is a tweak for the Whatsapp Xtract that can read these Msgstore. bak, Msgstore.bak1 databases.

Alternatively someway of converting them to a format readable on my new android phone.

Thanks
[Android Apps and Games] utmuk:
Could someone please tell me where in the database of Android version is kept the information about where a sent media file is physically stored. Whatsapp somehow know where it is because whenever the location of a sent file is change, whatsapp can no longer view it. I opened the database in a database viewer but none of the entries seems the one I need:
[Android Apps and Games] hellcore:
Hi everyone.

I don't know what i'm doing wrong, but no mather how i try it doesn't work.

I think i had all the errors listed above, so decided to start again... removed python 2.7 & 3.3, downloaded xtract again and start over...

After doin everything i got this:

Using google i found the reffer to this post...

but...

I've downloaded another (unofficial) whatsapp_xtract.py 2.5

And i got this:

Tried to fix it again with the new whatsapp_xtract.py and:

I'm lost, this must be the Whatsapp 2.11 version incompatibility.

Thanks for all !!

---------- Post added at 09:47 AM ---------- Previous post was at 08:47 AM ----------

Hi !! I did this but it only creates a dump_all.sql 0 KB file. As result .read will not read anything.

Any ideas ? Thanks !

LAST EDIT

I think I'll give up and assume that the file is corrupted. I think there's nothing to be don so it was my last chance to recover msgs. I'm subscribes to the topic so i will read every answer. Thanks to everyone.
[Android Apps and Games] anushakamath:
Whatsapp crashes after I imported merged "msgstore.db"

Finally I was able to merge the two db files.But, after I imported the merged "msgstore.db" file into Whatsapp folder, I get read error. Its like, my whatsapp crashes every time I start it.

I thought may be I need to encrypt the file again. But have no idea as to how exactly this needs to be done. Does anyone have a solution for this ? Urgent help needed !!!

Thanks in advance.
[Android Apps and Games] sam@xda29:
Hello guys..

Now whatsApp backup I think changed..

I have *.bak files now in that databases folder..

Now how can I recover them..

Since It's givin me error with this..

Thank you.
[Android Apps and Games] xdablacky:
Hello

is it currently possible to extract an whatsapp database form blackberry os7 device?

i have to files

1. : with *.db ending

2. : with *.bak

i think they have the same content

regards

markus
[Android Apps and Games] keliuss:
A really great tool many thanks. Got it working great, even with the contacts listed correctly. I even managed to merge two databases in my attempts to resolve my issues. Didn't fix my original problem tho!!!

Just wondering if anyone has come across this problem. I cannot migrate WA chats from GB2.3 to ICS4.0 The app hangs when trying to restore.

I have tried the stock method, Titanium Backup, copying the unencrypted files to data/data/databases, and the reverse of that, renaming the encrypted files, etc, etc, etc. You name it, I tried it with all the different chat backup files. No joy.

I have WA installed on both devices, (only works on one at a time, but you can go back and forth). The closest I came was starting a new chat backup on the ICS phone and trying to merge the old db into the new db file. Whatsapp seemed to restore the db and said it restored 15000 messages, which is correct, but it doesn't display the chats and crashes if I try to open a contact chat.

I have moved on and left my chat history on my laptop in html and started afresh, but would really love to find a way to restore the old db.

Many thanks to the many comments that helped me learn new stuff!!!!!!

I will continue to monitor this thread for new info.

Keliuss
[Android Apps and Games] sam@xda29:
yes.. the messagesStorage.db files from Blackberry phones are giving errors..

Can anybody have solution ??
[Android Apps and Games] Hommenoir:
did you ever get an answer. Have exact same problem

Did you ever get a response. I have exact same problem
[Android Apps and Games] sam@xda29:
I think now the new databases are coming but we have not the updated soft.

Developer of this should have a look in this...

Thanks
[Android Apps and Games] Blinkin89:
Exactly this. Unless someone else has the knowledge to alter Whatsapp Xtract.
[Android Apps and Games] dolcettoit:
Sorry for my question.

I have not understand where is the DB where messages are stored into in android phone.

I have decrypt the file msgstore.db.crypt (\whatsapp\database) but theese are the bakup files at 4.00 am.

I'd like to discover the online messages when they incoming in realtime.....i doesnt have wb.db or other directory.

Thanks
[Android Apps and Games] de vetnek:
Error

Hi, The topic seems not to be very lively lately :) but still serves my need.

Somehow I get the error that python is not recognized as a command. see screendump.

it is installed in program files (x86)\Python27 and the script runs from a folder on C: root

Installing Pcrypto worked like a charm... but the scripts don't :(

anyone tips?
[Android Apps and Games] aditya104:
Excellent Tool.

Installed ActivePython 3.3.2.0 Windows (x86) to C:\Program FIles

Extracted contents of Whatsapp Xtract inside the python folder.

Copied msgstore and wa also to the python folder.

Then dragged msgstore to whatsapp_xtract_drag'n'drop_database(s)_here.

Done

Everything is fine but I don't get the full sized images. When I click on an image, I get error Media object not found.
[Android Apps and Games] kastlell:
Great! Just thanks to you!
[Android Apps and Games] foscone:
Hi, is there a way to convert messages.txt file instead of db file?

I mean emoticon conversion obviously :)

Thanks
[Android Apps and Games] fenge123:
whatsapp decryption

hey i want to decrypt the whats app database i am using this tool WhatsApp Xtract v2.2 but know it is showing me this error

please help me how to decrypt it

trying to repair android database...

trying to decrypt android database...

Error during decrypting: Input strings must be a multiple of 16 in length

Could not decrypt database file. Guess it's not a valid Android/Iphone database

file or Whatsapp changed the encryption.

Press any key to continue . . .
[Android Apps and Games] sam@xda29:
I think It's the database of BlackBerry phone..

Am I right ??