Sometimes an app update comes along and you wish you stayed on an older version. Sometimes it's just not as simple as uninstalling your current app and installing the older APK again, as maybe you have data within the app you want to keep or it's a system app and you don't want to fully uninstall it. Thankfully due to the capabilities of the Android Debug Bridge (ADB), it's possible to downgrade an app version without requiring root and keeping all of your data.

A prime example would be WhatsApp, which to use Substratum themes usually requires a certain version requirement. Rather than having to uninstall WhatsApp and go through the pain of logging into your account again, you can simply use this tutorial to downgrade again, using only adb. Root users may prefer to use something like App Downgrader on the Play Store. If you wish to proceed, firstly grab either Minimal ADB & Fastboot or the official Google binaries containing adb.

Be careful when you downgrade an app. Applications can upgrade databases and downgrading may render these files unreadable by the older application version. In rare cases the databases may break entirely if the app on the older version attempts to modify them.


How to Downgrade an App on Android

Find the APK of the app version you want to downgrade to. I recommend looking for it on XDA Labs or APKMirror.  Open the folder containing your adb tools, open your command prompt and navigate to the folder containing adb. Copy your apk file that you wish to downgrade to into this same folder where you have the adb file as well.

Enable USB debugging on your device by entering Developer Options. If you don't see Developer Options, then go to "About Phone" in Settings and tap "Build number" 7 times until a toast appears. Next, press the back button and you should see a Developer Options section. Check USB debugging here and then connect your phone to your PC.

When ready to downgrade the app, run the following commands in your command window.

        adb push app.apk /sdcard/app.apk 
adb shell pm install -r -d /sdcard/app.apk

Where "app.apk" is the apk file you have downloaded and want to downgrade to. Allow your phone to be debugged on the prompt on your screen, if this is the first time you're ever running adb on this phone. The application should then be downgraded and your data kept intact.

Downgrade an App on Android

Explanation

Adb has a lot of control over your device than you can normally access. We are first pushing the file to our internal storage. Then we use "pm" which calls the package manager on your device, and "install" of course installs the application. The flags "-r" and "-d" respectively mean "retain data" and "downgrade". This ensures that your phone does not clear the folder belonging to the application when it downgrades.