How To Access External and internal storage?

I actually want to access the files on android system. I manage to read the files and directories in the external storage of android. My questions are :

  • How can I access the directories and files of the internal storage(Specially videos, pics all of the applications which runs in android).
  • Where are stored the data of each application which installed in internal storage?
  • Is it possible to transfer data which exists in the internal storage (from internal memory to external storage?
  • I read that external storage is world-readable? what does that mean?(if a create an application then this application can access all the files that installed in external storage?)

  • By default, an app cannot access data stored by another app. Permissions are applied to internal storage that make data written by an application not accessible outside of that application (your app cannot read anything written by another app). This can be changed, where an application can specify different permissions for ITS OWN data; basically, an app can allow others to read its data. However, if an app does not specifically set its permissions to allow this, other apps cannot access its data. This is a fundamental principle of the Android security/isolation model and is done at the Linux/kernel level, as each app runs under its own Linux UID and permissions are set within the filesystem only allowing that UID access to the app's directory structure (group and world permissions are set to 0 by default).

    This all goes out the window if you have access to root on the device (rooted phone and your app runs with root permissions), but we should consider that out-of-scope for your question.

    External (SD card) storage is different in that it is considered free-for-all and permissions are not applied there (this is originally due to the filesystem typically used in SD not supporting permissions). Any app can usually read anything written to the SD card by any other app, unless the original app does something to protect it (encrypt, etc).

    This is all explained in great detail in Application Security for the Android Platform, just published by O'Reilly.


    您必须编写FileProvider以使用其他应用程序访问特定于应用程序的文件。

    链接地址: http://www.djcxy.com/p/85134.html

    上一篇: 选择内部存储和外部存储

    下一篇: 如何访问外部和内部存储?