answered
2019-12-26 16:49:09 +0200
I managed to migrate WhatsApp from one Jolla1 to a Sailfish X device with the following steps. 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 -czf /home/nemo/whatsapp-sys.tar.gz .
chmod 664 /home/nemo/whatsapp-sys.tar.gz
To transfer the media files, an additional 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.
@rodmart, this might help you;
https://faq.whatsapp.com/vi/android/20887921/
Spam Hunter ( 2019-12-26 13:32:41 +0200 )editwhy the.down votes ?
pawel ( 2019-12-26 16:03:07 +0200 )editPossible duplicate of https://together.jolla.com/question/206983/whatsapp-data-sync-help-please-can-you-do-it/
Sebix ( 2019-12-26 16:49:40 +0200 )edit@rodmart
did you manage to get it up?
peterleinchen ( 2019-12-30 00:40:00 +0200 )edit