Android 12 will automatically hibernate unused apps to free up space

Android 12 will automatically hibernate unused apps to free up space

Although Google doesn’t release the source code for new Android versions before the stable release for Pixel phones is ready, we seldom get a glimpse at some upcoming features through code changes submitted to the AOSP Gerrit. One of the features we’ve been expecting to land in the upcoming Android 12 release is app hibernation, a feature that will free up storage space by deleting temporary files from unused apps. While this feature hasn’t made an appearance in either of the two publicly available Developer Preview, we can confirm code for the feature is present in the leaked build that we recently obtained.

An APK teardown can often predict features that may arrive in a future update of an application, but it is possible that any of the features we mention here may not make it in a future release. This is because these features are currently unimplemented in the live build and may be pulled at any time by the developers in a future build.

With the release of Android 11 Developer Preview 3, Google added a new “auto revoke permissions” feature that revokes an app’s permission if the app hasn’t been used for a couple of months. Following the stable release of Android 11, Google shared more details about the feature, including a screenshot that shows a notification informing the user when an app’s permissions have been revoked and a screenshot that shows an “unused apps” Settings page with a list of apps that have had their permissions automatically revoked.

In Android 12, Google seems to be expanding the “unused apps” concept with the new app hibernation feature in tow. In addition to automatically revoking permissions for unused apps, Android 12 will also clear up temporary files to free up storage space.

We activated a new “Unused apps” section on the “App info” page for every application, and it contains a new “remove permissions and free up space” toggle. In comparison, Android 11’s “auto revoke permissions” toggle (later renamed to “remove permissions if app isn’t used”) can be found under the “App permissions” subpage of an app’s “App Info” page. This change in location makes sense since the new toggle deals with both permissions and storage rather than just permissions.

After we manually hibernated a few apps, the “unused apps” page appeared under Settings > Apps. This page shows apps that haven’t been opened in a few months, and its description states that permissions are revoked, notifications are stopped, and temporary files are removed if an app hasn’t been used for a few months.

According to code changes we spotted earlier this year, the app hibernation feature will clear the cache and/or delete compilation artifacts in order to free up storage space. Neither of these actions will free up a ton of space, but this is dependent on exactly what app is being hibernated and how many/what kind of cached files have been stored. Users who have lower-end devices with less storage will see more of a benefit, but all users will benefit from unused apps having their permissions automatically revoked.

Although the build we obtained is newer than Developer Preview 2, we don’t know if the app hibernation feature will make a public appearance in DP3 or Beta 1. However, once it’s available, its command-line interface can be accessed through the “cmd app_hibernation” command.

Thanks to PNF Software for providing us a license to use JEB Decompiler, a professional-grade reverse engineering tool for Android applications.

About author

Mishaal Rahman
Mishaal Rahman

I am the Editor-in-chief of XDA. In addition to breaking news on the Android OS and mobile devices, I manage all editorial and reviews content on the Portal. Tips/media inquiries: [email protected]