News for hackers. Stuff that matters.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by Given_47 on Tuesday August 01, 2023 @02:55PM (#36960705)
Oh 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
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by 0cf8612b2e1e on Tuesday August 01, 2023 @03:44PM (#36961592)
Do 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?
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by Given_47 on Tuesday August 01, 2023 @03:51PM (#36961686)
Yea 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

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by css on Tuesday August 01, 2023 @03:53PM (#36961715)
The database file is the same across both platforms, you just need to choose the right path: 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/c73bc4d66...

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by 0cf8612b2e1e on Tuesday August 01, 2023 @04:13PM (#36962032)
How do I make a backup without the Cloud on Linux?

Instructions I found from Apple (https://support.apple.com/en-us/HT203977) are to use the Cloud, a Mac, or Windows +iTunes.

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by css on Tuesday August 01, 2023 @04:37PM (#36962419)
Maybe something like https://github.com/libimobiledevice/libimobiledevice? I'm not sure, I haven't tried to do this.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by pabs3 on Wednesday August 02, 2023 @06:38AM (#36969114)
libimobiledevice definitely works for this, I've done it before.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by tikkun on Tuesday August 01, 2023 @02:56PM (#36960734)
The 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
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by css on Tuesday August 01, 2023 @02:57PM (#36960755)
Thanks! I figured it was a concise way to show what the output looks like while also explaining some of the features.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by gumby on Tuesday August 01, 2023 @03:16PM (#36961071)
This 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"

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by dewey on Tuesday August 01, 2023 @04:03PM (#36961881)
Wouldn'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/

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by jcims on Tuesday August 01, 2023 @04:36PM (#36962407)
I'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.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by css on Tuesday August 01, 2023 @06:15PM (#36963940)
If 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/c73bc4d66...
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by jcims on Tuesday August 01, 2023 @07:31PM (#36964760)
oooooh that's exactly what it is! thank you!
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by amarshall on Tuesday August 01, 2023 @04:37PM (#36962420)
> iMessage doesn't keep your whole message history on-device

Unless you’ve changed the “message history” setting, yes, it does keep all history on-device. It’s just incredibly frustrating to access any of it because Messages.app is awful at history.

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by cincorrect on Tuesday August 01, 2023 @07:08PM (#36964533)
> 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.

This is confidently incorrect.

The entire database is stored on device in a SQLite database. It absolutely has a terrible UI for fetching messages, but they’re all there.

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by accrual on Wednesday August 02, 2023 @01:33AM (#36967287)
I previously kept copies of this SQLite database on hand when backing up my phone (it stores to a specific folder every time), but since encrypted backups were introduced a few iOS versions ago, I found it too much of a hassle.

If OP wants to find this file, a good search term is "3d0d7e5fb2ce288813306e4d4636395e047a3d28" which apparently is a sum of the string "HomeDomain-Library/SMS/sms.db".

One thing I miss from Android was the simplicity of getting data in and out of the phone. I could just dump everything to CSV and be done with it.

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by sherry-sherry on Wednesday August 02, 2023 @02:34AM (#36967704)
They might mean attachments too, which I count as whole message history.

Messages seems to be somewhat random about keeping/removing attachments from your devices regardless of how much storage you have free or whether you have 'Optimise Storage' off.

*note this is specifically when using Messages with iCloud

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by GrabbinD33ze69 on Tuesday August 01, 2023 @11:05PM (#36966500)
If you don't sync imessage to iCloud, I thought it quite literally only stored on device in that case, besides when it in transit to be delivered. Referencing this official apple article, messages that are waiting to be delivered to devices can sit in the message queue for up to 30 days. https://support.apple.com/guide/security/how-imessage-sends-...
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by Thoeu388 on Tuesday August 01, 2023 @03:17PM (#36961080)
Nice, 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....

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by dewey on Tuesday August 01, 2023 @04:07PM (#36961925)
But 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?
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by tamimio on Tuesday August 01, 2023 @03:23PM (#36961204)
For 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.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by amatecha on Tuesday August 01, 2023 @03:28PM (#36961296)
Oddly 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 :\
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by tamimio on Tuesday August 01, 2023 @03:41PM (#36961535)
Yeah 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?
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by amatecha on Tuesday August 01, 2023 @03:58PM (#36961783)
Oh 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
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by ketzo on Tuesday August 01, 2023 @03:44PM (#36961590)
Supposedly iMessage search is getting way better in iOS 17. Fingers crossed.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by egonschiele on Tuesday August 01, 2023 @03:52PM (#36961706)
This 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.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by howmayiannoyyou on Tuesday August 01, 2023 @03:35PM (#36961442)
iMessage... 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.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by kennywinker on Tuesday August 01, 2023 @03:41PM (#36961534)
It'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.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by koolba on Tuesday August 01, 2023 @05:16PM (#36963095)
Enable automatic deletion after 30 days and free yourself from the mental shackles of historical message hoarding.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by rovr138 on Tuesday August 01, 2023 @05:54PM (#36963689)
>that I do not want to delete

They explicitly said what they don't want to do it.

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by koolba on Tuesday August 01, 2023 @06:23PM (#36964037)
If an addict asks for a better way to get their fix, it’s perfectly fine to call out the addiction.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by sciencerobot on Tuesday August 01, 2023 @07:41PM (#36964850)
Your 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.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by m463 on Tuesday August 01, 2023 @08:09PM (#36965100)
many 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

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by rpgbr on Tuesday August 01, 2023 @10:02PM (#36966048)
I wonder why people keep/rely on a messaging app as a source/storage/backup (?) for things like pictures. Isn’t that kinda inadequate…?
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by kennywinker on Wednesday August 02, 2023 @09:44AM (#36970798)
Most people don’t think about data backup. At all.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by denkmoon on Tuesday August 01, 2023 @11:01PM (#36966482)
I know I should just look this up myself to confirm, but are these not backed up to icloud? It's not that expensive, and if you don't want to pay the apple tax for services you don't buy apple hardware...
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by blitzar on Wednesday August 02, 2023 @03:59AM (#36968226)
People like to moan about "the cloud" or the "apple tax", then moan about how they lost all their irreplaceable images when they lost their phone.

Most of the time the complaint is that apple forces you to use icloud and back up everything.

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by tn1 on Wednesday August 02, 2023 @04:14AM (#36968330)
There's tools like Wondershare transfer. It's not free but does a surprisingly good job of converting between android and iOS. Somehow they figured out the secret sauce of Apple's backups and charge only $40 or so for the privilege (no affiliation btw). For me, it was worth it
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by TheHappyOddish on Wednesday August 02, 2023 @09:39PM (#36980301)
Agreed, but also this is a terrible spot to keep your only copy of something important. Reminds me of XKCD 1172[1].

1. https://xkcd.com/1172/

Re:Show HN: imessage-exporter, a full-featured CLI app and l... by zer0x4d on Tuesday August 01, 2023 @04:14PM (#36962048)
Dealing with iMessage threads during Discovery was a nightmare. I wish I knew about this tool when I needed it
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by smcleod on Tuesday August 01, 2023 @08:19PM (#36965203)
I've used this several times - it's really very good.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by demondemidi on Wednesday August 02, 2023 @12:29AM (#36966973)
Hey 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.
Re:Show HN: imessage-exporter, a full-featured CLI app and l... by mike503 on Saturday August 12, 2023 @12:16PM (#37101692)
I'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.