How to transfer Viber message history to a new phone Since Viber currently doesn't offer backup and restore functionality, I resorted to using Titanium Backup for transferring message history to a new phone.

However, after the restore, when launching viber, the message history appears for a second and then the activation screen pops up for confirming the new device -- and after the device is confirmed (via incoming call or sms), all the history vanishes!

Any ideas?
You can do it without root access 

Requirements:


Install ADB and OpenJDK 8 (I had nothing to do with security extension) by following adb backup guide on XDA
Download adbextractor


Then do

sudo apt-get install openjdk-8-jre-headless
sudo apt-get install android-tools-adb android-tools-fastboot


Now, do the following


Connect the old mobile, create backup with adb backup (disable WiFi and data and forget the old phone)

sudo adb backup com.viber.voip -f /home/user/Downloads/viberoldphone1.ab
sudo java -jar abe.jar unpack /home/user/Downloads/viberoldphone1.ab /home/user/Downloads/viberoldphone1.tar

Install Viber on new phone and activate Viber, connect the new phone and create backup with adb backup

sudo adb backup com.viber.voip -f /home/user/Downloads/vibernewphone2.ab
sudo java -jar abe.jar unpack /home/user/Downloads/vibernewphone2.ab /home/user/a/vibernewphone2.tar

Open TAR archives in an archive manager (found Archive manager for GNOME 3.14.2 on my Lubuntu LiveCD). Copy files below from viberoldphone1.tar DB directory to vibernewphone2.tar


viber_data
viber_data-journal
viber_messages
viber_messages-journal

Repack to .ab and restore data to phone

sudo java -jar abe.jar pack /home/user/a/vibernewphone2.tar /home/user/Downloads/vibernewok.ab
sudo adb restore /home/user/Downloads/vibernewok.ab



Works like a charm. I have just tested on Android 4.1 and 5.0. I run into problems on Win7 with adb so finally used Lubuntu.

You can try to edit Viber DB files with SQLite editor. Probably DB files could be restored directly but I had no time to test

References: 


http://dbremes.wordpress.com/2013/02/11/how-to-get-a-backup-of-your-android-applications-database-in-windows/
https://stackoverflow.com/questions/2078710/android-adb-access-to-application-databases-without-root