FORUMS

How to Lock and Protect Your Apps – XDA Xposed Tuesday

The smartphone revolution has passed. Everybody has mobile apps. Some of … more

Which OEM Would You Like to Help?

Most manufacturers have moments of greatness and moments of decadence, and in the past few years … more

Root T-Mobile S6/Edge on 5.1.1 Without Tripping Knox

If you purchase phones from a carrier, you may be no stranger to the difficulties … more

IonVR Coming Soon, HTC M9 Dev Edition Gets Android 5.1 – XDA TV

The HTC M9 Developer Edition has received Android 5.1. That and … more

[Q] Viber crashes if using restored bkup data

13 posts
Thanks Meter: 5
 
By kmmc, Junior Member on 2nd June 2014, 08:35 AM
Post Reply Subscribe to Thread Email Thread
Hey all.

I'm on a Samsung Galaxy S2 GT-i9100 running SlimSaber 4.4.2 20140531 (Kernel 3.0.80-SlimKernel+)
  1. I backed up my APKs and Data with MyBackup Pro
  2. Switched from NeatROM by flashing to Slim Saber
  3. Restored all my data using MyBackup Pro
  4. Mostly everything works except for Viber

A fresh installation of Viber works. But the moment I restore my data, it will not start up anymore. I've checked CatLog and the main error seems to be permission based:

Code:
Failed to chmod(/data/data/com.viber.voip/databases/viber_messages):
libcore.io.ErrnoException: chmod failed: EPERM (Operation not permitted)

Unable to create files directory /data/data/com.viber.voip/files
I've tried manually changing the permissions to follow the same perms from the "fresh data" of Viber - but that doesn't seem to fix this error.

Full Viber log:


06-02 15:22:57.295 I/ViberApplication(11763): ViberApplication, initialization STARTED
06-02 15:22:58.145 W/FileUtils(11763): Failed to chmod(/data/data/com.viber.voip/app_optimized): libcore.io.ErrnoException: chmod failed: ENOENT (No such file or directory)
06-02 15:22:58.145 W/FileUtils(11763): Failed to chmod(/data/data/com.viber.voip/app_working): libcore.io.ErrnoException: chmod failed: ENOENT (No such file or directory)
06-02 15:22:58.150 W/ContextImpl(11763): Unable to create files directory /data/data/com.viber.voip/files
06-02 15:22:58.155 W/ContextImpl(11763): Unable to create files directory /data/data/com.viber.voip/files
06-02 15:22:58.165 I/ActivityManager(2256): Process com.viber.voip:remote (pid 11763) has died.
06-02 15:23:33.815 I/ActivityManager(2256): Process com.viber.voip (pid 9564) has died.
06-02 15:23:33.815 W/ActivityManager(2256): Scheduling restart of crashed service com.viber.voip/com.viber.service.VoipConnectorService in 1000ms
06-02 15:23:33.815 W/ActivityManager(2256): Scheduling restart of crashed service com.viber.voip/.api.billing.InAppBillingService in 11000ms
06-02 15:23:33.815 W/ActivityManager(2256): Scheduling restart of crashed service com.viber.voip/com.viber.service.contacts.authentication.AccountA uthenticatorService in 21000ms
06-02 15:23:34.865 I/ActivityManager(2256): Start proc com.viber.voip for service com.viber.voip/com.viber.service.VoipConnectorService: pid=11961 uid=10113 gids={50113, 3003, 1028, 1015, 1023, 3002, 3001}
06-02 15:23:36.350 W/FileUtils(11961): Failed to chmod(/data/data/com.viber.voip/databases/viber_data): libcore.io.ErrnoException: chmod failed: EPERM (Operation not permitted)
06-02 15:23:36.355 W/FileUtils(11961): Failed to chmod(/data/data/com.viber.voip/databases/viber_messages): libcore.io.ErrnoException: chmod failed: EPERM (Operation not permitted)


I'm no Android developer but I am comfortable enough with basic Linux.. any help you can extend is appreciated!

Rgds,
Kristy
Last edited by kmmc; 2nd June 2014 at 09:06 AM. Reason: expand on phone specs
The Following User Says Thank You to kmmc For This Useful Post: [ View ]
 
 
2nd June 2014, 10:28 AM |#2  
OP Junior Member
Thanks Meter: 5
 
