My backup of 2FA codes failed at the worst time 🙁
Being a prudent IT-savvy user, I had exported all my two-factor authentication account data only a few days ago, to an older Android phone that also runs Google Authenticator. In fact, I have a calendar reminder to keep this 2FA backup updated, every couple of months. Naturally, I was feeling very safe and smug about it, thinking that I had nothing to worry about.
When I updated my Google Authenticator app to version 7.0, I discovered that the app now requires sign-in to Google. Normally this wouldn’t be a problem, but my phone is a Huawei phone, and due to the Huawei ban, it cannot connect to Google at the OS level. Instead, I use the Google apps such as Gmail, Calendar and Keep via the Brave browser (Chrome doesn’t sign in, and Firefox works but much slower). Other than that, it’s a good phone with a decent camera for its price range, and I’m happy with it, so I have no reason to change it.
But now, suddenly, I couldn’t use the Authenticator app, and all my 2FA codes were inaccessible. I immediately retrieved my backup phone from storage, only to find out that the battery had become a spicy pillow, and the phone would not start. Aaaargh!
Note that it hadn’t been more than a few weeks since this backup phone was usable, and I had kept recent backups of my 2FA codes in it. Naturally, I ordered a replacement battery for my backup phone. But this won’t be here for a few days, and I want access to my online accounts now.
Version 7.0: A drastic change. Too drastic, if you ask me!
My first thought was to look for an older version of the app and install that. Sure enough, looking at the APKPure, I found out that version 7.0 has this changelog entry:
Cloud syncing: Your Authenticator codes can now be synced to your Google Account and across your devices, so you can always access them even if you lose your phone.
Wow, thanks Google! That’s great and all, but unfortunately there is no option to NOT do this. It is not possible to continue using the app without signing in.
Downgrading the app from 7.0 to 6.0…
So I naturally downloaded version 6.0 from:
https://apkpure.com/google-authenticator/com.google.android.apps.authenticator2/downloading/6.0
I got a file named Google Authenticator_6.0_APKPure.apk
which I now had to install. But, apparently, it’s not possible to downgrade Android apps, without first uninstalling the newer version! The Android OS won’t let you do it. At least not directly.
And I didn’t want to uninstall the app, because that would presumably delete my 2FA data.
So, what to do?
After some googling, I found out that it’s possible to install an older version of an Android app via the command line tool adb
. I connected the phone to the computer with a USB cable and enabled debug mode.
The command that did the trick:
adb install -d Google\ Authenticator_6.0_APKPure.apk
And the output I got back:
Performing Streamed Install
Success
The -d
option is the one that allows to downgrade the app. Version 6.0
was installed on my phone, and I regained access to all my 2FA codes.
Hope this helps someone.
Interesting. I tried to follow this, however my adb complains:
[sw/android/authenticator] % adb install -d Google\ Authenticator_6.0_APKPure.apk
Performing Streamed Install
adb: failed to install Google Authenticator_6.0_APKPure.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: Downgrade detected: Update version code 6006000 is older than current 7001041]
Looking further I found, that you only can downgrade debuggable packages:
https://android.googlesource.com/platform/frameworks/base/+/921dd75
Since this change is from Feb. 2016, I’m wondering what version of adb you are running or if your package was debuggable indeed?
PS: I later found out, that you can also register a Google account to sync your codes to the Google Cloud long after the update. By doing so, you can recover your codes, but it’s far from being the approach I would have liked to take. Time to switch to another Authenticator App…
I don’t know why you got
INSTALL_FAILED_VERSION_DOWNGRADE
, the-d
flag should silence this. I’m usingadb
version1.0.41
. Maybe you can sync to a Google account, but I cannot do so on my phone which is a Huawei phone. These phones are now subject to restrictions against connecting to a Google account. Hence this article.I’m also having the same error with adb ,and I’ve huawei phone
Is there another idea?
For me it worked, but if you cannot downgrade via `adb`, perhaps try an older version of `adb`. This is my version:
$ adb --version
Android Debug Bridge version 1.0.41
Version 34.0.4-10411341
Running on Linux 5.4.0-202-generic (x86_64)