It’s been ~5 years since the last time I had to do this and I don’t remember what the best way was, on my Linux devices I just rsync my homedirectory which I could do with the phones too I guess or should I create a backup archive from settings and import it on the new phone?
This question is limited and hard to even answer can you be more specific like what phone model what you want to do?
What does the phone model matter?
It’s SFOS (10ii) to SFOS (jp2026)
Native backup is a bit limited. See here for details.
Have a look at my partially failed attempt at full cross-device migration here:
Same device migration is more likely to succeed in this way.
Yeah I remember the old backups were basically the whole contents of the home directory under git, I think rsync should work too though as long as you initialize the rsync as devel-su to also get all the protected files. I’ll be trying somewhere this week (Whatsapp migration is the most annoying part as far as I recall and sadly not something you can get around for now).
The issue with WA and other Andy apps is that they usually have different UID and GID on different phones.
I could not migrate Whatsapp this time. Until I know a way I decided to use Jolla Phone as a secondary phone and leave Jolla C2 as a primary. The only weakness is that I have to use Whatsapp on the old phone every second week.
I looked through my phone and the only non native app that needs migrating is WA, all the native stuff should be covered by an rsync, WA used to have an archive you could export/import but those options seem to be gone now.
@rla88 Did you try this method? https://faq.whatsapp.com/1374388673551120/?cms_platform=android
I did not try before. Now I tried but the phone does not support qr-code transfer. I do have only local backup. May be I have to backup to googl.
I was also unable to use the QR method and while it seemed to have migrated messages it was only showing me groups and not personal chats as I don’t share my contacts with WA.
I’m now trying to go down the rsync road after all.
@rainemak @vige is there anyone who can provide more insights as to the UIDs/GIDs I should be using for folders?
My original assumption was that the UID/GID from the .appsupport folder would provide me with the mapping but this suggests otherwise:
[root@Xperia10II-DualSIM defaultuser]# ls -l /home/.appsupport/instance/defaultuser/data/data/com.whatsapp/ -d
drwx------ 12 510047 510047 4096 Jun 4 21:44 /home/.appsupport/instance/defaultuser/data/data/com.whatsapp/
[root@Xperia10II-DualSIM defaultuser]# ls -l android_storage/Android/media/com.whatsapp/ -d
drwxrws--- 3 510052 appsuppo 4096 Aug 16 2021 android_storage/Android/media/com.whatsapp/
IIRC each app gets it’s own.
So you’ll have to sync them with the new ones after backup restore.
Not helping you much, but I am currently trying to migrate WA between two proper Android devices (I use the J2 as secondary) and I face the same issues. It claims it can migrate (without syncing to the cloud) but it makes it impossible in practice. If it can be made easier on SFOS because we have more control over the filesystem, I want to know.
My question was about the mismatch between the app UID in .appsupport and android_storage at the time I seemed to not (yet) have a WA folder under android_storage on the new phone but I then noticed I did and used UID there.
I’m happy to report that after copying the files I seem to have my full WA history etc.
I would be much happier if my chat data was not a hostage of the WA app and I hope that the DSA rules mean that Mitakuulu or WhatsUp can be revived at some point, in the mean time here we are.
Could you share the exact step-by-step procedure you followed?
I guess, but please correct me:
- copy the files (which folders exactly?) from one phone to another
- change SIM to the second phone?
- open WA on the second phone (or did you not change the SIM before that?)
- “create a new account?” Is it this?
- then what to find the backups and chats?
“The files” being:
/home/.appsupport/instance/defaultuser/data/data/com.whatsapp/
/home/defaultuser/android_storage/Android/data/com.whatsapp/
I ended up enabling my root account and allowing root to SSH so that I could cleanly rsync all the “protected” files, obviously very much not a config to run day to day, it was only running at 1MB/s on my wifi which was annoying so I copied a tar I made of /home over the USB cable and then rsynced again which left me wondering if I could have directly linked the phones with a cable and SSH’ed in over wifi for better speeds.
I will try to give more details later, need to deal with something here now.
"the folders” means:
/home/.appsupport/instance/defaultuser/data/data/com.whatsapp//home/defaultuser/android_storage/Android/data/com.whatsapp/
I did the following, my new phone currently does not have my SIM and is only connected to wireless:
- Installed WhatsApp (used the official apk from their website)
- Tried their migration, saw only my groups immediately reverted to my old phone.
- Stopped AppSupport on the new phone
ls -lon the folders on the new phone to get the correct UID/GIDmvthe folders on the new phone to some backup just in casersync -avlfrom old to new, I did not go directly to the final paths but rather first copied, then moved but I don’t think you have to do that.chown UID:GID -Rwith the UIDs/GIDs you found earlier or you can still find from your backup dirs on the folders on the new phone note: the UID/GID pair is different for each folder- Started WhatsApp on the new phone and was greeted with the same state as on my old phone.
- Stopped AppSupport on both phones to finish migration and not lose data if I end up having to revert to the old phone due to other things (as they are currently in identical state).
Addendum - note that if the rsync takes a long time and your AppSupport/Whatsapp is still running on the source phone you should run it a second time to catch all changes that happened for the duration of the run.
Other migration notes:
contacts.dbschema is identical can drop incommhistory.dbschema is changedEvents.mmsId INTEGER→Events.mmsId TEXTaccounts.dbNo interest in attempting migration as I user per-device passwords.
/Edit -
contacts.dbandcommhistory.dbseem to be ignored at the moment, for commhistory this is understandable as there is a schema mismtach, contacts should have worked though….
I hope y’all don’t mind my continued documentation of the migration process.
It seems the issue with contacts.db and commhistory.db was that I only replaced the db files and left other sqlite related files in place which ended up causing the changed files to be ignored.
After fixing that (I replaced the folder that housed them with the one from the old phone) and ensuring permissions were correct all my sms, call history and contacts appeared.
But it still missed the contact images of the contacts (even though I seem to recall they are/were stored in the db, but I need to check that again), some searching yielded /home/defaultuser/.local/share/data/avatars however this was only a part of all the images set.
Also it seems that this way of doing things reset all of the contacts to be considered “purely” on the phone instead of on nextcloud, I still preferred this way since the nextcloud contacts did not come with the “starred” metadata (though it does seem that my nextcloud also has the images for those contacts that I already migrated), I will probably use this opportunity to try and get all/most of my contacts migrated and fix those that caused the issues I documented here a while ago (I suspect it is mainly “linked” contacts).
commhistory.db seems to be fine even though the schema is different, maybe it was migrated I will look at that later and migrate it myself if need be.