More
Smile Fixed! Android Viber Backup and Restore Successful
Okay, thank Jesus I managed to get this fixed and this is what it took.

This solution required a Rooted device.
  • Restore Viber backup (for me I did this using MyBackup Pro)
  • Install SQLite Debugger from the Play Store
  • Using SQLite, try locating the Viber database files by selecting App then choosing Viber from the list (if you want to locate the database manually, for me it was under /data/data/com.viber.voip/databases)
  1. Choose the "viber_data" database
  2. Open the database, scroll to the bottom, choose "Create backup"
  3. Save the backup somewhere on your SD card (not inside the viber folder or else it will get deleted)

Repeat the same steps for the "viber_messages" database
  • Uninstall Viber (or if you are using MyBackup Pro, go under Toolbox and "Wipe the Cache & Data" for Viber)
  • Reinstall Viber so that a fresh, clean working set of databases are generated by the app (or re-open Viber)
  • Do the usual setup of entering your phone number, letting it sync contacts etc
  • Once Viber has settled down, close it
  1. Re-open SQLite Debugger
  2. Navigate back to the "viber_data" database
  3. This time, choose Restore Backup
  4. Select the backup file from your SD card
  5. Kill Viber if requested and wait for the restoration

Rinse and repeat for the "viber_messages" database

Once it is all done, reboot your device and hopefully, the next time you open Viber, the old messages & calls are all there! Unfortunately for me, presumably due to the change in ROMs, the photos sent in Viber messages are in my Gallery but NOT in Viber itself.. I suspect this can be fixed if the path is saved somewhere in the messages database - but right now, I'm just glad to have the text back.

If you get repeated errors from Viber during this process, try freezing the app using MyBackup Pro Toolbox (I believe Titanium Backup also has this option)


====

If this helped you, please click the THANKS
Last edited by kmmc; 2nd June 2014 at 10:35 AM.
The Following 3 Users Say Thank You to kmmc For This Useful Post: [ View ]
17th June 2014, 08:36 PM |#3  
Senior Member
Flag Cairo
Thanks Meter: 263
 
More
IT WORKED. THANK YOU VERY MUCH...

I've read so many guides around and they all resulted in either viber crashing or deleting messages right after connecting.

I had really lost hope of ever getting my messages back.
The Following User Says Thank You to Dr. Hurt For This Useful Post: [ View ]
18th June 2014, 02:35 AM |#4  
OP Junior Member
Thanks Meter: 5
 
More
Smile You are most welcome!
You are most welcome! I I'm a web developer and having to figure this one out gave me some insight into phone app development. Glad it helped someone

Quote:
Originally Posted by 7amdoun

IT WORKED. THANK YOU VERY MUCH...

I've read so many guides around and they all resulted in either viber crashing or deleting messages right after connecting.

I had really lost hope of ever getting my messages back.

The Following User Says Thank You to kmmc For This Useful Post: [ View ]
22nd May 2015, 09:57 AM |#5  
Member
Thanks Meter: 4
 
More
NICE!!!
You Legend! Your and only your process works!

Thank you!


BTW you don't know the location in the Android file system where all the photo's that have been sent and received is located do you? I need to restore my images but not sure where they are saved....(all good found the saved location /storage/sdcard0/viber/media...)

Quote:
Originally Posted by kmmc

Okay, thank Jesus I managed to get this fixed and this is what it took.

This solution required a Rooted device.

  • Restore Viber backup (for me I did this using MyBackup Pro)
  • Install SQLite Debugger from the Play Store
  • Using SQLite, try locating the Viber database files by selecting App then choosing Viber from the list (if you want to locate the database manually, for me it was under /data/data/com.viber.voip/databases)
  1. Choose the "viber_data" database
  2. Open the database, scroll to the bottom, choose "Create backup"
  3. Save the backup somewhere on your SD card (not inside the viber folder or else it will get deleted)

