Remove All Ads from XDA

[GUIDE] Merge Multiple Whatsapp Backup File Into One (No Root Required)

35 posts
Thanks Meter: 18
By jackgan, Member on 25th June 2015, 05:13 AM
Post Reply Email Thread
I am not sure if I post at the right place but I would like to share this to everyone as I understand how hard it is to find a solution that works. With this guide, you will get to keep the original WhatsApp message information (such as thumbnail, link, emoticon, etc.) and work like it is a restore file that backup from itself.

There will be three main phase you need to perform. You can get all required file in the attachment. Make sure you backup your end result before jump into the next phase.

Phase A: Decrypt and obtain msgstore.db file
This is the easiest method I can find and NO ROOT is required to perform this. All you need is to follow the instruction below.

  1. Extract "" (from attachment) on your computer maintaining the directory structure.
  2. Browse to the extracted folder and click on "WhatsAppKeyExtract.bat".
  3. Enable USB Debugging on your device.
  4. Connect your device via USB**, unlock your screen and wait for "Full backup" to appear.
  5. Leave the password field blank and tap on "Back up my data".
  6. The "extracted" folder will now contain your "whatsapp.key", "msgstore.db" and "wa.db".
**If you have never used USB Debugging before, you may also need to verify the fingerprint.

(Credited to TripCode for providing this application! Here is the link to original thread.)

For my case, I have three backup files that named msgstore.db.crypt, msgstore.db.crypt7 and msgstore.db.crypt8. Although I know there might be other easier method to achieve this, I choose to restore each file (by uninstall and install WhatsApp) and run the above method to get my decrypted file. Hence I can be sure that all decrypted file will come in the same structure (I will show you what this mean later) and prevent any error that may cause by that.

Phase B: Edit and prepare database for merge
This will be a bit tricky. But in general, you MUST make sure that you have no overlapping message history between your files.

  1. Download SQLite Database Browser and install on your computer.
  2. Open the database you want to edit.
  3. Click on [Browse Data] tab.
  4. In Table drop down menu, click on [messages] (You will see all your WhatsApp message here).
  5. Use it like you are using Excel, select any row that is overlapping (EXCEPT the row with many [-1] value) and click on [Delete Record], then click on [Write Changes] (this means you have save the change to the database).
  6. Keep doing this for your remaining file and close all windows of SQLite Database Browser when you are done.
(Thanks ztedd for posting his own method where I get inspired from. This is the link to his original post.)

For my case, the number of column of all my file when display in "messages" table is different (newer WhatsApp database file have more data type). This is the reason I restore and run backup again to make sure all my file have the same structure. Also, a quick tips to figure out which row is overlapping or duplicate is export the messages table to CSV file and open it with Excel. You will need to copy the first few column of each database and paste them together, then use the feature that come with Excel such as Filter and Remove Duplicate to identify which row number you need to remove from actual database file.

IMPORTANT - Never edit your database on excel and import it back to your original database. This will remove all thumbnail, link, emoticon and etc. and show you some weird message when you restore back to your device.

Phase C: Merge database file
This method only can merge two file at once. You may need to do this several time depending how many database you want to merge. I suggest you start from the oldest to newest.

  1. Rename the older file to old.db.
  2. Rename the newer file to new.db
  3. Create a new folder called Merge and copy the file old.db, new.db and merjapp.jar into it.
  4. Run Command Prompt on your computer (or click on Start Menu and search for cmd)
  5. In Command Prompt, type each of the following separately and press Enter:
    cd desktop
    cd merge
  6. You now should see [C:\Users\<UserName>\Desktop\Merge>] in cmd window.
  7. Now type the following and press Enter:
    java.exe -jar merjapp.jar -old old.db -new new.db
  8. You should see a "Done!" is displayed and a new file named output.db will be created in the Merge folder.
  9. If you have other database to merge, repeat the steps above by rename the output.db to old.db.
  10. Once you are done, rename the output.db to msgstore.db and it is ready to restore into WhatsApp.
(Credited to namnoops for this merge application! This is the link to original thread.)

