Repository navigation
Setup: Improve SAF access handling on Android 11 and Android 12 after Google Play system update of the Files app - #703
Merged
Merged
Conversation
…date of the `Files` app Google seems to have backported some Android 14 changes with tighter restrictions on access to `Android/data` The previous `EXTRA_INITIAL_URI` argument trick is no longer working. Also see: https://cs.android.com/android/platform/superproject/main/+/main:packages/apps/DocumentsUI/src/com/android/documentsui/picker/ActionHandler.java;l=84;bpv=1;bpt=0;drc=901f1d6044aade190bb943ccc18d26244132648e;dlc=306a2b606a1f01498d2d83a1d8362962f114e6e8 There are now 3 states to this for Android 12 users: * You have the original "Files" app (API-level 31, e.g. `aml_doc_310851020 (310851020)`) that came with Android 12, then you can just grant access as expected * You have the latest "Files" app (API-level 34 or later, e.g. `14-10492947 (340916000)`), then you can't grant access * You have a version in between those two, then you should be able to grant access after this code change In any case, a possible workaround to this is uninstalling the application updates. You can uninstall the update of the `Files` app, then complete the setup in SD Maid. Updating the `Files` app again won't break the granted permission. * Open device settings * Go to "Apps & notifications" or "Application Manager" * Find the `Files` system app * Tap on the three-dot menu, usually on the top right corner * Choose "Uninstall updates" or `adb uninstall com.google.android.documentsui` Closes #639
Files appFiles app
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Google seems to have backported some Android 14 changes with tighter restrictions on access to
Android/dataandAndroid/obbThe previousEXTRA_INITIAL_URIargument trick is no longer working.Also see:
https://cs.android.com/android/platform/superproject/main/+/main:packages/apps/DocumentsUI/src/com/android/documentsui/picker/ActionHandler.java;l=84;bpv=1;bpt=0;drc=901f1d6044aade190bb943ccc18d26244132648e;dlc=306a2b606a1f01498d2d83a1d8362962f114e6e8
There are now 3 states to this for Android 11 and Android 12 users:
aml_doc_310851020 (310851020)) that came with your ROM, then you can just grant access as expected14-10492947 (340916000)), then you can't grant accessUpdates not compiled for API-level 34 still work, if you try some of the older versions.
In any case, a possible workaround to this is uninstalling the application updates. You can uninstall the update of the
Filesapp, then complete the setup in SD Maid. Updating theFilesapp again won't break the granted permission.Filessystem appor
adb uninstall com.google.android.documentsuiI've updated the Setup WIKI with instructions:
https://github.com/d4rken-org/sdmaid-se/wiki/Setup#saf-androiddataobb-access
Closes #639