Recently, I decided to migrate from iOS to Graphene. Since everyone around me uses WhatsApp and I have chats that I don't want to lose, I decided to spend a few hours figuring out the best way to migrate chats from one OS to another.
I will provide some context before diving into the topic. iOS has a way to migrate chats from an iPhone to an Android device (GrapheneOS doesn't work; it has to be an Android device), so I decided to start here.
In my case, I don't have another mobile device with Android, so I used the Pixel to capture a copy of the iOS backup on Android. If you are starting from an Android device, you can skip directly to step 2.
Note 1: Stickers will not be transferred, but there will be a copy of all the sent stickers in the chats. I will later explain how I managed to recover the stickers if needed.
1. I started by following this guide: https://support.google.com/android/answer/14669513?hl=en&co=GENIE.Platform%3DiOS. It basically explains how to transfer the app from iOS to an Android device. In my case, I only imported the WhatsApp app and nothing else. I followed the guide to bring all the chats and restore the backup.
2. At this point, the Android device should have a copy just like it was on iOS. Now we will make a copy, but we will not use the Google Drive cloud backup. Instead, we will make a local copy on our PC to later recover it on the device where we have installed GrapheneOS.
Note 2: The Windows file explorer doesn't work very well when transferring many files. It freezes and doesn't transfer the information. To avoid using this method, we can use the adb tools (https://developer.android.com/studio/releases/platform-tools).
Activate developer mode in Settings > About phone and click on the build number until they are activated. Next, enable USB debugging in Settings > System > Developer options.
3. Connect the Android device to the PC with the USB cable and use the adb tools to transfer the files to the PC. In my case, I used these commands to transfer the files:
.\adb.exe pull /sdcard/Android/media/com.whatsapp C:\Whatsapp_Backup\com.whatsapp
.\adb.exe pull "/sdcard/Android/media/com.whatsapp/WhatsApp Images" "C:\Whatsapp_Backup\WhatsApp Images"
.\adb.exe pull "/sdcard/Android/media/com.whatsapp/WhatsApp Stickers" "C:\Whatsapp_Backup\WhatsApp Stickers"
.\adb.exe pull "/sdcard/Android/media/com.whatsapp/WhatsApp Video" "C:\Whatsapp_Backup\WhatsApp Video"
Note 3: I recommend doing it step by step, as you can miss some folders in the transfer and not notice it. In my case, I had to isolate those three folders at the root of C:\Whatsapp_Backup and import them one by one later. I will leave you the commands I used as an example:
The folder structure is as follows:
C:\Whatsapp_Backup\com.whatsapp
C:\Whatsapp_Backup\WhatsApp Images
C:\Whatsapp_Backup\WhatsApp Stickers
C:\Whatsapp_Backup\WhatsApp Video
So the commands to transfer were:
.\adb.exe push C:\Whatsapp_Backup\com.whatsapp /sdcard/Android/media/
.\adb.exe push "C:\Whatsapp_Backup\WhatsApp Images" "/sdcard/Android/media/com.whatsapp/WhatsApp/Media"
.\adb.exe push "C:\Whatsapp_Backup\WhatsApp Stickers" "/sdcard/Android/media/com.whatsapp/WhatsApp/Media"
.\adb.exe push "C:\Whatsapp_Backup\WhatsApp Video" "/sdcard/Android/media/com.whatsapp/WhatsApp/Media"
As I mentioned earlier, I was forced to do it this way due to the absurd amount of files in those folders. You can try to do it all with the first command without moving the folders out of "com.whatsapp," but it didn't work for me because of the file volume.
4. Once we have the WhatsApp copy on the mobile device, we can install WhatsApp. In my case, I used Aurora Store, logged in with my mobile phone, and after granting permissions to the app, it should detect that you have a backup to restore. Click on restore, and you will have your backup restored.
Extra. To recover stickers, I simply took a copy of the WhatsApp Stickers folder and used this application (https://github.com/qarmin/czkawka) to delete all duplicates (note that it stores all the stickers sent in the chats. In my case, I had 19600, so I used this app to speed up the inhuman task of doing it manually). I uploaded the remaining stickers to a folder on my mobile device and restored the ones I wanted with the "Sticker Maker" app.