bug: After grant "install unknown apps" permission, patching starts again due to an issue of Android 11 #2138
Labels
Bug report
Something isn't working
ReVanced Manager Compose
Regarding the Compose rewrite of ReVanced Manager
Milestone
Bug description
After patching is complete, if you press the "Install" button and allow the "Install unknown apps" permission, the patching will start again.
screen-20240813-175259-compressed.mp4
This problem occurs only on Android 11.
Android 11 has a issue that when user grant the "Install unknown apps" permission, the app will be force stopped, or the last Activity will be recreated.
Reference:
https://issuetracker.google.com/issues/154157387
https://issuetracker.google.com/issues/168293637
https://www.androidpolice.com/2020/08/24/android-11-install-unknown-apps-more-cumbersome/
https://mobilesyrup.com/2020/06/03/android-11-change-apps-force-quite-install-apk/
This does not occur on Android 10 or earlier and Android 12 or later.
(This is entirely an issue with Android 11 itself, and VendettaManager also have this issue that patching starts again, by the way.)
Possible solution
Ask the permission when the first launch, only on Android 11.
(Like the Flutter Manager asks the install apps permission on the first launch)
Because the docs says that apps should request special permissions in-context when the user requests a specific action that requires the permission.
https://developer.android.com/training/permissions/requesting-special#in-context
For other versions of Android, you can continue to request the permission on the exact timing (when user pressed the "Install" button).
Version of ReVanced Manager and version & name of app you are patching
ReVanced Manager Compose, compose-dev branch e992a99
Installation method
None
ReVanced Manager logs
Patch logs
No response
Acknowledgements
The text was updated successfully, but these errors were encountered: