[HN Gopher] Show HN: imessage-exporter, a CLI app and library
       ___________________________________________________________________
        
       Show HN: imessage-exporter, a CLI app and library
        
       Author : css
       Score  : 93 points
       Date   : 2023-08-01 18:27 UTC (4 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | zer0x4d wrote:
       | Dealing with iMessage threads during Discovery was a nightmare. I
       | wish I knew about this tool when I needed it
        
       | gumby wrote:
       | 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"
        
         | dewey wrote:
         | 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/
        
           | jcims wrote:
           | 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.
        
             | css wrote:
             | 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...
        
         | amarshall wrote:
         | > 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.
        
       | Thoeu388 wrote:
       | 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....
        
         | dewey wrote:
         | 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?
        
       | howmayiannoyyou wrote:
       | 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.
        
       | tamimio wrote:
       | 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.
        
         | amatecha wrote:
         | 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 :\
        
           | ketzo wrote:
           | Supposedly iMessage search is getting way better in iOS 17.
           | Fingers crossed.
        
           | tamimio wrote:
           | 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?
        
             | amatecha wrote:
             | 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
        
         | egonschiele wrote:
         | 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.
        
       | Given_47 wrote:
       | 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
        
         | 0cf8612b2e1e wrote:
         | 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?
        
           | Given_47 wrote:
           | 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
        
             | css wrote:
             | 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...
        
               | 0cf8612b2e1e wrote:
               | 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.
        
               | css wrote:
               | Maybe something like
               | https://github.com/libimobiledevice/libimobiledevice? I'm
               | not sure, I haven't tried to do this.
        
       | tikkun wrote:
       | 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
        
         | css wrote:
         | Thanks! I figured it was a concise way to show what the output
         | looks like while also explaining some of the features.
        
       | kennywinker wrote:
       | 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.
        
         | koolba wrote:
         | Enable automatic deletion after 30 days and free yourself from
         | the mental shackles of historical message hoarding.
        
           | rovr138 wrote:
           | >that I do not want to delete
           | 
           | They explicitly said what they don't want to do it.
        
             | koolba wrote:
             | If an addict asks for a better way to get their fix, it's
             | perfectly fine to call out the addiction.
        
       ___________________________________________________________________
       (page generated 2023-08-01 23:00 UTC)