TeamAmaze / TeamAmaze/AmazeFileManager
Permission Denial: opening provider from ProcessRecord requires that you obtain access using `ACTION_OPEN_DOCUMENT` or related APIs
Open
Nobody has claimed this yet.
From-Email
Issue-Bug
- Dominant language
- Kotlin
- Stars
- 6.4k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
Issue explanation (write below this line)
Exception
- App Name: Amaze File Manager
- Package: com.amaze.filemanager
- Version: 3.8.2
- User Action: UI Error
- Request: Application crash
- OS: Linux
OPPO/CPH2239T2/OP4F2F:11/RP1A.200720.011/1660129848351:user/release-keys 11
- 30
- Device: OP4F2F
- Model: CPH2239
- Product: CPH2239T2
Crash log
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.amaze.filemanager/com.amaze.filemanager.ui.activities.texteditor.TextEditorActivity}:
java.lang.SecurityException: Permission Denial: opening provider
com.android.providers.downloads.DownloadStorageProvider from
ProcessRecord{e7f42e 31446:com.amaze.filemanager/u0a292} (pid=31446,
uid=10292) requires that you obtain access using ACTION_OPEN_DOCUMENT or
related APIs
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3763)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3931)
at
android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at
android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at
android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2356)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:264)
at android.app.ActivityThread.main(ActivityThread.java:8315)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)
Caused by: java.lang.SecurityException: Permission Denial: opening provider
com.android.providers.downloads.DownloadStorageProvider from
ProcessRecord{e7f42e 31446:com.amaze.filemanager/u0a292} (pid=31446,
uid=10292) requires that you obtain access using ACTION_OPEN_DOCUMENT or
related APIs
at android.os.Parcel.createExceptionOrNull(Parcel.java:2390)
at android.os.Parcel.createException(Parcel.java:2374)
at android.os.Parcel.readException(Parcel.java:2357)
at android.os.Parcel.readException(Parcel.java:2299)
at
android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:5910)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:7420)
at
android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:3060)
at
android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:2511)
at android.content.ContentResolver.query(ContentResolver.java:1176)
at android.content.ContentResolver.query(ContentResolver.java:1124)
at android.content.ContentResolver.query(ContentResolver.java:1080)
at
com.amaze.filemanager.filesystem.EditableFileAbstraction.<init>(EditableFileAbstraction.java:62)
at
com.amaze.filemanager.ui.activities.texteditor.TextEditorActivity.onCreate(TextEditorActivity.java:140)
at android.app.Activity.performCreate(Activity.java:8151)
at android.app.Activity.performCreate(Activity.java:8135)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3732)
... 11 more
Caused by: android.os.RemoteException: Remote stack trace:
at
com.android.server.am.ActivityManagerService.getContentProviderImpl(ActivityManagerService.java:7761)
at
com.android.server.am.ActivityManagerService.getContentProvider(ActivityManagerService.java:8307)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2480)
at
com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3181)
at
com.android.server.am.OppoActivityManagerService.onTransact(OppoActivityManagerService.java:169)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with EditableFileAbstraction.java:62 and TextEditorActivity.java:140, then trace how the download-provider URI reaches the text editor on Android 11. Reproduce the reported crash with a file from the downloads provider and inspect the Android document-access flow. Done means opening that file in the editor no longer raises the reported SecurityException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100