Hacker News new | past | comments | ask | show | jobs | submit login
Extracting WhatsApp Messages from an iOS Backup (yasoob.me)
243 points by yasoob on April 24, 2022 | hide | past | favorite | 74 comments



You might also be interested in a software called iMazing.

It’s a paid piece of software, not free, but it’s worth the price imo.

I use it mainly for transferring photos from my iPhone to my MacBook Pro M1.

But I know that iMazing can back up WhatsApp messages as well, among other features.

https://imazing.com/

https://imazing.com/guides/export-and-print-whatsapp-chats-f...


> I use it mainly for transferring photos from my iPhone to my MacBook Pro M1.

This caught me by surprise; I'm not sure if you're aware, but you can open up Image Capture (built-in Mac app) to import photos from your iPhone. Obviously iMazing can do other things as well, but just in case.


Image Capture constantly freezes for me and isn't able to skip duplicates anymore.


Image Capture is really not good even with 20GB of pictures I have. It just crashes or freezes and have to start over.


The Apple Photos app will also import photos from your phone. Just connect via lightning and it should show you a list of photos that can be imported. It will also do duplicate filtering if you already have imported some. It also has an option to remove the photos from your phone if you want to free up space.

I don’t use that feature as much anymore as I’m all in on iCloud now, but it worked fine when I last did it about a year ago.


Apple Photos has been terrible for dealing with huge amounts of photos, that’s why I stopped using it. Meanwhile iMazing works perfectly for transferring the photos, and then I keep them in plain old folders.


Have they improved that? Last I tried with 200GB or so of photos it just froze.


Not as of 2 months ago. It took days of crashing or hanging programs to get the photos off my wife's iPhone. I tried everything mentioned including Image Capture on a new MacBook, and the problems were at least as bad for me. I had to change the sleep settings on every device involved to multiple hours because a 30 minute hang was on the good side. In the end, what ended up working best was a full backup of the phone to a PC with iTunes, and extracting the photos out of the backup with iMazing.

For perspective.. I remember downloading and installing Linux off floppies. That sucked too, especially with bad disks or download errors, but it was less frustrating than this.

It seems like they don't improve it because iCloud seems like it works smoothly, and they get an on-going profit stream out of it. The process was so brutal I almost broke down and paid for a ton of iCloud storage.. but didn't because getting lots of photos out of iCloud is also painful.


Were you not about to use the import function in Mac OS Photos app? If you connect a phone via cable, it should present a list of photos and let you import them to the Photos local library.


Most people aren’t importing 200GB of photos from their iPhone in one go…


Given that Apple are selling iPhones with 1TB of storage these days, you'd expect them to test the ability to import huge libraries. (even if the 13 Pro still uses USB 2.0 so the transfer speeds would be abysmal)


My iPhone 7 supports sync over WiFi. I've never benchmarked it, but I'd expect the speed to be better than USB 2.


Only if you want to use iCloud, no? Or maybe I just wasn’t able to use that at the time because I was on hotel WiFi.

Are new iPhones really doing usb 2 over usb-c?


I don't think it was using iCloud. It would show up in iTunes (haven't used my Mac much since iTunes got split up) and I could drag files around from some applications and back it up to my local drive (in addition to the iCloud backups).


To be clear, 200GB is not a lot. That’s $2 of HDD space (diskprices.com). Or ~400min of compressed video. Or 33 minutes of raw video.

I expect most people import 100G if they have the cheapest model (128G flash), but the rest are importing 200G or more.


If you started on iOS in 2010 and kept all your photos, this is hardly an edge case. People take a crazy amount of photos nowadays, definitely not unique to photographers.


I think the majority of people don’t copy photos from their iPhone to their laptop at all.

Firstly, they may not have a laptop. Secondly, I expect many more of those who have one will sync photos from their phone to iCloud and from iCloud to their laptop then directly from their phone to their laptop.

Yes, for large archives, that costs money ($10 a month gets you 2TB if iCloud storage), but I guess/think the convenience and having almost direct backups in case you lose your phone are worth it for most people who want to do such copying.

If so, it _is_ an edge case.


But some people are.


Hardly seems like an unusual situation. I suspect most people never import photos from their iPhone, they might have quite a few if/when they eventually choose to do so.


Exactly the solution I was looking for. Thank you!


Thank you so much for this. We recently migrated a relative's phone from Android to iPhone and were shocked to notice there is no way to migrate WhatsApp account history from the Android-->iOS.

Do you have any suggestions for this?


One year ago I migrated from Android to iOS and used iCareFone for WhatsApp Transfer to do the migration processes. It worked perfectly.

It’s a subscription software, so I signed up for 1 month, did the migration, and then cancelled my account.


Wutsapper works: https://play.google.com/store/apps/details?id=com.wondershar...

I used it, it's a very slow, very nerve wracking experience, but it works.

You MUST have fully charged phones before you start!! And they need good battery life, since there's no way to charge them while it works.

See here for some comments: https://www.reddit.com/r/whatsapp/comments/qo1wfc/the_curren...


I know there is a paid app on Playstore that apparently works. Don’t remember the name. Will have to look it up. I came across it during my research. But there is also this on GitHub: https://github.com/residentsummer/watoi

