Merging a Crypt7 and a Crypt8 whatsapp backup I have been searching a lot in the past couple of weeks on how to merge two whatsapp backup. Last month I got a new phone, installed whatsapp along with my old backup. During installation, whatsapp said, "backup found" and an option to restore. I clicked on it, it was processing for a very long time and then said backup cannot be restored :(

I started using whatsapp on this new phone and observed that the present database type is Crypt8 and my old database was of Crypt7 type (may be that it why the messages were not restored). I have still kept my old backup. Can anyone please tell me how can I merge these two databases (old Crypt7 and new Crypt8) or is there any other file that I need to consider?

I also rooted my phone to get access to com.whatsapp folder. Found it in the root @ data/data/com.whatsapp

File structure on the root

+ com.whatsapp
  + cache
  + databases
    - axolotl.db
    - axolotl.db-shm
    - axolotl.db-wal
    - msgstore.db
    - msgstore.db-journal
    - wa.db
    - wa.db-shm
    - wa.db-wal
  + files
  + lib
  + shared_pref


File structure on SDCard (old backup )

+ WhatsApp
  + Databases
    - msgstore.db.crypt7
    - msgstore-2014-11-17.1.db.crypt7
    - msgstore-2014-11-18.1.db.crypt7
    - msgstore-2014-11-19.1.db.crypt7
    - msgstore-2014-11-20.1.db.crypt7
    - msgstore-2014-11-21.1.db.crypt7
    - msgstore-2014-11-22.1.db.crypt7
    - msgstore-2014-11-23.1.db.crypt7
    - msgstore-2014-11-24.1.db.crypt7
  + Media
  + Profile Pictures


File structure on SDCard (present backup )

+ WhatsApp
  + .Shared
  + .trash
  + Databases
    - msgstore.db.crypt8
    - msgstore-2014-12-9.1.db.crypt8
    - msgstore-2014-12-10.1.db.crypt8
    - msgstore-2014-12-11.1.db.crypt8
    - msgstore-2014-12-12.1.db.crypt8
    - msgstore-2014-12-13.1.db.crypt8
    - msgstore-2014-12-14.1.db.crypt8
    - msgstore-2014-12-15.1.db.crypt8
    - msgstore-2014-12-16.1.db.crypt8
  + Media
  + Profile Pictures


EDIT: Is it possible to uninstall whatsapp, reinstall and recover old backup (crypt7) first and when everything is working, import latest backup (crypt 8)? No replies so far - Is this even possible ?? Eagerly awaiting a response.
This is how I solved the issue.


backup your existing whatsapp installation 

 adb backup -f whatsapp-new.ab -noapk com.whatsapp

clear whatsapp data by going to settings>apps
upload your old database to /sdcard/WhatsApp/Databases and delete other files in this directory
run whatsapp, restore messages and initialise app (you will have to reenter your phone number; if this doesn't work try installing older version of whatsapp - 2.11.432 worked fine for me)
backup installation with old messages

 adb backup -f whatsapp-old.ab -noapk com.whatsapp

download android backup extractor (https://github.com/nelenkov/android-backup-extractor), and its dependencies (bcprov-jdk15on-151.jar) and compile it (use Eclipse if you are not familiar with this)
extract files from backups

java -cp path-to-libs/bcprov-jdk15on-151.jar:path-to-comiled-abe/bin/ org.nick.abe.Main unpack whatsapp-new.ab wa-new.tar

java -cp path-to-libs/bcprov-jdk15on-151.jar:path-to-comiled-abe/bin/ org.nick.abe.Main unpack whatsapp-old.ab wa-old.tar

tar xvf wa-new.tar
mv apps apps-new 
tar xvf wa-old.tar
mv apps apps-old

copy unencrypted databases to a new directory

mkdir plain
mv apps-old/com.whatsapp/db/msgstore.db plain/msgstore-old.db
mv apps-new/com.whatsapp/db/msgstore.db plain/msgstore-new.db

download sch3m4's wforensic from Github, install it and  follow this https://github.com/sch3m4/wforensic#merging-all-msgstore-files-into-a-single-one (alternatively you could just merge both .db files - they are plain sql3 archives)
clear whatsapp data on phone again; upload the merged database to sdcard/WhatsApp/Databases and name it msgstore.db and delte other database files
repeat step 4 


Now you should be able to see all conversations (hint scroll down to see all conversations - they are not sorted chronologically - but that sorts out with time).