9 ms·
Show HN: imessage-exporter, a CLI app and library
- tamimio 3y agoFor anyone wondering, you can search your iMessages on iPhone by going to the message app, pull down and type what you want in the search bar on top.
- amatecha 3y agoOddly this doesn't always give results for me, for things I KNOW are in my messages. All my iMessage history is on-device (I don't use and will never use iCloud backup). Pretty disappointing :\
- tamimio 3y agoYeah I don’t use iCloud either, but that method always worked for me, where it does fail for you?! What’s the scenario where it doesn’t return what you were looking for?
- amatecha 3y agoOh it's just like some arbitrary limitation, like the search function only goes so far back, or something. No clue, I haven't narrowed down the exact factors that determine whether my search will get a result or not
- ketzo 3y agoSupposedly iMessage search is getting way better in iOS 17. Fingers crossed.
- egonschiele 3y agoThis doesn't return all messages unfortunately, and the way the algorithm works, it will return a few results at a time, forcing you to re-pull for more results. I wanted all the messages I had received from my dad, and it was impossible to do this way.
- mike503 3y agoI've been using TouchCopy for years, it supports encrypted backups as well. Not as nice as an open source tool, but it does work and it seems to get all the messages, attachments, everything. It does cost a little money, but it's been the only reliable thing that continues to work.
- zer0x4d 3y agoDealing with iMessage threads during Discovery was a nightmare. I wish I knew about this tool when I needed it
- Given_47 3y agoOh this looks great! I’ve crudely been querying the iMessage’s chat.db to export convos to txt files so this is a much more elegant option
- 0cf8612b2e1e 3y agoDo you have any pointers on how that is done? I assume/hope it is just a sqlite database so the only trick is yanking the file from the phone?
- Given_47 3y agoYea I saw iPhone usage was mentioned in the docs and I have no idea how that’s done. I’ve only tried through my laptop with iMessage sync by issuing $ sqlite3 ~/Library/Messages/chat.db and then performing some sql commands
- css 3y agoThe database file is the same across both platforms, you just need to choose the right path: https://github.com/ReagentX/imessage-exporter/blob/c73bc4d666da3a543708b553c9106acf89454e81/imessage-exporter/src/app/options.rs#L172-L179 https://github.com/ReagentX/imessage-exporter/blob/c73bc4d66... You can get this file from an unencrypted iOS backup: https://github.com/ReagentX/imessage-exporter/blob/c73bc4d666da3a543708b553c9106acf89454e81/imessage-database/src/tables/table.rs#L97-L98 https://github.com/ReagentX/imessage-exporter/blob/c73bc4d66...
- 0cf8612b2e1e 3y agoHow do I make a backup without the Cloud on Linux? Instructions I found from Apple (https://support.apple.com/en-us/HT203977 https://support.apple.com/en-us/HT203977) are to use the Cloud, a Mac, or Windows +iTunes.
- css 3y agoMaybe something like https://github.com/libimobiledevice/libimobiledevice https://github.com/libimobiledevice/libimobiledevice? I'm not sure, I haven't tried to do this.
- tikkun 3y agoThe image on the readme that talks about what the product does is a really nice way to do that - and in fact it's better than talking about what the product does because it's an example of an actual export - thanks for making this and for having a great readme
- css 3y agoThanks! I figured it was a concise way to show what the output looks like while also explaining some of the features.
- gumby 3y agoThis is quite nice. iMessage doesn't keep your whole message history on-device. You can scroll back and it will fetch a bit more each time, but that's it. Is there anyway to pull back to the beginning of time into the local database? I'd like to retrieve some specific old messages from a friend who has passed away. If I could get them out I could search (I know what I am looking for) but it would involve an unfeasible amount of "pull to fetch more"
- dewey 3y agoWouldn't the tool we are commenting on solve your problem nicely or what are you missing? Have you checked out the sqlite database where they are all stored? Does the iMessage search not work for this use case? https://arctype.com/blog/search-imessage/ https://arctype.com/blog/search-imessage/
- jcims 3y agoI've been tinkering with this recently and there are conversations where the last content in the sqlite database is a month and a half old. Oddly in some cases there used to be newer content in there that had since disappeared.
- css 3y agoIf you are talking about data missing from the `text` column, for some reason it disappears after you read a message. The content is stored in a binary blob in a different column, which I parse like this: https://github.com/ReagentX/imessage-exporter/blob/c73bc4d666da3a543708b553c9106acf89454e81/imessage-database/src/util/streamtyped.rs#L17-L68 https://github.com/ReagentX/imessage-exporter/blob/c73bc4d66...
- jcims 3y agooooooh that's exactly what it is! thank you!
- amarshall 3y ago
- Thoeu388 3y agoNice, but it needs continuous integration! Something that runs in docker container on my home server. If my phone gets stolen, I have 1 hour old backup....
- dewey 3y agoBut iMessages are already stored in iCloud and will be available on your computer or any new phone when you log into iCloud again if enabled. Wouldn't that already solve that use case?
- howmayiannoyyou 3y agoiMessage... why they refuse to permit users to file, tag, archive, print & share messages is a mystery to me. More and more of my clients want to communicate via text message.
- kennywinker 3y agoIt's downright criminal that apple doesn't provide tools to backup and archive imessages. I have like 40gb of messages on my phone that I do not want to delete, but I don't need them on my phone.
- koolba 3y agoEnable automatic deletion after 30 days and free yourself from the mental shackles of historical message hoarding.
- rovr138 3y ago>that I do not want to delete They explicitly said what they don't want to do it.
- koolba 3y ago[flagged]
- sciencerobot 3y agoYour entire digital life stored by clouds you have no control over is the norm. Being able to keep a local copy should be a fundamental right.
- m463 3y agomany friends have lost a good chunk of their life by losing their phones. one friend lost many of his baby pictures another lost all text messages from his (deceased) parent many family members just break a phone and move on. it is heart-crushingly bad that apple doesn't allow easy access and export from their proprietary message database. and no, I don't mean running sqlite3
- rpgbr 3y agoI wonder why people keep/rely on a messaging app as a source/storage/backup (?) for things like pictures. Isn’t that kinda inadequate…?
- smcleod 3y agoI've used this several times - it's really very good.
- demondemidi 3y agoHey can this merge two iMessage databases? I have one from an old machine and TimeMachine biffed something, so now I have two copies I'd like to combine.