TeamAmaze / TeamAmaze/AmazeFileManager

`java.lang.SecurityException`: Permission Denial opening provider `androidx.core.content.FileProvider` from `ProcessRecord`

Open
#3,782 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

From-Email Issue-Bug Issue-Easy (good first issue)
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
  • Package: com.amaze.filemanager
  • Version: 3.8.5
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux
    HUAWEI/INE-LX1r/HWINE:9/HUAWEIINE-LX1r/9.1.0.308C185:user/release-keys 9 -
    28
  • Device: HWINE
  • Model: INE-LX1r
  • Product: INE-LX1r
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
androidx.core.content.FileProvider from ProcessRecord{eddd226
14755:com.amaze.filemanager/u0a147} (pid=14755, uid=10147) that is not
exported from UID 1001
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3430)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3614)
at
android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:86)
at
android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at
android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2199)
at android.os.Handler.dispatchMessage(Handler.java:112)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
Caused by: java.lang.SecurityException: Permission Denial: opening provider
androidx.core.content.FileProvider from ProcessRecord{eddd226
14755:com.amaze.filemanager/u0a147} (pid=14755, uid=10147) that is not
exported from UID 1001
at android.os.Parcel.createException(Parcel.java:1953)
at android.os.Parcel.readException(Parcel.java:1921)
at android.os.Parcel.readException(Parcel.java:1871)
at
android.app.IActivityManager$Stub$Proxy.getContentProvider(IActivityManager.java:4159)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:6845)
at
android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2922)
at
android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1879)
at android.content.ContentResolver.query(ContentResolver.java:800)
at android.content.ContentResolver.query(ContentResolver.java:766)
at android.content.ContentResolver.query(ContentResolver.java:717)
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:7458)
at android.app.Activity.performCreate(Activity.java:7448)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1286)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3409)
... 11 more
Caused by: android.os.RemoteException: Remote stack trace:
at
com.android.server.am.ActivityManagerService.getContentProviderImpl(ActivityManagerService.java:13616)
at
com.android.server.am.ActivityManagerService.getContentProvider(ActivityManagerService.java:14111)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:357)
at
com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3654)
at
com.android.server.am.HwActivityManagerService.onTransact(HwActivityManagerService.java:609)



HUAWEI

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with EditableFileAbstraction.java:62 and TextEditorActivity.java:140, where the crash stack shows the provider access during text-editor startup. Reproduce the reported launch failure on Android 9 if possible and trace the FileProvider configuration and access path. Done means the text editor no longer crashes with this SecurityException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
mobile, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.