In case to got a new phone and want to move the Google Authenticator you will need to move the secrets from all the sites you added to the app. Or you are just curious what is actually being stored on your phone 🙂
Since I usually use the QR-code to create a new entry creating a backup is usually quite troublesome for me; I simply have no idea how to recreate the entries. But, its possible to download the apps database using adb. Well, that is if you have a rooted phone.
First you need to enable the adb USB-debugging somewhere in your settings. This depends on your phone, so you will need to look online on how to do it in your case.
After that you can connect using adb:
The root is important since otherwise you will not have access to the app-related database files. Next we can copy the authenticator database that includes all the entries of the app.
:~$ adb pull /data/data/com.google.android.apps.authenticator2/databases/databases 196 KB/s (16384 bytes in 0.081s)
Finally, we are able to open the sqlite3 database and print the info we need. I replace the actual output with some meaningless text, but its clear what the secrets are.
:~$ sqlite3 ./databases SQLite version 188.8.131.52 2013-01-09 11:53:05 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite>select * from accounts; 1|YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY| sqlite>.exit :~$
And that was it. Now you only need to re-add the secrets in the new phones authenticator app and you're done.