How to unpack cache on Xiaomi: 3 proven methods (TWRP, ADB, manual method)

Cache unpacking on Xiaomi, Redmi or POCO smartphones can be necessary in several cases: to free up space in memory, fix errors after updating MIUI, or before installing custom firmware. Cache are temporary files that the system and applications create to speed up work, but over time they can take up gigabytes of space and even cause crashes. For example, after updating through OTA, sometimes there are undeleted files in the /cache folder that interfere with the correct operation of the device.

In this article, we will analyze three main methods of unpacking cache: through custom recaverie TWRP (The most reliable way, with the help of ADB-commands (for advanced users) and manual cleaning through the file manager. Each method has its own nuances, for example, for the purpose of TWRP You will need an unlocked boot loader and ADB If you've never worked with these tools, start with the manual method -- it's the safest, but it's the least efficient.

Before you start, make sure your device has enough battery power (at least 50%) and important data is backed up.On some Xiaomi models (e.g. Xiaomi) 12T Or the Redmi Note 11 Pro.+) purification TWRP may cause discharge DRM-keys that will affect the quality of photos in Ultra mode HDR. If you are not sure about your actions, skip the methods from the recavery and use the standard system settings.

1.What is Xiaomi Cache and Why to Unpack It

Cache on Android devices is temporary data that is created by the system and applications to speed up re-operations. For example, when you open Instagram, the app caches thumbnails of photos so that they load faster the next time you run them, but over time these files accumulate and can take anywhere from 500 MB to 5-10 GB, depending on the intensity of your smartphone use.

On Xiaomi smartphones, the cache is divided into three types:

  • πŸ“± System cache - files MIUI, Google's cores and services. Stored in a folder. /cache and /system/cache.
  • πŸ“¦ Application cache – temporary data of each installed application (folder) /data/data/packet/cache).
  • πŸ”„ Dalvik cache – optimized files for Android virtual machine (/data/dalvik-cache). It is only cleaned through the river.

Unpacking (or cleaning) of the cache may be required in the following cases:

  • ⚑ The smartphone began to slow down, applications are long open or fly out.
  • πŸ“‰ There is no memory, even though you have deleted all unnecessary files.
  • πŸ”„ After updating MIUI through OTA Errors have occurred (e.g. cyclical reboot).
  • πŸ› οΈ Before installing custom firmware (e.g. Pixel Experience or LineageOS).

⚠️ Warning: Do not confuse cache cleaning with factory resetting.The first procedure only deletes temporary files, and the second - all user data, including photos and contacts.

If your goal is to just free up space, start by clearing the app cache through settings. Solving system errors (like after a failed update) will require cleaning /cache through TWRP or ADB.

2. Method 1: Unpacking cache via TWRP (for advanced users)

The TeamWin Recovery Project (TWRP) method is the most effective method, as it allows you to clear all cache partitions, including Dalvik and ART. However, it requires an unlocked bootloader and a customized backup installed. If you don't already have TWRP, follow the installation instructions first.

Step-by-step:

  1. Turn off your smartphone and press the button combination to enter the Recovery: For most Xiaomi/Redmi/POCO models: Power + Volume up. For POCO F1 and some others: Power + Volume down.

TWRP

Wipe

Advanced Wipe

  • Dalvik / ART Cache
  • Cache
  • System (only if you need to re-flash!)
  • Swipe your finger across the screen to confirm (Swipe to Wipe).
  • After completion, press Reboot System.

⚠️ Note: Removing files from /system/cache If you don't have a superuser license, you can crash your system.

After manual cleaning, restart the device. The first boot may take longer as the system recovers the necessary files.

πŸ“Š What method of cleaning the cache you use more often?
Through MIUI settings
Through TWRP
Through ADB
File Manager with root
I'm not clearing the cache.

5. Frequent errors and their solutions

When cleaning the cache on Xiaomi, users often face problems, and let’s look at the most common ones and how to fix them.

Mistake.Reason.Decision
Smartphone does not boot after cleaning the cache through TWRPCritical files deleted from /system or process interruptedReflash the device via Fastboot or restore the backup to TWRP
ADB does not see the deviceDrivers not installed or debugging over USB is disabledReinstall drivers, check the developer’s settings, try another cable
After cleaning the cache, the applications fly outImportant Application Data (not just cache) deletedReinstall problematic apps or reset settings
There's not enough space, though the cache is clearedCash takes up little space, the bulk of the garbage in /dataUse Storage Analyzer to search for large files or reset

