在 Android 上写入内部 SD 卡

发布于 2024-09-16 01:56:59 字数 57 浏览 1 评论 0原文

有没有办法在具有内置闪存、内置 SD 和外置 SD 卡的 Android 设备上访问内置 SD 卡?

Is there any way of accessing the internal SD card on Android devices that have internal flash, internal SD and external SD cards?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

爱本泡沫多脆弱 2024-09-23 01:56:59

在 Android 2.2 及更早版本中,只有一个“外部存储”(Environment.getExternalStorageDirectory())。该点的定义由设备制造商决定。兼容性定义文档 (CDD) 仅要求其至少为 2GB、IIRC。甚至不需要“外部存储”是可移动的。

目前,还没有标准 API 可以访问其他分区或卡。设备制造商可能会记录如何访问这些内容 - 您必须查看他们各自的开发人员网站上是否有任何内容。

请记住,在其中一些设备上,其他分区或卡可能无法从常规 SDK 应用程序中读取或写入。

In Android 2.2 and previous, there is only one "external storage" (Environment.getExternalStorageDirectory()). The definition of where this points is up to the device manufacturer. The Compatibility Definition Document (CDD) merely mandates that it be at least 2GB, IIRC. It is not even required for "external storage" to be removable.

At this time, there are no standard APIs to get to other partitions or cards. A device manufacturer might document how to access these -- you would have to see if they have anything on their respective developer sites.

Bear in mind that on some of these devices, other partitions or cards may not be readable or writable from regular SDK applications.

紫南 2024-09-23 01:56:59

您的存储卡/SD 卡不存在问题。默认手机设置中有启用非写入设置。

  • 首先,导航到/system/etc/permissions/platform.xml
  • 找到位置后,进行编码:

    <权限名称=“android.permission.WRITE_EXTERNAL_STORAGE”>
        <组 gid="sdcard_r"/>
        <组 gid="sdcard_rw"/>
        <组 gid="media_rw"/>
     
    

    并在编码的另一部分进行更改:

    <权限名称=“android.permission.WRITE_MEDIA_STORAGE”>
        <组 gid="sdcard_rw"/>
        <组 gid="media_rw"/>
    
    

Problem is not there in your memory card/sd card. There is non-writing setting enable in default mobile setting.

  • First, navigate to /system/etc/permissions/platform.xml
  • After the location been located, make the coding as:

    <permission name="android.permission.WRITE_EXTERNAL_STORAGE">
        <group gid="sdcard_r"/>
        <group gid="sdcard_rw"/>
        <group gid="media_rw"/>
    </permission> 
    

    and on the other part of the coding make changes as:

    <permission name="android.permission.WRITE_MEDIA_STORAGE">
        <group gid="sdcard_rw"/>
        <group gid="media_rw"/>
    </permission>
    
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文