For my case, I have to run this steps twice to merge 3 databases. I get error the first time I run this because some messages is overlapping and this is the reason for Phase B to edit my database. Once I got my merged database, I renamed it to msgstore.db (without encrypt again) and have no problem restore back to my device. I also copy and paste all my backed up WhatsApp folder to my device (except the file in Database folder) for the picture in WhatsApp to work.

Disclaimer: I do not know any coding behind all these so if you have any questions I will try to answer but the best bet is to go back to the original thread.

Below is some other method that I found online but can't figure out how to do it. You may try it at your own risk.

Additional Method:
sch3m4's wforensic Method
Alternate sch3m4's wforensic Method
Attached Files
File Type: zip WhatsApp Merge - [Click for QR Code] (9.20 MB, 22524 views)
The Following 17 Users Say Thank You to jackgan For This Useful Post: [ View ] Gift jackgan Ad-Free
25th June 2015, 05:14 AM |#2  
OP Member
Thanks Meter: 18
Reserve for later use.
25th June 2015, 05:15 AM |#3  
OP Member
Thanks Meter: 18
Reserve for later use, again.
30th September 2015, 05:54 PM |#4  
Xperia000sola's Avatar
Senior Member
Thanks Meter: 8
How could i restore the merged database file ?
30th September 2015, 07:27 PM |#5  
mafsi's Avatar
Senior Member
Flag Bucharest
Thanks Meter: 88
Originally Posted by Xperia000sola

How could i restore the merged database file ?

I think you should overwrite new merged DB uninstall whatsapp then reinstall it
15th October 2015, 01:03 PM |#6  
Thank you! I' ve tried the method in the thread of the merge tool, but your procedure did the trick for me =)
18th December 2015, 01:39 PM |#7  
zamlkawy's Avatar
Senior Member
Flag Giza
Thanks Meter: 22
i cannot use it
help us with video please
20th December 2015, 02:33 PM |#8  
Senior Member
Thanks Meter: 11
big fail after attemped retrieve msgstore.db
when tested edit under sqlitebrowser, save change then exit. copy backup the "msgstore.db" file to my device original place and set permission as before. run whatsapp then all my message on list has been gone. no idea wut happen. even though i copy back my original msgstore.db to same place. so **** and make me down becoz i forgot to backup the list b4 make this test.

i use whatsapp ver 2.12.367. and dun add or del row under sqlitebrowser, only retrieve some text on same row, but why i copy back the original msgstore.db also fail? lost all message
22nd January 2016, 06:17 PM |#9  
Senior Member
Thanks Meter: 153
While it might not be a lot of fun, it's quite easy to merge those databases using this method
I have used the Android WhatCrypt-app to decrypt my databases on the smartphone, copied both unencrypted ones to my PC and then trimmed the newer one down.
After merging, the only problem was getting Whatsapp to accept my database - the first attempt resulted in Whatsapp deleting all my messages.
My solution was to "Clear Data" on Whatsapp and simply drop the newly created database in Whatsapp's folder inside /data.
It accepted the new file and created the missing files by itself.

Now I have finally got all those messages in my Whatsapp

Thank you very much!
23rd March 2016, 10:38 PM |#10  
Senior Member
Thanks Meter: 33
I have a problem : everytime I try to do the last step e.g. merge the old.db and new.db via cmd - i get the error message " -E- Database old.db cannot be found! " . I renamed the old database to "old.db" still it doesnt work? What I am doing wrong?

Is my old.db file corrupted? I can read it with Whatsapp Viewer tool.. So it seems to work.
And there shouldnt be any overlapping messages - I have an old database and a fresh new one without any old backups.
(my old phone broke and i just jused the new one for the incoming messages)
5th April 2016, 10:06 AM |#11  
Flag Karachi
Thanks Meter: 1
Donate to Me
I just wanted to ask, I have the msgsstore.db.crypt8 File from my old whatsapp back on older device but I am unable to copy it to the database folder in my new device.
Post Reply Subscribe to Thread

database, merge, multiple, restore, whatsapp backup

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

Advanced Search
Display Modes