Introduction </>
Every Android application could save its data in several ways.
Private data is stored on "internal" storage either as files or
database for structured data or
preferences for data represented as key-value pairs.
Application has full control of its private data,
and other applications naturally cannot access them
(unless they have root access or access is provided/exposed by application itself).
Existence of "internal" storage is guarantied to the applications.
Note when the user uninstall application data stored on "internal" storage is removed.
"External" storage is for the data accessible to other applications and the user.
Usually is used to save "shared" files such as photos.
Existence is not guarantied as "external" storage space could be located
at physically removable external devise such as Secure Digital(SD) card.
An Android device may have more then one "external" storage.
Now Android devices separate permanent physical storage space into
separate partitions for "internal" and "external" storage.
And so without removable storage media "external" storage always exists.
Usually "external" storage partitions are mounted in directory /storage.
Path /sdcard is symbolic link to mount point of "external" partition from device permanent physical storage space.
Name of mount point depends for Android version.
Usually it is sdcard0, i.e. absolute path is /storage/sdcard0.
Depending of Android version removable "external" storage is mounted in "sdcard1" or
in NNNN-NNNN, where NNNN-NNNN is serial number of "volume" (storage space).
Some devices use directory /mnt instead /storage.
For backward compatibility device that uses /storage provide additional symbolic link in directory /mnt.
|