How and when to clear app cache and data on Android

Mobile device memory is an issue that interests many owners of Android smartphones. The amount of available free memory provided by phone manufacturers has increased significantly in recent years, but the amount of data that users store in wearable gadgets is growing even faster.

In this article we will talk about one of the ways to free up space in the memory of your Android smartphone. Below we will talk about what clearing the cache is and what happens when you click on the Clear data for applications in Android OS .

The drive is 75% full. Transfer data to SD card

Over time, when the amount of information stored on a smartphone increases greatly, the user may encounter the problem of insufficient memory on the phone. The notification indicating that the memory is full may look different. Here is one example:

What does this warning mean? In this case, the system warns that there is less than 25% free space left on the device’s internal memory. By and large, this is not a critical error, the available memory is still available, but you need to keep two things in mind:

  1. Free space on your phone may soon run out, so to prevent this from happening at the most inopportune moment, take care in advance to free up occupied space.
  2. For comfortable work with the OS, it is advisable to keep some amount of internal storage memory free. This will ensure that you maintain a level of performance and smoothness in everyday use.

In the article Memory on Android. All sections of the memory of Android devices , we dwelled in detail on the analysis of all types of Android OS memory. There was also the following line:

Internal phone storage is that part of the smartphone’s memory module that is not occupied by system partitions and is available to the user for storing applications, media content and documents. The part of the memory on which the software is installed is defined as the Data , and the part occupied by user files is defined as User . Often there is no real boundary between these areas, and then the allocation of memory depends only on the needs of the device owner.

If we take this into account within the framework of the current publication, we conclude that the system can notify both about a lack of memory on the internal drive in general, and specifically about a lack of memory in the Data section. The difference is as follows:

  • If a smartphone needs to free up space in the general internal storage, then we can sacrifice either user data (music, photos, videos, documents), or applications and files associated with them.
  • If you need to free up the allocated Data section on your smartphone, then deleting photos or music will not lead to any result. In this case, optimization of the memory occupied by programs and games is required. This is important to understand.

If everything is more or less clear with deleting media files and documents, then we will consider the issue of optimizing the memory occupied by applications in more detail.

Be careful! You perform all manipulations with data on your devices solely at your own peril and risk! Neither the resource administration nor the author of the article are responsible for possible loss of data caused by inaccurate user actions or the specifics of the application.

to contents

What do Android applications consist of?

First of all, it is worth pointing out that each Android application can be divided into three parts according to the type of files used:

  1. Program . This is the application itself, an apk file.
  2. Application data . This is user information that is saved throughout the entire life of a particular program on a smartphone. Data is entered into the program by the user or at his direct request.
  3. Application cache . These are temporarily stored files. Roughly speaking, this is the same user information, with the only difference being that its loss does not affect the performance of the application. The program is able to fill the cache with the necessary data independently during operation.

Now let’s determine where the program, its data and the application cache on Android are stored. If we continue to refer to the above-mentioned article about memory on Android and use the classification of partitions from it, then we can safely say that the program itself, the data of user applications, and their cache are stored in Non-Volatile Memory -> in the Rewritable EEPROM Section -> Internal phone storage (internal storage) -> Data (that is, data). In this case, we are not considering system applications, since they are located in the System section being flashed, and, without root rights, are not available for removal. That is, from the above we conclude that both the program and its data with cache occupy memory in the Data section, which means that clearing any of these components frees up user space and, in fact, partially solves the problem of low memory on an Android device. Let's take a closer look at all the components of Android applications.

to contents

Clearing cache memory on smartphones and tablets of different brands

On devices where the manufacturer's proprietary shell is installed on top of Android, the function of deleting cached data is sometimes implemented non-standardly.

  • To clear the system cache on Samsung Galaxy , use the Wipe Cache Partition option in the Recovery menu. Samsung Galaxy application data is deleted through their properties, as in the instructions for Android without add-ons.
  • To delete cached data from a specific program on Huawei Honor , launch the system settings utility, open the “Applications and notifications” section, and then “Applications”. Find the program you need and go into its properties. Go to the "Memory" section and click "Clear cache".

  • Clearing program cache memory on the Asus ZenFone is done in much the same way as on Honor: go to settings, then to the “Applications and notifications” section and the “Application information” subsection. Tap the line with the name of the desired program. In properties, select "Storage and memory" and click "Clear cache".
  • Removing the system cache on Meizu is done through the “Storage and Backup” - “Junk Cleanup” section. Or using the built-in Security utility.
  • On Lenovo , BQ , Prestigio , Fly , Xiaomi, deleting cached data is carried out in the same way as on pure Android.

