We have moved to a new Sailfish OS Forum. Please start new discussions there.
4

WhatsApp data sync: help please - can you do it?

asked 2019-05-30 15:31:05 +0200

boniface gravatar image

Hello sailors,

I've recently (happily) joined the community and am struggling to make WhatsApp recognise / sync with the backup files from my old Android phones' WhatsApp.

QUESTION: Has anyone managed to load their old WhatsApp conversations into Sailfish X from Android? How?

Please can you give me some advice about how you've successfully loaded the chat data backup into your Sailfish X? I'm on a XA2 using the Aptoid store's download.

NOTE A - I understand that I need to give the back up file to WhatsApp at exactly the right location and moment but I've tried everything I can think of. I'm talking about the file: msgstore-2019-05-30.1.db.crypt12 B - most online tutorials say that WhatsApp will prompt the user with an option to load a backup file after you register you phone number. This has never happened on Sailfish X. C. WhatsApp doesn't seem to have an option for manually loading a backup file.

I've attempted these various ways of getting WhatsApp to load the chat data:

1. A. Installing WhatsApp B. Register my phone number. C. Place the crypt12 file into home/Nemo/android_storage/WhatsApp/databases Result = No conversations loaded. No prompt from WhatsApp to load a backup.

  1. (Uninstalled WhatsApp first) A. Place the crypt12 file into home/Nemo/android_storage/WhatsApp/databases A. Install WhatsApp B. Register my phone number. Result = No conversations loaded. No prompt from WhatsApp to load a backup.

  2. (Uninstalled WhatsApp first) A. Created a directory on my SD card (formatted correctly for Sailfish X) ... Media/sdcard/WhatsApp/databases B. Place the crypt12 file into that directory C. Install WhatsApp B. Register my phone number. Result = No conversations loaded. No prompt from WhatsApp to load a backup.

Thanks in advance for your comments 👍

edit retag flag offensive close delete

Comments

Not very conversant with Android support on X and XA2 but on my Jolla 1 both Whatsapp and GBWhatsapp can use my old conversations without hassle on home/nemo/android_storage/Whatsapp I suggest you move the entire Whatsapp folder from your old android device to home/nemo/android_storage prior to registering your account.

DameCENO ( 2019-05-30 16:32:14 +0200 )edit

Backing up in google drive was an easy way, when I changed from Jolla1 to xperia x.

hsjpekka ( 2019-06-03 07:59:57 +0200 )edit

3 Answers

Sort by » oldest newest most voted
5

answered 2019-06-03 00:33:40 +0200

SagaciousT gravatar image

Today I finally made it after weeks of unsucessful attempts. I tried to transfer the backup from an Xperia X to an XA2 and always ended up with a found backup of 0kb and dated 01.01.1970 that could not be imported into WhatsApp. I tried all the tips read in various threads here. This is how I've proceeded today:

  1. Made a backup on the Xperia X and copied the WhatsApp folder in android_storage to the SD card
  2. Moved SIM and SD card to the XA2
  3. Installed Aliendalvik control on the XA2
  4. Installed WhatsApp on the XA2
  5. Gave WhatsApp memory access in Aliendalvik Control
  6. Opened the terminal and got root access with devel-su
  7. Moved to the android_storage folder with cd android_storage
  8. Changed the user and group of the copied files from nemo:nemo (from Xperia X) to media_rw:media_rw (as required by XA2) with chown -cR media_rw:media_rw WhatsApp
  9. Stopped Aliendalvik in the settings
  10. Executed chown -cR media_rw:media_rw WhatsApp again in the terminal
  11. Started Aliendalvik again in the settings
  12. Started WhatsApp and finally found the readable backup

I don't know if all steps had been necessary, but this worked now.

edit flag offensive delete publish link more

Comments

Thank you! I got it working as well following your steps.

picklerick ( 2019-06-08 02:18:25 +0200 )edit

Did it as described and it worked :)) It Seems the difference to all the other described attempts in various threads and the crucial step here is to grant Whatsapp memory access in Aliendalvik Control?

Paul ( 2019-06-13 17:27:38 +0200 )edit

Which "Aliendalvik control" are you referring to?

Sebix ( 2019-12-21 14:05:41 +0200 )edit

Ok, so it's the android settings for the Android application? Ist this the same as Settings > Apps > Whatsapp (> Permissions)?

Sebix ( 2019-12-21 16:52:46 +0200 )edit
2

answered 2019-05-30 16:26:58 +0200

Alex gravatar image

You need to change the permissions of the backup file as mentioned here:

  1. Reinstall whatsapp
  2. Put the backup into the corresponding folder
  3. Activate the developer mode and set a password (Tutorial)
  4. Execute the following commands in the terminal:

    devel-su

    chown -R media_rw:media_rw /home/.android/data/media/0/WhatsApp

  5. Open whatsapp and the backup should be recognised

edit flag offensive delete publish link more

Comments

1

Hi Alex, That's for the astute answer. I've run into an issue in the process (sad face), restoring the back up fails.

step by step - I followed your instructions, however the terminal told me that there is no such directory. So I changed the directory path to reflect where the WhatsApp data is held on my phone. EG:

