When using applications under Android, sometimes questions appear: 'Where does the application store the created files?', 'Is it possible to reach them?' and 'Will the files be deleted when the application is uninstalled?' Let's try to see where the application can store its data and what consequences this has for the user.
Internal data storage
The meaning follows directly from the name. Internal storage is always located in the smartphone's memory, regardless of whether it is possible to install a memory card (and even more so, whether it is inserted). This memory area is protected. Located in the / data system partition. By default, all files that are located there are available only to the application that created them. Of course, you can make files available to other applications, but this must be done on purpose. If the application does not open files for external access, it will be possible to access them only by getting root.
The purpose of the storage is clear: internal protected data to which there should be no unregulated access. Problems (from the user's point of view) can be in the following cases:
- Unreasonably large amount of data. I want to move data to a memory card to save internal space for other needs, but the application does not.
- According to the user, the data access regulations should be different, not the one suggested by the application.
Example: Appendix 'Lectures on Russian History'. The app has good content (both in content and sound quality). But it is stored in the internal memory. On budget devices, where this memory is scarce, it becomes difficult to download many lectures in advance, and then, after disconnecting from the Internet, listen to them. The second problem is the actual data access regulations. Even if we limit ourselves to the subject of history, I have audio files obtained from three sources: this application, podcasts and audio versions of videos from youtube. I would like to take and unite forever in their earthly vale under the dominion of the all-powerful Lord of Mordorah all into a single playlist, and listen to it with one audio player. But this cannot be done on a smartphone without root.
External storage of 'personal' data
From the developer's point of view, in addition to the internal data storage, there is also external storage for the personal purposes of the application. It does not necessarily fit on the memory card. It may be the internal memory of the smartphone, but the entire section with such data is publicly available. At the root of the section there is a folder Android / data, and in it there are subfolders with the names of application packages.
The advantages of this approach are obvious: the data is available externally for user purposes. And if it is a memory card, then the capacity may be limited only by your finances (you can already find 400 gigabyte memory cards on sale). The disadvantages are also clear: at any moment any application (of course, having permission to access 'external' data) can take and erase other people's files. Also, the files will be deleted by the system when the application is uninstalled (or when its data is cleared).
Example application: podcast manager BeyondPod (more or less fresh version, earlier files were stored differently). The user has access to downloaded podcasts and can easily delete them (for example, in order to save space) or listen to them in an external player.
Shared external storage
Located at the root of the 'external' partition, at the same level as the 'Android' folder. Designed to store data that is shared between different applications. Usually, in the Google documentation, pictures are given as an example (a photo from a camera is a DCIM folder). The main problem with these files is that they are never automatically deleted. Even if you uninstalled the application.
Example: Telegram messenger. Once you've uninstalled the app, the downloaded files don't disappear anywhere. They continue to lie quietly on the data drive, taking up precious space.
How can you delete files without uninstalling apps
It is important to introduce another classification of application files here. It is valid for internal storage and external storage of personal data. All data is divided into two types: actual data and cache.
Data (data folder) – some files that, according to the logic of Google, are needed for constant work with them. If you completely remove them, then the application will behave in the same way as if it was reinstalled (uninstalled and reinstalled). Partial deletion of files may not lead to any unpleasant consequences. But it is important to understand what specific data you are deleting (for example, it is obvious that downloaded podcast files can be deleted completely freely – this will not affect the performance of the podcast manager).
Cache is temporary data that is formed during the operation of the application and is needed to speed up this work. For example, data that is often needed on the Internet is downloaded and then opened locally instead of downloading (of course, the cache can be updated so as not to show outdated data). You can easily delete the cache of any application, this is a regular operation.
Clearing memory and cache is called from the application settings. The Clear Cache button only clears the cache, while the Clear Data button clears both the cache and application data.
Removing application files from shared external storage can only be done manually. Moreover, even the assessment of which application these files remain from is also done manually.