Hangouts to SMS/MMS
Scripts to convert exported Hangouts SMS/MMS messages to an SMS XML file. This is intended for Project Fi users that have been using Hangouts for texting along with the "Project Fi calls and SMS" option enabled who want to switch back to normal SMS/MMS apps.
These scripts and steps will allow you to export your Project Fi SMS/MMS messages from the Hangouts "cloud" and import them into the normal SMS/MMS database on your phone, thus retaining your message history.
Liability, etc
Use at your own risk! I claim no responsibility for the results of using these scripts or the steps outlined below. I do not provide any warranty or support.
Requirements:
- Python 3
- Titanium Backup PRO
Notes:
- Titanium backup will overwrite the existing SMS/MMS database on the phone.
- Root is not required
Phone Setup:
- Install Titanium Backup PRO (root is not required for SMS/MMS backup/restore)
- Backup existing SMS/MMS messages using Titanium backup:
- Open Titanium Backup (dismiss the message about Root if it appears)
- Press 'MENU' at the top right
- Scroll down and select 'Backup data to XML...'
- Select 'Messages (SMS & MMS)'
- When it's finished, select 'Save file locally', and hit 'SAVE' (remember where you saved it)
- Clear existing data from your SMS app:
- Go into Settings and select 'Apps'
- Select your preferred SMS app (e.g., Messenger or Textra)
- Select 'Storage'
- Select 'CLEAR DATA'
Export Hangouts Messages:
- Open https://takeout.google.com/settings/takeout
- Under 'Select data to include', click the 'Select none' button
- Scroll down and enable only Hangouts
- Scroll down and click 'Next'
- Increase 'Archive size (max)' to 4GB (hopefully not necessary)
- Choose 'Delivery method' and click 'Create archive'
- Download it to your computer when it's finished
Converting Hangouts to Titanium Backup XML:
- Edit "YOUR_PHONE_NUMBER" variable in hangouts_to_sms.py to contain your cell number.
- This is because the number seems to be missing from some conversations.
- Extract the Hangouts archive and copy the Hangouts.json file to the same folder as the script.
- Run the hangouts_to_sms.py script
Importing XML using Titanium Backup:
- Copy the messages.xml output file to your phone (I used Google Drive to transfer it)
- Open Titanium Backup
- Press 'MENU' at the top right
- Scroll down and select 'Restore data from XML...'
- Select 'Messages (SMS & MMS)'
- Select the messages.xml file from wherever you saved it on your phone
- If prompted to set Titanium Backup as your default SMS app, allow it
- It will change it back after it is finished
- When it's finished, open your texting app of choice and wait a bit for it to parse through the new messages