Paul A. Kusisto

A Simple Parser for Google Voice Takeout Data

I love Google Voice, and have been using a Google Voice number since 2011. However, I have changed phones multiple times, and I have even changed Google accounts (with a new Google Voice number to match) in the past four years, so the only text messages saved on my phone are the ones which I have sent or received since I last factory-reset (or re-flashed) my phone.

In addition to my love of Google Voice, I have an unhealthy love of accumulating data of all forms, so only having the last few months worth of text messages on hand at any given time has always bothered me. As a result, I finally decided to build a system to parse through my Google Voice data, and collect all of my text messages together in one place.

Though I found a repository on GitHub (https://github.com/flopraden/Android-SMS-DB-importer) which claims to do exactly what I’m looking for, I couldn’t get that code to run, and the repository hasn’t been updated in years. I finally decided to make a quick project out of building my own solution.

This code isn’t pretty, (it’s actually quite hideous - I normally write cleaner code, I promise!) but it’s functional at a basic level, and I wanted to release it as soon as I had something that even remotely worked.

All this code does is parse the “Voice\Calls” directory of an extracted Google Takeout folder to build a list of all the text messages contained in all of the files in that folder. The text’s timestamp, the sender’s phone number, and the message body are all retrieved, then written to a simple text file.

When I have time, I’d like to build a more complete archival solution. Perhaps, this project could morph into an Android app which could pull the Google Takeout data from Google Drive, and then add the text messages to the current device’s message database, making it easy to fetch and combine old and new text messages from multiple accounts.

In any case, this code should be a simple starting point for others to manipulate their Google Voice text message data. Without further ado, here is the code:

Direct Download Link

To use this code, place it in the “Voice” directory of an extracted Takeout archive, or specify your own input and output paths with the command line flags. (Use -h at the command line for more help.)

I hope that this project is helpful for someone! I will continue to develop it when I have the time, at which point I will likely put it on GitHub, but for now, it will stay here.