调整Android 12以访问普通应用程序的SD卡文件
我最近使用Android 12购买了三星Galaxy S20 FE,我很快注意到许多应用程序无法访问SD卡上的文件。例如,我曾经从不同的浏览器或音乐播放器访问本地HTML/MP3文件。在我的新系统上,这些应用程序可以看到文件夹并浏览它们,但无法打开甚至列出任何常规文件。有一些例外,例如总指挥官或AIMP。
据我了解,这是Google的政策更改,出现在Android 11(API/SDK 30)上: https://www.xda-developers.com/android-11-allroid-11-all-files-access-access-permission-form/
我尝试了一些我可以找到的解决方案例如,在线:pm授予com.xxx.yyy android.permission.manage_external_storage
appops set -uid com.xxx.yyy android:legacy_storage允许
这是不起作用的,因为可能,应用程序(我尝试使用Opera)在安装过程中未要求此许可。同样,我可以找到的大多数解决方案都与正在开发的应用程序有关,而不是从商店安装的应用程序。例如: android 11范围存储
权限但是如果我拥有MP3或其他媒体的GB,那是非常愚蠢的。这也非常乏味,可以进入URL栏中的完整路径,因为无法轻松导航或打开此文件夹。
因此,我正在尝试找到一种默认情况下所有应用程序启用许可的方法,或者至少找到一种通过GUI来完成的简单方法。例如,我尝试使用或多或少的随机尝试来调整/etc/permissions/platforms.xml
,因为我找不到有关此文件语法的任何文档,但没有任何作用。
请注意,我的手机已扎根。
I recently bought a Samsung Galaxy S20 FE with Android 12, and I quickly noticed that many applications were unable to access files on the SD card. For instance, I used to access local HTML/MP3 files from different browsers or music players. On my new system, these applications can see folders and navigate through them, but can not open or even list any regular file. There is a few exceptions, e.g Total Commander or AIMP.
From what I understood, this is a policy change from Google which appeared on Android 11 (API/SDK 30): https://www.xda-developers.com/android-11-all-files-access-permission-form/
I tried a few solutions I could find online, for instance:pm grant com.XXX.YYY android.permission.MANAGE_EXTERNAL_STORAGE
appops set --uid com.XXX.YYY android:legacy_storage allow
This is not working because, probably, the application (i tried with Opera) is not requesting this permission during the installation. Also, most of the solutions I could find are related to apps under development, not apps installed from the store. E.g. : Android 11 Scoped storage permissions
A workaround I could find is to move all the files in /storage/SD_CARD_ID/Android/data/com.XXX.YYY/files
, however, this means that I have to copy these files each time I install a new app and for each app I use, which is quite stupid if I have GB's of MP3 or other media. This is also quite tedious to enter the full path in the URL bar as it is not possible to navigate to or open this folder easily.
I am therefore trying to find a way to enable the permission by default for all apps, or at least find a simple way to do it via the GUI. For instance, I tried to tweak /etc/permissions/platforms.xml
with some more or less random tries as I could not find any documentation about the syntax of this file, but nothing worked.
Note that my phone is rooted.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论