[-] katroome@alien.top 1 points 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!

katroome

joined 1 year ago