EACCESS Permission denied in Android

后端 未结 4 935
被撕碎了的回忆
被撕碎了的回忆 2020-12-06 12:28

While writing file in External SD card I am getting an error EACCESS permission denied. I have set the permission

4条回答
  •  再見小時候
    2020-12-06 12:48

    As I remember Android got a partial multi-storage support since Honeycomb, and the primary storage (the one you get from Environment.getExternalStorageDirectory, usually part of the internal eMMC card) is still protected by the permission WRITE_EXTERNAL_STORAGE, but the secondary storages (like the real removable SD card) are protected by a new permission android.permission.WRITE_MEDIA_STORAGE, and the protection level is signatureOrSystem, see also the discussion in this article.

    If this is the case then it seems impossible for an normal app to write anything to the real sdcard without a platform signature...

提交回复
热议问题