Give it a try and see how it goes?


This is Android to IOS i was think of IOS to Android. Btw i was wondering why do the paid apps charge so much for this transfer. But thanks to you now i know this stuff is complicated and you have done an amazing work decoding it. What if now the next post about how to import this to Android? Then a program which is open source project for this purpose? But Only if you have time!


I used this GitHub repo to do this - https://github.com/residentsummer/watoi

It’s buggy, you have to fire up Xcode to run it, and on top of that I had To manually do some corrections in the SQLite database before the script ran without errors lol. But it did work (though it screwed up message orders lightly).


I managed to transfer my relative's chat history from android to iphone last year using BackupTrans[0] although you need some steps to do it.

[0]:https://www.backuptrans.com/android-iphone-whatsapp-transfer...


Backuptrans is the best solution I’ve found for this, done 3 successful migrations with it.

You’ll need to also use https://github.com/YuvrajRaghuvanshiS/WhatsApp-Key-Database-... which makes the process easier than it used to be - no need for an android emulator or second rooted phone

What you’re paying for with Backuptrans is mostly the conversion between database formats, I’m not aware of an open source solution to that. The extracting/decrypting/viewing of android messages and editing iPhone backups can all be done with other tools


Unfortunately I don't know of a free way to do this at the moment - it is supposedly being worked on. https://www.theverge.com/2022/1/22/22896666/whatsapp-android...

You could try looking through this posts on reddit which details a few options for this: https://www.reddit.com/r/ios/comments/qkq7f2/the_current_sta...


