Android developers put a lot of effort into app updates, optimizing, adding new features, improving performance, and more. But sometimes it goes wrong, which could be a vulnerability, a glitch, or maybe a bug. To encounter this, the app publisher uses a staged rollout feature to prevent it from exploding and also to stop pushing updates further. And in time, the rollout patch and new update are to be released.
If you have already upgraded to the latest version of the app, then roll back with Android’s hidden rollback feature. You don’t need to uninstall the app and then install the older version. Downgrade the app after receiving the update from a third-party app download site. You don’t need to clear the data from your device unless you do it manually in the device’s settings. To retain the data, you can use ADB to manually install the latest version.
Precaution
You can’t simply roll back app updates while keeping your app data, cache, and app settings. Several things could go wrong with downgrading an Android app with app behavior.
- The latest version may not be supported by an older version.
- App cache and data are crucial to the app’s behavior.
- Sideloading requires that it be installed from an unknown source.
- With older versions, you may encounter problems.
Downgrade an Android app using a hidden Android feature to roll the app back.
To downgrade an app, the user has to install the older version on top of the newer version.
- First, download the older version of the app.
- Move the APK file to your PC.
- Launch PowerShell on ADB on PC or ADB Sheel on Mobile.Â
- Execute “pm install” and then “-d,” followed by the address of the saved file. (e.g., ADB install -d app.apk)
To restore the data
Google released the RoolbackManger Service, which allows for the restoration of data. Google has added this feature, which needs manual downgrade using a shell command. The Google Play Store doesn’t have this feature integrated to enable rollback. You can execute the “pm rollback-app {package}” command; to roll back, simply add the -enable-rollback option to the “pm install” command. Following
- adb push app.apk /data/local/tmp/
- adb shell
- pm install –enable-rollback /data/local/tmp/app.apk
- pm rollback-app {package}
Rollback, a copy of the backup stored at the original location, and app data have been enabled through a rollback overwritten. By default, the rollbackDataPolicy attribute shows how to handle data when a rollback is performed. Google has triggered rollback and published rollback functionality through Google Play, but has not integrated this to prevent users from.