And, of course, a device of any make and model can be cleaned and optimized using third-party utilities.

Uninstalling an application on Android

First, we note that the program itself in the Android system is not only an apk file. In addition to it, additional libraries and additional technical* program files may be used. By technical files we mean those resources that are stored outside the executive file, but serve to ensure that the application performs its work. Both the program's executable file and its accompanying files are most often located in the following directory from the root of the file system:

/data/app/

app folder contains the application directory, at the root of which is the apk file itself, and the lib , which contains system libraries, if any. Depending on the program, next to the apk file there may be folders with a different name.

The contents of the program folder in the /data/app/ are stored there throughout the entire operating time from the moment of installation to the moment of uninstalling the application.

That is, when you delete an application from your phone, it is the program folder along the path /data/app/ with all its contents that is erased: both the apk file and the program system files.

to contents

Clear Android app data

Now, regarding the application data. Data is, first and foremost, user information. In general, application data is stored in the following directory:

/sdcard/Android/data/

In a particular case, this may be a slightly different path, which, in particular, corresponds to the general directory, differing only in the display of the directory hierarchy:

/storage/emulated/0/Android/data/

Possible storage locations for Android application data are not limited to this folder. Often, during installation, a program creates its own directory in the root of the memory card: either internal or external. It is in these folders that the program saves information that:

  • user enters;
  • downloads the application itself at the user’s request.

In addition to the above paths, there is one more directory that needs to be mentioned separately. We will talk about the obb , which is located along the path:

/sdcard/Android/obb/

This folder is specifically used to store the so-called game cache. Let's look a little more closely at what it is and what it is used for.

The gaming industry is developing quite quickly. At the same time, the requirements for hardware, including disk space, are also growing. All this is also true for Android OS. Serious games with beautiful graphics and serious gameplay require storing a larger amount of system information. All this has led to the fact that many games have a pronounced cache. But, as in different ways of installing programs, there are several ways to place the game cache in the /Android/obb/ folder :

  1. If the cache size is not very large, then the developer can archive the data, place it directly in the apk file, or simply link the cache download to the download of the game itself. When installing such a game, the cache will automatically unpack into the desired folder . Developers sometimes use this feature as additional protection against hacking, since if you downloaded the game not from the Google Play , but from an alternative source, the game will not find the cache when launched and will refuse to launch.
  2. If the apk file does not contain all the game files, then, by default, the game cache is downloaded via the Internet automatically by the application itself when it is first launched. It should be noted that there is one more reason why it is not very convenient to initially package the game cache into an apk file. The fact is that, often, the cache for different phones will differ depending on the screen resolution, the type of video chip and processor, and sometimes on the smartphone model. And if you download the cache when you first start the game, you won’t have to transfer data to the user’s smartphone that is not suitable for his device.
  3. Everything* that is downloaded by a specific application can be downloaded manually. That is, the game cache can be downloaded not through the game itself, but separately. This is possible if someone downloads a cache that suits you (by screen resolution, type of video accelerator, etc.) and posts it on the network. Then all we have to do is download the archive with the cache and place it in the desired directory : obb or data , depending on the game (in special cases, the cache storage path may differ and is specified additionally).

If you download the game cache separately, we recommend doing the following: first install the game, then launch it and give time for the cache to load from the network to start, and after a few seconds interrupt the download and add the existing cache manually. This way we avoid mistakes in choosing a directory to place the cache.

Now, some may find it strange why we placed information about the cache folder in the chapter on Android data, and not on the cache itself. And here's the thing. In fact, the game cache is so called because it is downloaded by it during installation. This data is cached only for the application itself and from the user's point of view. For the Android operating system, game cache files are application data and are not overwritten when clearing the cache (we will repeat this below). And when do they overwrite?

When you click the Clear data in the Android application manager, all user information for a specific program is deleted, including the game cache (again, in the general case). That is, after clearing the application data, it returns to the same state as it was immediately after installation.

Also, when installing games with a cache, you need to take into account one more nuance: when deleting such a game, you should manually check whether the cache was deleted automatically. If this does not happen, then the cache folder can be deleted manually using any file manager.

to contents

Afterword

There is no "best" or "worst" option when it comes to clearing cache and clearing app data. Both processes have their purpose. Your first step to fixing a problematic app will have to be clearing the cache, as this is the least intrusive method of quickly fixing apps. If this fails, or if you want to free up more storage space, clear your data. Just remember that anything stored or stored in the app, including audio, video, or image files, will also be deleted.

Did our tips help you resolve your application data and cache data issues? If not, let us know in the comments.

«>

Rating
( 1 rating, average 5 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]