My setup (following Schneier's essay 'data is a toxic asset') is as follows: 1 week self-destructing messages in Signal (I don't use WhatsApp). If its an important message I save it (can't remember the last time that happened), if its an important picture I save it (which then gets uploaded to Nextcloud, which gets backed up to a Synology elsewhere, and it gets deleted from my smartphone but available via Nextcloud; e.g. photo as memory of our young children). There's no data to save, no data to migrate (I also don't use Google Drive for backups) and the only data there automagically gets removed within a week. My Nextcloud is only reachable via Wireguard. If my smartphone gets compromised (ie. stolen or lost) I'd need to revoke that keypair in Wireguard.


> the only data there automagically gets removed within a week

Nice! To be clear, you can't count on the same thing happening on the other end of the connection due to various alternative Signal clients. This is kind of where Snapchat is king of the hill, but obviously nothing is perfect!


That's a fair point.

Snapchat APK can be modded, with root one can make screenshots and videos (I believe it is how some revenche porn is made). There's also analog screenshots (photos), and the end point (smartphone) can be hacked e.g. contain malware.

In my M.O. I assume the end point is not compromised and is honest; otherwise, whatever I write can be traced back to me.

Best thing would be not saying it, but if you were to make a good setup it wouldn't involve Android or iOS but something like Tails. And yet, we know deployed military in Ukraine don't use such. But what they do is better than analogue Russian on 8900 MHz.


It's interesting that you can get the decryption key on iOS but the only way to do it on Android is to root your device.


The days of android being free and open are long gone. Now there are several aspects of android that are more locked down than iOS. For example android has an api which allows disabling the screenshot feature. While iOS only allows apps to listen for when a screenshot has happened.


I also don't understand who thought it would be a good idea to disable screenshots...

Android is becoming worse every year.


For users, yeah there's no reason to disable screenshots or any other functionality that a user might want to do on their own hardware that they bought and morally should be in control of.

But for app developers there are a lot of reasons they might want to do that. Disappearing messaging apps like Snapchat, ticket QR code displaying apps, stock footage apps, ebooks, and more.

It's just that Google has decided that that second group of people actually owns your phone, not you.


This is why you need two smartphones, so you can use one to take a picture of the screen of the other... helps drive revenue for the industry.


This analogue loophole really makes me realize that if you need to stop a screenshot/screen recording for security/whatever, you've got a design problem. And this is specifically applicable to services like Netflix.


The technical background is that Android allows marking certain GUI surfaces as "sensitive", which increases their in-memory protection somewhat (not sure to what extent) and also makes them inaccessible to various remote screen recording/capturing solutions, including adb.

Not being able to take a screenshot is more of a side effect of that, but is arguably the main reason for most apps to use them in practice.

It's also been around for many years.


Banking apps?


That doesn't make any sense, how I'm suppose to do my personal budgeting?

And by the way you can screenshot in a browser.


It doesn't have to make any sense, banking "consultants" have put blocking screenshots in their "security requirements" and now all of them block screenshots.

You wouldn't want to risk being non-compliance when a breach happens would you?


Well its my phone my account why can't I take screenshots?


Literally something I regularly need to take screenshots of for payment confirmations etc.


I use my tablet for that, i.e. by taking pictures of the screen of my phone.


> While iOS only allows apps to listen for when a screenshot has happened.

This is horrible in itself.


Or you can set your own password on Android, and therefore not require rooting. (WhatsApp gives you that option) I do that for my own backups. Download them via Google Drive [0] and then use this tool to decrypt them [1][2]

[0] https://github.com/YuriCosta/WhatsApp-GD-Extractor-Multithre...

[1] https://github.com/ElDavoo/WhatsApp-Crypt14-Crypt15-Decrypte...

[2] https://github.com/ElDavoo/WhatsApp-Crypt14-Crypt15-Decrypte...


Back in the days you would just lose all your message history anyway with text / AOL / MSN / facebook messenger / others… so I just started accepting it as a fact of life that you can’t keep your messaging history forever.


MSN/Live Messenger automatically saved chat histories as nice XML files in the user's documents directory, along with received files, so no real effort had to be made for preservation.

As for SMS texts, they could be backed up at least on later Symbian OSs, with the Nokia Ovi desktop app. On Android, backup apps would be able to do it as well.

At least in theory, EU directives for data portability (the "takeout" feature) should grant access to the message history for any abiding platform.

I think all chat platforms should have the decency to offer an export option, regardless of the underlying protocol.

Recollecting my message history from all sources into a common database is definitely high up in my project backlog.


Facebook messages are definitely lost. I downloaded backups and lots of messages have disappeared. Maybe not a problem anymore though.


Not quite, MSN messenger had the option to save all your conversations as XML. I still have them in old backups.

It's a wild throwback. Even though it is mostly mindless chatter, it is nice to have.

It's definitely a shame that there was no common/interoperable format for locally stored IM history, like there is with emails.


I'm limiting the chat history of all charts to 7 days. You never know what will be used against you in the future.


Wouldn’t it be better to know?

What I mean is: your chat partners could archive your chats or some man in the middle. Better to know what you wrote, then to be blindsided later by somebody else who got hold of these archives.


i doubt that most of my chat partners have the capabilities to do that. and yes, it would be smart to make archives, but let the chat destroy itself after 7 days.


Extracting isn't the hard part. I have yet to figure out how to append Whatsapp message from a previous backup which I have held for 8 years.

The iOS backup was corrupted and I had to start over again at the time. The Whatsapp file was extracted but I never got round to it. ( Along with important pictures inside the Whatsapp)

To this day I still blame on it on iOS backup problem. Which is still a thing in 2022.

I wonder why Facebook hasn't made an iOS to Android Whatsapp history transfer a priority. To most people outside of US, Whatsapp history transfer is the biggest lock in with the Smartphone ecosystem.



Because Whatsapp was bought to eliminate the competition. There is no quality control, it's by design


On a similar topic, is this possible with Signal or iMessage? I have an incomplete archive on my phone due to data loss but my iPad has a continuous record. I would love to get it synced to the phone.


I made a guide for doing this with Signal using Frida if you can jailbreak. https://github.com/hsorbo/signal-backup-ios


This [0] (I made this) will let you get your messages out into Markdown/HTML + attachments, but I'm pretty sure there's no way to get them back onto your phone yet.

[0] https://github.com/carderne/signal-export


last I extracted (and migrated) WA from iOS I used idevicebackup2 and a util ideviceunback to get a decrypted sqlite database. From there it's sqlite schema discovery that is documented in multiple places, e.g. https://gist.github.com/paracycle/6107205 - the method of an decrypted backup skips the elaborate steps outlined in the article.


Lost all of my WhatsApp messages when moving from android to iPhone. This would have been nice if I still ajay that android phone.


Same here! Moved to iOS around 2 years ago. I also wasn’t sure how legit the paid migration software were so decided not to waste any money on them. Then I recently realized that being a programmer I should be able to cobble something together if I were to ever make a reverse transition. And that is how this article was born :)


We had a license for some paid software for another reason, but it didn't work for me. I won't name them because support was very helpful, even gave me a beta to try, but by then I'd moved on. I think my archive was simply too big and it was causing issues.


I thought you could backup/restore WhatsApp messages to/from Google drive? I have seen that work between two Android phones - does that feature not exist in the WhatsApp iOS app?


In iOS it does the same for iCloud.

There is no official way to switch from Android to iOS, and the reverse is only possible for some newer Samsung phones.


Anyone know of a good way to extract information from the Notes app using Ubuntu?


Haven’t tried this yet but was looking for a way to do this and found this - https://www.npmjs.com/package/apple-icloud


Also Elcomsoft phone breaker, which also grabs iCloud backups.


This kind of hacking shouldn’t be necessary.

I think WhatsApp should be fined heavily for not providing the portability that the GDPR requires them to provide.

Yes, (on iOS) you can export your settings and each individual chat, but IMO they should have a one-click solution.

(I think their argument for not having to provide it is that WhatsApp messages are stored on each user’s phone, not on their servers, but IMO, they still are inside WhatsApp’s realm. Certainly, on iOS you cannot open them in any other way than to the WhatsApp app)


[dead]


It's been "soon" for a while now. And that's no use for people that need it now because they got a new phone. I'd just run the app on a VM without internet.


> https://github.com/residentsummer/watoi

Nice! Is there same for extracts dB of Viber & Facebook apps from Android and transfer to another Android?


I've never used Viber so not sure sorry, but Android to Android is pretty straight forward for apps Instagram and Facebook - simply log in on the new phone, right?


That escalated quickly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: