在 Android 6.0(API 级别 23)中,应用程序如何在没有 root 的情况下访问 USB OTG 存储上的文件?

How app can access files on USB OTG storages in Android 6.0 (API level 23) without root?

Android 6.0 开发者预览版(API 级别 23)可以原生安装外部可移动 USB OTG 存储,开箱即用,无需任何其他应用程序(有关更多信息,请参阅:https://www.androidpolice.com/2015/05/28/android-m-feature-spotlight-external-storage-can-be-adopted-as-true-internal-storage-or-accessed-normally-with-no-additional-apps/).

当用户连接 USB OTG 存储时,它会显示在系统存储菜单中,并且可以通过内置文件管理器访问。用户可以使用新的内置文件管理器访问 USB OTG 外部存储上的所有文件,无需 root 权限。

当我将我的 USB OTG 存储连接到我的 Android 设备时,它安装在 /storage/A03E-1DF5/mnt/media_rw/A03E-1DF5,但访问此文件夹需要 root 权限。

我正在开发 Android 媒体播放器应用。

是否可以以及如何在我的应用程序中访问 Android 6.0 上的 USB OTG 存储上的文件,就像没有根权限的内置文件管理器一样?

P.S。我已经在我的应用程序中使用了 checkSelfPermissionrequestPermissions 函数,并且我的应用程序已经具有 android.permission.READ_EXTERNAL_STORAGEandroid.permission.WRITE_EXTERNAL_STORAGE(有关更多信息,请参阅:https://www.androidpolice.com/2015/07/15/android-m-feature-spotlight-apps-now-need-your-permission-to-read-and-write-to-external-storage/),但看起来像这些权限只影响内部存储 (MicroSD),而对于 USB OTG 则没有这样的细化权限。

自 Android 6,根据 USB Media Support documentation, the Storage Access Framework 似乎是唯一可用的机制:

In Android 6.0, any device that is not adopted is considered portable. […] Third-party apps must go through the Storage Access Framework to interact with files on portable storage; direct access is explicitly blocked for privacy and security reasons.