devel-su
chown -R media_rw:media_rw /home/nemo/android_storage/WhatsApp
  • The terminal accepts this.
  • When starting the fresh install of WhatsApp, I'm prompted with a message asking if I want to restore a back up.
  • I select to restore.
  • The screen shows "Preparing the restore"
  • A second later WhatsApp tells me the restoration fails.

I attempted this twice, same results both times.

Question 1. What is the command to change the folder permission back to normal so I can delete the contents? Question 2. Any idea why it failed?

This is a real chin scratcher.

boniface ( 2019-05-31 01:20:11 +0200 )edit

@boniface You do not need to restore the permissions, they are just being changed so that Android is able to read the file (and the permissions to the folders need to persist to keep Whatsapp working). You can just delete it and try it again.

Which backup file are you saving to the folder? The official tutorial tells that you have to copy the "msgstore.db.crypt.12" file (you may rename your backup file by removing the date).

Try to repeat the steps above but do not open Whatsapp directly (step 5), instead reboot your device beforehand (or restart the android layer) and try if it works after that.

Alex ( 2019-05-31 11:21:53 +0200 )edit
1

answered 2019-12-24 13:36:31 +0200

Sebix gravatar image

updated 2019-12-26 17:36:05 +0200

Hi,

After a lot of hassle I also managed to migrate WhatsApp from one Jolla1 to a Sailfish X device. For me, none of the advices I found, was working. I tricked a bit more, and it is probably more work but it was successful :) Is it always hard to find the relevant steps after a successful work. If you have any questions or problems following the steps, please do not hesitate to ask!

Source phone: Jolla 1 (with Android 4) Target phone: XA2 (with Android 8) Because of the different versions of the Android layer, the directories where the system data resides is different.

Prerequisites: You need to be able to activate the developer mode and use SSH. It may be possible to use media transfer via USB (MTP) and use the terminal on the phone too.

On the source phone: Activate developer mode and either use the terminal, or SSH:

cd /data/data/com.whatsapp/
tar --exclude lib --exclude lib-main -czf /home/nemo/whatsapp-sys.tar.gz .
chmod 664 /home/nemo/whatsapp-sys.tar.gz

To transfer the local media files, this optional step is needed. Android emulation must be running for this (otherwise the directory is empty):

cd /home/nemo/android_storage
tar -czf /home/nemo/whatsapp-storage.tar.gz WhatsApp/
chmod 664 /home/nemo/whatsapp-storage.tar.gz

Now, transfer the files to the target phone, e.g. with SSH (scp) or via USB (easier)

On the target phone:

  • Install WhatsApp
  • Start it once (creates the system directory)
  • Stop it in Settings > Apps > WhatsApp > Force stop
  • I am not sure if you need to grant Storage access permissions (I guess not, just try it without): Settings > Apps > WhatsApp > Force stop

Then again in the terminal:

cd /home/.android/data/data/com.whatsapp/
ls -l

This shows for example:

drwxrwx--x 2 10058 10058 4096 Dec 23 13:59 app_minidumps
drwxrws--x 5 10058 20058 4096 Dec 23 13:59 cache
drwxrws--x 2 10058 20058 4096 Dec 23 13:57 code_cache
drwxrwx--x 2 10058 10058 4096 Dec 23 14:00 databases
drwxrwx--x 8 10058 10058 4096 Dec 23 14:01 files
lrwxrwxrwx 1 root  root    55 Dec 23 18:56 lib -> /data/app/com.whatsapp-xhiN4SwQeJY5sltr8qJD4Q==/lib/arm
drwxrwx--x 2 10058 10058 4096 Dec 23 14:00 no_backup
drwxrwx--x 2 10058 10058 4096 Dec 23 14:03 shared_prefs

Here, remeber the owner/group of the files, in my case it is the number 10058. We need this later. We remove everything except the lib:

rm -rf app_minidumps/ cache/ code_cache/ databases/ files/ no_backup/ shared_prefs/
tar -xzf /home/nemo/whatsapp-sys.tar.gz

Use the number from above here (for example chown -R 10058:10058):

chown -R [number]:[number] .

For the media files:

cd /home/nemo/android_storage
tar -xzf /home/nemo/whatsapp-storage.tar.gz
chown -R media_rw:media_rw WhatsApp

That's it. Start WhatsApp on the target phone, it should show everything as before, no restore from backup is necessary, no phone number verification.

edit flag offensive delete publish link more

Comments

Instead of pasting the same content as multiple answers to different questions, it would be better to just link the same answer elsewhere.

addydon ( 2019-12-26 16:56:16 +0200 )edit

Actually it would be correct to mark the questions as duplicates. But it's not even possible to flag/mark questions as possible duplicates like on stackexchange.

Sebix ( 2019-12-26 17:00:35 +0200 )edit

You can "close" questions as duplicates.

addydon ( 2019-12-26 18:14:55 +0200 )edit

Thanks for the hint @addydon I just used this on another question

Sebix ( 2019-12-26 20:58:06 +0200 )edit
Login/Signup to Answer

Question tools

Follow
7 followers

Stats

Asked: 2019-05-30 15:31:05 +0200

Seen: 1,961 times

Last updated: Dec 26 '19