Works for me (TM)
This was tested only with google authenticator v2.49 on android 4.2.1 (rooted)
Scripts in this repository highly depend on sqlite database schema of google authenticator app. So it the schema changes in new versions this method could break until i update the repository.
If it breaks for you, please open an issue with following information:
- google authenticator exact version (you can check it in settings > about)
- android exact version
- any other information about the error
It doesn't work
Sure it does !
The only thing that can fail here is time synchronisation between your different devices and different authenticator app vendors.
Please check that both old and new devices have the same timezone and time
Try to play with "offset compensation" feature in authenticator settings if codes don't match
Keep in mind that you won't be able to have perfect match between two different devices. You may experience 10 seconds offset between two devices.
Does it work on linux/osx/windows ?
Should work everywhere as long as you have all dependencies installed (see below):
- linux (tested on ubuntu 14.04)
- windows via cygwin
Root your phone that has google authenticator installed
Install adb on your pc/mac
Make sure you have sqlite3, netcat (nc), adb and bash installed on your machine
by default, when you do "adb pull", this command does not run as root on device, so you cant access files you want Install Adb unsecure, to allow "abd pull" command as root https://play.google.com/store/apps/details?id=eu.chainfire.adbd http://forum.xda-developers.com/showthread.php?t=1687590
!!! IMPORTANT: open "adbd insecure" app and check "Enable insecure adbd"
plug the phone
check that you can see the device using adb devices
If yes, run ./extract.sh
If no error showed, it means it worked and the file is not inside data/databases
If step 7 was successful, run ./dumpcsv.sh
goto http://localhost:2001 in your browser
Here you go, hover your mouse on one of blue squares, qrcode is shown. Open google authenticator on new device, and scan each code
Congratulations if you made it so far, your google authenticator codes are now transfered to your new device. Before you remove your codes from old device, make sure that one time passwords generated by google authenticator are EXACTLY the same on both devices. Note that both devices should have correct datetime set Thank you for using this guide :)
Now that you understand the process, you can run ./main.sh to do all this steps in one command Enjoy !
Google auth url format https://code.google.com/p/google-authenticator/wiki/KeyUriFormat
QRcode js library http://davidshimjs.github.io/qrcodejs/
QRcode commandline library https://github.com/gtanner/qrcode-terminal
Adb unsecure, to allow "abd pull" command as root https://play.google.com/store/apps/details?id=eu.chainfire.adbd http://forum.xda-developers.com/showthread.php?t=1687590