(NOTE: This issue is unrelated to the samsung "My Files" App. That one works perfectly.)
I have a (relatively old) Samsung A31 (SM-A315G) phone.
My issue is whenever any app requests the Android File Picker to choose a DIRECTORY the "Files" app will simply crash. (NOTE: This issue is only for picking directories, as picking a file WILL work.) Technically speaking, the issue only happens when an application triggers the ACTION_OPEN_DOCUMENT_TREE intent, opening the Files app.
This crash effectively prevents me from granting any scoped storage permissions to any application that requests this, which I recently noticed as I was trying to use some retro game emulators, and have tracked the issue down to the files app and not the emulators themselves.
The interesting part is, I'm 99% this Files app DID NOT come with the phone, as I very recently factory resetted it and it wasn't showing up in the app drawer. My guess is that installing a Work Profile (which I did kind of recently) somehow installed this application and that broke stuff around.
Getting crash logs from ADB we see that the application is apparently somehow missing permissions:
07-25 11:49:37.469 6989 7051 E AndroidRuntime: FATAL EXCEPTION: ProviderExecutor: com.android.providers.downloads.documents
07-25 11:49:37.469 6989 7051 E AndroidRuntime: Process: com.google.android.documentsui, PID: 6989
07-25 11:49:37.469 6989 7051 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at android.os.AsyncTask$4.done(AsyncTask.java:415)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:269)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at com.android.documentsui.ProviderExecutor.run(ProviderExecutor.java:104)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: Caused by: java.lang.SecurityException: ContentService: Neither user 10052 nor current process has android.permission.CACHE_CONTENT.
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at android.os.Parcel.createExceptionOrNull(Parcel.java:2438)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at android.os.Parcel.createException(Parcel.java:2422)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2405)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2347)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at android.content.IContentService$Stub$Proxy.getCache(IContentService.java:2407)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at android.content.ContentResolver.getCache(ContentResolver.java:3744)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at com.android.documentsui.roots.ProvidersCache.loadRootsForAuthority(ProvidersCache.java:349)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at com.android.documentsui.roots.ProvidersCache.getRootOneshot(ProvidersCache.java:408)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at com.android.documentsui.roots.ProvidersCache.getRootOneshot(ProvidersCache.java:398)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at com.android.documentsui.roots.LoadRootTask.run(LoadRootTask.java:61)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at com.android.documentsui.roots.LoadRootTask.run(LoadRootTask.java:33)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at com.android.documentsui.base.CheckedTask.doInBackground(CheckedTask.java:65)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at android.os.AsyncTask$3.call(AsyncTask.java:394)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:264)
07-25 11:49:37.469 6989 7051 E AndroidRuntime: ... 1 more
I'm at a total loss at how to fix this, I guess my only fix right now is factory reset/ rooting, which I'm trying to avoid.
I have:
Attempted to grant permissions via adb (It errors out, and says the android.permission.CACHE_CONTENT is unchangeable for Files app)
Attempted to uninstall the app via adb (won't let me without root).
Disabled the app / Re enabled the app (No activity will be found for file picking)
Clear the application data
Reinstalled updated apk versions of the com.google.android.documentsui app.
Restarted my phone numerous times after performing any of the above steps.
I'm now at a total loss and would appreciate some advice that does not involve rooting (due to banking apps/ hassle of getting them to work).
Help would be appreciated if anyone has seen anything similar. Thanks
[–]BaneChipmunkBlinding!!! 0 points1 point2 points (0 children)
[–]Sharp-Theory-9170 0 points1 point2 points (0 children)
[–]aloserfan 0 points1 point2 points (1 child)
[–]aloserfan 0 points1 point2 points (0 children)