I've been looking through Android documentation over years and I'm failing to understand what Google thinks following terms should currently mean. Does anybody know if following interpretation is correct?
Internal Storage traditionally refers to device internal flash memory that cannot be removed and app always has read/write access to this area without any special permissions. There's no support for an app to share the contents of Internal Storage with other apps or for user to download the contents of Internal Storage e.g. via MTP. (It's still possible to download these files without root via adb backup
and uncompressing the backup file. However, this cannot be done standalone on the device.)
External Storage refers to storage area shared by all apps. Usually the default camera storage folder is placed on this area. The actual backend may be internal non-removable flash chips on the motherboard or part or all of the removable MicroSD card depending on Android version and device manufacturer config. Modern Android requires apps to request permission to read or write this area. Android 8.0 or greater do not officialy support using whole MicroSD card as External Storage. Traditionally this is the storage area that is published over MTP but to make things more complicated some devices may call this "Internal storage" when viewed over MTP and Removable Storage will be called "SD Card" instead.
Removable Storage refers to storage area shared by all apps. This is different from External Storage by requiring MediaStore API to be used in modern Android (version 8.0 or higher?). Apps should be prepared to lose access to these files at any time due MicroSD card being unmounted or permissions revoked.
Adoptable Storage is a broad term where Android allows using MicroSD card for extending the storage space on the device. In practice, this changes the implementation of above to use the adopted MicroSD card for storing the data in Internal Storage and External Storage. Some people believe that the only way to stop using any MicroSD card as Adoptable Storage is to do factory reset for the device. In my experience it's possible to move apps & data from Adotable Storage to normal locations and then "Forget" the MicroSD card used as Adoptable Storage. Obviously this is not going to fly unless the actually available device flash storage is able to hold all the data without the space provided by MicroSD card.
See also:
- https://commonsware.com/blog/2019/10/11/storage-situation-removable-storage.html
- https://commonsware.com/blog/2019/10/06/storage-situation-internal-storage.html
- https://commonsware.com/blog/2019/10/08/storage-situation-external-storage.html
- https://source.android.com/devices/storage/adoptable
- https://commonsware.com/blog/2019/06/07/death-external-storage-end-saga.html
- What are the differences among Internal storage, external storage, sd card and removable storage?
- Android - Internal Storage vs External Storage when App installed on SD Card
- Scoped Storage: https://youtu.be/UnJ3amzJM94
Open questions (assuming above interpretation):
- Is External Storage going to be totally removed (Android 10 or 11)?
- Can app developers assume anything about the actual backend for directory returned by
getExternalFilesDir()
? - Can app developers assume anything about the performance of Internal Storage? If I've understood correctly, the Internal Storage viewed by the app may actually be backed by very slow MicroSD Card.
- What is the recommended way to save files that are logically documents which should be available to all apps? (Think equivalent of "My Documents" in Windows.) Let's assume that user thinks these as real documents and does NOT expect them to vanish if the app used to create those files is uninstalled.
- Do the app developers have to use Storage Access Framework for everything?
- What is the plan to ever get all apps to follow the new standard?
- How long is this plan going to last? If I've understood correctly, the rules have been changed this far in Android 4.4, 5.5, 8.0 and 10.0.
Update: somebody seems to have voted to close this because he or she considers the correct answer to be opinion based. I believe that the above question can be answered by references to publicly available documentation or source code. The point is that locating such sources is hard and this question is about locating those sources.
MediaStore
. Otherwise, use the Storage Access Framework.