Backup Google Authenticator

How to create a backup or transfer your Google Authenticator to another Android phone using TWRP

Recently I blogged about how my phone crashed itself, got almost completely useless and I ended up having to reinstall it. So far not big deal, but I wanted to keep my Google Authenticator Logins.

Backing up your Google Authenticator is pretty easy, if you have a phone with TWRP. TWRP is a custom recovery for certain android phones that allows for advanced options like installing a custom ROM or adb access outside a running Android system. We use the later property to safely copy our data from a Android phone to a computer.


Copy the app contents

DISCLAIMER: Copying the data is safe for your original phone, but it's not guaranteed that it will work on your second phone.
Try out if the authenticator on the second device swallows what you serve, before you delete/dispose/reinstall your first device.

Man sawing on the branch, he is sitting on
Sawing on the branch you are sitting on, might not be a good idea

I am always using TWRP for those actions, because the apps are not running. This means you get the data in offline mode, i.e. when all the apps are closed and not accessing the data at the same time you are backing them up. This avoids unnecessary race conditions and data inconsistency states and can safe you a lot of headache. Anyways - it should also work from an active Android, but don't be surprised if bad things happen.

In TWRP back up the following folder from your android phone.

This is your offline backup. Don't forget to encrypt it, if you store it somewhere.

If you want to transfer this to another Android device, then first install the Google authenticator, and then copy the data over

Just show/extract the secret

If you just want to get the secrets, it's sufficient to just extract the file

And then list the contents with the sqlite3 utility

Then they are listed on your screen. Store them to a text file, print them out or do whatever you want to do with them. Remember also here to encrypt them, if you want to store them away safely.

Leave a Reply

Your email address will not be published.