If the smartphone starts to warm up or discharge quickly after cleaning the cache, it may be due to the fact that the system restores deleted files.

What if photos are missing after cleaning the cache?
If you cleared the cache through Settings β†’ Memory, photos should not be affected - the Gallery cache does not contain the pictures themselves, only thumbnails. /DCIM/.thumbnails, You have to re-restore the thumbnails (they will be automatically generated the next time you open the gallery). /DCIM β€” They may have been moved to Recently Deleted (Google Photos) or to the SD-map.

6.How to avoid cache accumulation in the future

To ensure that the cache does not take up gigabytes of memory, follow these recommendations:

  • πŸ”„ Clean the app cache regularly through Settings β†’ Memory (sufficient 1 time per month).
  • πŸ“΅ Limit the background activity of applications in Settings β†’ Battery β†’ Energy saving regime.
  • 🚫 Remove or freeze unnecessary system applications (e.g. Mi Video, Mi Music) that actively cache data.
  • πŸ“± Use lightweight alternatives to heavy apps (like Facebook Lite instead of the main Facebook).

You can also set up automatic cache cleanup with applications like SD Maid or CCleaner, but be careful: some SEOs delete not only cache, but also useful data.

On devices with MIUI 14 and later, there is a built-in Smart Cleanup feature that automatically deletes unnecessary files.

  1. Go to Settings. β†’ Memory.
  2. Turn on the Auto Clean option.
  3. Set up a schedule (e.g., clean up once a week).

πŸ’‘

Cleaning the cache is a temporary solution. If your smartphone is slowing down due to memory shortage, consider transferring data to the computer. SD-map or reset to factory settings.

7. Unpacking the cache on the blocked loader

If your Xiaomi bootloader is blocked, the cache cleanup options are limited. TWRP or ADB-teams, but there are workarounds:

Method 1: Cleaning with Safe Mode

  1. Press the Power button and hold your finger on the Turn off option.
  2. You will be asked to go to Safe Mode, confirm.
  3. In Safe Mode, remove the cache of problematic applications through Settings.

Method 2: Use of MIUI Cleaner

MIUI has a built-in garbage cleaning tool:

  1. Open the Security app (shield icon).
  2. Go to the Cleanup. β†’ Deep cleaning.
  3. Select the Cash apps and click Clear.

Method 3: Fastboot Reset (extreme case)

If the smartphone does not boot due to a crowded cache, you can reset via Fastboot without unlocking the bootloader:

fastboot erase cache


fastboot reboot

This command will only clear the cache partition without affecting user data.

⚠️ Note: On Xiaomi models with Dynamic Partition (e.g. Xiaomi) 13 or Redmi Note 12) The fastboot erase cache may not work, but the fastboot reset will help. -w, But he'll delete all the data.

FAQ: Frequent questions about unpacking cache on Xiaomi

πŸ”Ή Can I clear the cache without losing data?
Yes, cache cleaning (via Settings, TWRP or ADB) does not delete personal files (photos, videos, contacts), but if you do a full reset (Wipe Data in TWRP), all data will be erased.
πŸ”Ή Why after cleaning the cache, the smartphone became slower?
This is a temporary phenomenon: after cleaning the cache, the system and applications are forced to recreate temporary files, which requires additional resources, and after 1-2 days, the device will normalize.
πŸ”Ή How to Clean Google Play Services Cache Without Root?
Go to Settings β†’ Applications β†’ App Management, search Google Play Services and click Clear Cache. If the button is inactive, turn off the app for 10 seconds and turn it back on.
πŸ”Ή Can you clean the cache on Xiaomi through a computer without ADB?
Yes, connect your smartphone to your PC and use a file manager (e.g., Total Commander with Android plugin) and you can delete the app cache in /Android/data/packet name/cache, but the system cache will remain intact.
πŸ”Ή What happens if you delete the folder? /cache fully?
The system will restore it the next time it boots, but some settings (like Google Play data) may reset, but it won’t affect performance, but there may be minor disruptions to services.