Android doesn’t natively support app rollbacks without certain workarounds. What can you do? 

Before we get into the meat and potatoes here, I have to ask: have you tried turning it off and back on again? Sometimes the most straightforward option is the best, so try rebooting before you trouble yourself with rolling an APK back.

Android’s rollback limitations 

If you’ve ever tried to roll an Android app back to an older version, you probably quickly realized that this isn’t a thing on Android. (At least for third-party installations. You can technically roll system apps back, but that’s also not without its own set of limitations, which we’ll get to in just a bit. )

The most important thing to know is this: You can’t simply roll back an app update on Android while also retaining existing settings, cache, and other data. Android doesn’t allow rolling apps back because there’s a chance it could cause other (possibly more serious) issues with app behavior. Newer versions of apps might support features not available in older versions, altering the app cache (potentially including how it’s stored or read). This means there’s a chance an older version will be unable to read the newer version’s cached data, causing the app to crash or misbehave. 

And there’s the rub. You can’t easily roll an app back without also clearing cache, which erases all user settings or custom layouts. That’s why the simplest option available for rolling an Android app back is to uninstall that app and reinstall the last known working version. When you uninstall the app, it clears all data and cache related to that app (note: this doesn’t include downloaded files or those written to other open directories), so you start fresh with a clean install. 

The exception is system apps — anything included in the Android OS, like the dialer, for example. If you get a problematic app update (usually through the Play Store, so this primarily applies to GMS devices), you can roll this app back. However, this will still clear cache and data, same as uninstalling an app — you just won’t have to reinstall it to use it. This isn’t especially useful.

Why Android app cache and data are important (and what they do)

Since we’ve already made it clear that app cache and data are crucial to an app’s behavior, it’s important to talk about what each one does. In the simplest terms:

  • App cache: This is where temporary files related to the app’s functionality are stored. Frequently cached data will decrease load times, speed up searching, and more. 
  • App data: This contains important app data. For example, the audio files are temporarily stored in the app data folder when you stream music. 

Of course, app data shouldn’t be confused with user-downloaded files. If you save an image in Chrome, for example, that is not part of app data. 

So you can see why app data and cache are crucial to an app’s functionality. But it also means that it could be the sole cause of your app’s issues — you could (and should) attempt to clear app data and cache before trying to roll an app back if possible. 

How to clear app cache and data on Android

To clear app cache and data, first jump into the Settings menu. Head into the Apps menu (this may be called something other than “Apps,” depending on the device). 

Choose the “See all apps” option, then find the app that’s causing issues. 

Once you open the app info menu, tap the “force stop” button to kill the app’s process completely. A dialog box should pop up asking you to confirm. Choose “OK.”

After that, open the Storage & Cache menu and then use the “clear storage” button to clear both cache and data. Alternatively, you can start by clearing the cache on its own to see if that fixes the issue. 

Try your app again. With any luck, this will resolve any issues you have — just keep in mind you’ll likely have to log in again or otherwise set the app up. If it didn’t work, well, it’s time to move on to other solutions. 

The workarounds aren’t ideal, so plan for this scenario

Rolling an application back to an older version isn’t out of the question — you’ll just have to be willing to make some compromises to make it happen. 

The easy way: Uninstall and reinstall 

The first (and most reliable) option is probably also the most obvious: uninstall the current version and install the version you want. 

If you’re working with the device in person, that’s easy enough to do — just head into the Settings menu, then select Apps. Find the app you want to uninstall, tap on it, and choose “uninstall.” Easy peasy. Just keep in mind that it will remove all data and cache associated with the app in the process. 

Now you’re free to install the version that works best for you. If you have it on hand, you’re good to go. Otherwise, we recommend getting the APK from a reliable and trustworthy source.

When sideloading an app like this, you’ll also need to allow apps to be installed from unknown sources from the app you used to download the APK. In most cases, this will be Chrome (or whatever browser you’re using). If you haven’t enabled this feature yet, the system will prompt you when the installation is blocked. 

The more complicated way: Using hidden Android features to roll an app back

You may have noted earlier that I said an app can’t easily or simply be rolled back — not that it’s impossible. In fact, we recently outlined two ways to roll an app back and retain all of its data, though neither are highly recommended (but technically possible).  

Android is designed to block installations of older apps on top of newer versions, but you can use ADB to “force” an older version of the app to install over the newer version. This allows you to downgrade an app while retaining all of its data — just keep in mind that can often cause unforeseen issues. But it may be worth a shot since you’ll ultimately have to wipe app data either way if it doesn’t work. 

The second method is much newer and actually restores a copy of the app’s data as it was before the update. The biggest issue here is that you have to manually enable the feature via command line when updating the app, otherwise you can’t roll it back. So you’ll have to plan for this ahead of time. 

The full instructions and all details for both methods are available here. Both of these are “desperate measures” if you really don’t want to lose the app’s data — just keep in mind you might end up having to wipe all that data anyway. 

The most complicated way: Build your app to back up cached data in the cloud

While uninstalling and reinstalling the app is the most straightforward method and Android’s roll back options are hit or miss, there are options if you simply can’t lose the cached data. The biggest downside is that this is a preemptive option — your app has to be designed to back up cached data to the cloud before you need it to. 

If you’re working with your own application, that’s a non-issue (assuming you work this in before you need it). If you’re having issues with a new version of a third-party application, however, then there isn’t a great solution on many Android builds — you’re back to one of the other methods, unfortunately. 

How Esper can help

If you’re an Esper customer, we have options that can make your life a little easier when addressing app issues. To start, you won’t need physical access to the devices, nor will you need to walk an end-user through how to do this in most cases. You can do a lot of this remotely from the Esper console. 

The first thing to try is a simple reboot, as mentioned in the intro. Once logged in to the console, click on Devices & Groups, then select the appropriate group. Click the View Details button (the eye), then click the Reboot button under Quick Actions in the Settings tab. This will confirm you want to reboot all devices in that group, then execute the command once you click Yes. 

If that doesn’t do it, you have two more options: clear data or uninstall/reinstall. 

Option #1: Clear data

To clear data, head back into the Device & Groups menu, select the group with the problem device, then choose the device. 

Click the Apps tab, find the problem app, and click the Actions button (three dots). Choose the “Clear” option. 

A new menu will slide out asking if you’re sure you want to clear data. Click the “Clear” button to confirm. And with that, it will clear the data for that app on the device. As noted above, this will clear both data and cache. 

Note: While it’s not possible to clear app data on multiple devices at one time using the console, you can do it through our APIs.

Option #2: Uninstall and reinstall

If that doesn’t work, then it’s time to start over. And fortunately, you can perform this action in bulk directly from the console. Again, jump into Devices & Groups, then choose the View Details button in the device group. 

Click the Apps tab at the top. In the Install/Uninstall menu, choose “Uninstall” in the Select App Action dropdown, then the app and version under the Select App and Select Version (Build) dropdowns. 

Verify that everything is correct, then click the Uninstall button. The process will take a few minutes to complete, after which you can use the same method to reinstall the previous version of the app — just choose “install” instead of “uninstall” in the dropdown. 

Looking for a better way to manage your fleet? This is what we do.

This is just one of the many (many, many) remote options we offer. If you’re looking for a better way to manage fleet devices, you need Esper. Get in touch with us today to set up a demo.