Android 11 requires apps to restart when you get permission to install APKs, but you probably won’t notice


New Android releases always bring exciting new features to the table, but every time a favorite feature is reworked or removed. That is no different for Android 11, which made it more cumbersome to give apps permission to install APKs, requiring a restart of the application in question until at least Developer Preview 4. While that requirement is still present on more recent builds, the situation is now somewhat improved: if apps are programmed correctly, they will restart the latest activity, making the experience as smooth as possible.

On Android 10 and below, the process was as simple as it could be: If you want to install an APK from a browser or other app like our own APKMirror installer, you would be asked to give the installation permission. Once you have turned the switch and hit the back button or steering wheel, you will be taken directly back to where you were before, with a dialog box asking if you want to install the APK you have previously selected. As you can see in the screenshots below, the app you just gave permission to stay in the view and waits for you where you left off before sending you to the dialog.

The installation process on Android 10 takes you directly back to where you were before; no app restart required.

This behavior has changed on Android 11 to at least Developer Preview 4. When dissatisfied testers report on Google’s tracker from Google, the installation dialog still appeared after granting permission, but the app itself was gone – you would have your launcher in the background. When you reopened the application, you would notice that it was completely reloaded, with potentially lost input as well as other data that still needed to be cached because it was killed by the system.

This reboot requirement still exists in newer Android 11 builds, but now you will no longer be thrown to the launcher. Instead, apps recreate the latest activity behind the install dialog. At least you can see in your browser that the webpage you are currently browsing has been reloaded in the background, but once you hit the install button, you can immediately go back to what you did.

Behavior on Android 11: Remember the disappearing app, throw the user back to the launcher instead.

Googlers were initially rather deaf on the tracker of the issue, only stating that “this actually works as intended.” Only after comments continued to dig, expressing how this could break apps that do not expect to be forced to stop in the middle of an operation, did Google provide further comments, making it clear that the change is related to the new file management of Scoped Storage:

The way the file system and storage mounts in Android R are set up has changed significantly. If an app starts without this permission, it will get a view of the file system that does not allow writing for certain directories (eg Android / obb). Once the app has been granted this permission, that view is no longer accurate, and needs to be updated to a view that allows the app to write to specific folders. Due to the configuration of the file system in R, it is not possible to display this view. As mentioned in comment # 16, we evaluate internally. I’m just giving extra details why this does not work as it did on Q.

Although Scoped Storage will benefit from security and privacy, the new system will apparently lead to more important changes than expected. While the fix does not prevent apps from restarting, it does make them as behavioral as possible. It’s a compromise, but with the new behavior, most people will probably not even notice the change in their daily use, and even if you do, once permission is granted, you will not experience a new one.

New behavior

Updated with Android 11 changes that automatically restart the app that needs to be restarted to allow the APK installation.