I think this is a pretty niche demand and probably another topic for r/DataHoarder but anyway, here I am.

I created this application to basically have a way to store my WhatsApp messages away from the Google/Meta servers. Or at least not depend so much on Google backup.

Whatsapp has a very limited export functionality, which any user can use through the app’s own interface. Once these messages and media have been exported, you can place them in a folder monitored by ChatVault, send them to an email monitored by ChatVault or upload them via the interface. Once ingested by chatvault, it will record the chat media on disk and save the messages in a database in a structured way. These messages can be accessed in a front end similar to a chat application.

It’s still under development, some things need to be improved (mainly the UI), it’s still far from ideal, it’s true, the way Whatsapp allows us to export messages is quite bad, which makes the entire process of exporting and ingesting it into chatvault quite coupled but it can still be useful for those who want to store their messages independently, just like I wanted.

https://github.com/vitormarcal/chatvault

Edit: add an application interface image

The UI still needs some work, but it serves the purpose

  • NeoJackOfBladesOPB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I worked on a similar project for a long time…I don’t really have code that I can share right now, but perhaps I can offer some hints.

    Instead of exporting chats from the app (since the function is too limited) I decrypted the backup database that WhatsApp creates. This was originally possible only on rooted Android phones, but it’s now possible if the user has chosen to encrypt the backup (and the encryption key is known).

    Once the database is decrypted, it is just a matter of extracting messages and media information from it, and rebuild the chat. One of the problems here (and one of the reasons why I could not keep spending time on this project) is that Meta changed the structure of the database multiple times over the last years.

    Here you can see an example of a chat I recreated from the database. The display format is HTML, trying to replicate the WhatsApp original look.

    Let me know if you want more info. I will be happy to share!

    EDIT: It seems I cannot post a picture in the comment. Is that a limitations of this community?

    I didn’t know you could access these messages without root these days, good to know!
    I was already aware of these frequent structure changes, so I went with the simplest as a proof of concept.
    Anyway, I plan to study a little more to find out how the Whatsapp base works, I don’t rule out an experimental import of this type.
    Thanks for the information! :D