Repeat the same steps for the "viber_messages" database
  • Uninstall Viber (or if you are using MyBackup Pro, go under Toolbox and "Wipe the Cache & Data" for Viber)
  • Reinstall Viber so that a fresh, clean working set of databases are generated by the app (or re-open Viber)
  • Do the usual setup of entering your phone number, letting it sync contacts etc
  • Once Viber has settled down, close it
  1. Re-open SQLite Debugger
  2. Navigate back to the "viber_data" database
  3. This time, choose Restore Backup
  4. Select the backup file from your SD card
  5. Kill Viber if requested and wait for the restoration

Rinse and repeat for the "viber_messages" database

Once it is all done, reboot your device and hopefully, the next time you open Viber, the old messages & calls are all there! Unfortunately for me, presumably due to the change in ROMs, the photos sent in Viber messages are in my Gallery but NOT in Viber itself.. I suspect this can be fixed if the path is saved somewhere in the messages database - but right now, I'm just glad to have the text back.

If you get repeated errors from Viber during this process, try freezing the app using MyBackup Pro Toolbox (I believe Titanium Backup also has this option)


====

If this helped you, please click the THANKS

Last edited by blocka; 22nd May 2015 at 10:14 AM.
22nd May 2015, 11:04 AM |#6  
OP Junior Member
Thanks Meter: 5
 
More
You are most welcome! Glad it worked out for you too!

Quote:
Originally Posted by blocka

You Legend! Your and only your process works!

Thank you!


BTW you don't know the location in the Android file system where all the photo's that have been sent and received is located do you? I need to restore my images but not sure where they are saved....(all good found the saved location /storage/sdcard0/viber/media...)

24th June 2015, 11:16 AM |#7  
thatexan's Avatar
Member
Flag ✌ EARTH ✌
Thanks Meter: 1
 
Donate to Me
More
hello, while yes this way was VERY easy to do thank you so much for that!, the main problem im having is that i was searching for ways to bring back "voice messages" and this appeared to work it even shows that they are back but when i try to listen to *any of them i get this popup saying "you have chosen to delete this voice message" which i never did, any clue how to get voice messages back or how to rip and or convert from a TB file or from the restored folder on device?
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2015-06-24-05-09-01-1.jpg
Views:	6
Size:	69.2 KB
ID:	3376590  
24th June 2015, 03:16 PM |#8  
OP Junior Member
Thanks Meter: 5
 
More
Hey thatexan

This video may help in finding the files in the first place: https://www.youtube.com/watch?v=GVdjj1DRwMA

But unfortunately I have no ideas on how to get them to play. I haven't personally tried but if those really are the files, it is most likely that your voice messages are still in your backups but the location to them has not been updated in the Viber... and thus Viber thinks they have been deleted. I never tried fixing the photos issue so I don't have the steps that might help with your voice messages. Some suggestions though:

1) It is possible that in the viber database, it states where to find the photos/voice recordings. If you can find out where then you will need to update the location to point to the correct place
2) OR try receiving a new voice message in Viber and find out where it is stored.. then try putting your old voice recordings there.
3) If just placing your files there isn't enough, try poking around SQL lite to see if you can see the latest voice recording entry in the database and use that as a clue as to what to do - maybe the database needs to be updated with the new location for the old files?

I hope these suggestions help you find the solution. Do reply & share if you find a way to fix it.

Quote:
Originally Posted by thatexan

hello, while yes this way was VERY easy to do thank you so much for that!, the main problem im having is that i was searching for ways to bring back "voice messages" and this appeared to work it even shows that they are back but when i try to listen to *any of them i get this popup saying "you have chosen to delete this voice message" which i never did, any clue how to get voice messages back or how to rip and or convert from a TB file or from the restored folder on device?

Last edited by kmmc; 24th June 2015 at 03:21 PM.
28th June 2015, 08:54 AM |#9  
Junior Member
Thanks Meter: 0
 
More
THX a lot !!! tryed so much and your way works
but don't need SQlite - just make a backup (i used TITANIUM), put it on your PC, open it, search for these two files, copy them
copy /sdcard/viber/ media
and replace them with an explorer (i used ES)
reboot - done

btw - any idea how to integrate files from desktop-version missing on phone ???
Last edited by cla1966; 28th June 2015 at 08:56 AM.
29th June 2015, 07:21 AM |#10  
OP Junior Member
Thanks Meter: 5
 
More
Glad it worked Sorry I have no ideas on the integration with the desktop-version though.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes