How to completely clear the cache on Xiaomi Mi 8: from system to Dalvik

The Xiaomi Mi 8 is still a popular smartphone years later, but over time, its performance may decline due to overcrowded cache. clogged app cache, Dalvik cache and MIUI junk files slow down the system, cause lags and overheating. In this article, 5 proven methods of cleaning the cache on the Mi 8 (including hidden methods through recovery and ADB), which will return the smartphone to performance without resetting to factory settings.

We’ll not only break down standard cleaning through settings, but also advanced techniques for power users, such as how to remove the cache of the NFC module firmware and the Adreno 630 graphics accelerator, which are often ignored in typical guides. All instructions are relevant for the Mi 8 based on MIUI 12/14 and Android 10/11 (including custom firmwares like Pixel Experience or LineageOS).

1. Basic cache cleanup via MIUI settings

The easiest way is to use the built-in MIUI tools. It is suitable for beginners and does not require superuser rights (root), however, only clears the user cache of applications without affecting the system partitions.

How to do this:

  • πŸ“± Open the Settings. β†’ Annexes β†’ Application management.
  • πŸ” In the upper right corner, click on three dots and select "Sort by size" - so you will see the most "voracious" programs.
  • 🧹 Tap on the app (for example, Facebook or TikTok) β†’ "Warehouse" β†’ "Clear the cache".
  • πŸ”„ For mass cleaning, use the settings β†’ Memory. β†’ Cleaning (broom sign in upper right corner).

⚠️ Warning: Don’t confuse β€œClear Cache” and β€œClean Data”!The second action will delete all application settings (including logins and saves), whereas the cache is temporary files that can be safely erased.

πŸ’‘

If the app is slower after cleaning the cache, that's OK, and the cache is used to speed up the boot, and the system will restore it automatically the next time the program starts.

2. Cleaning Dalvik cache and ART (for power users)

Dalvik-cash (or ART-cache in newer versions of Android are optimized virtual machine files that speed up the launch of applications, they become fragmented over time and can slow down the system.

Instructions for Mi 8:

  1. Turn off your smartphone.
  2. Press the Power button + Volume up to enter Recovery Mode (the Android robot with a red exclamation point will appear on the screen).
  3. From the Recavery menu (use volume buttons for navigation) select: Advanced β†’ Wipe Dalvik/ART Cache
  4. Confirm the action and restart the device (Reboot System).

The first boot after this procedure will take 3-5 minutes, which is normal, because the system recovers the cache again, the effect is: reduced lags with multitasking and smoother animation of the interface.

What's a Dalvik cache?
These are temporary files created by the Android virtual machine to speed up Java code execution. They are stored in the /data/dalvik-cache section and can take up to 1-2 GB. They are useful for cleaning after a firmware update or frequent application crashes.

3. Complete cleaning of /cache partition cache

Section /cache It contains temporary update files, log files and recovery data, and its cleaning won’t delete user data, but it can solve problems with β€œhanging” on the logo. MI or errors in installation OTA-update.

Cleaning methods:

  • πŸ”§ Through Recovery: Wipe β†’ Wipe Cache Partition
  • πŸ’» Through ADB (required USB Debugging): adb shell su rm -rf /cache/* reboot

⚠️ Note: If you are using a custom recavator (TWRP Do not confuse Wipe Cache with Wipe Data, the latter will erase all your files!

πŸ“Š How often do you clear your Xiaomi cache?
Once a week.
Once a month
Only when it's slowing down.
Never cleaned.

4. Clearing the cache of modules (NFC, GPS, camera)

Many people forget that hardware modules (such as NFC, GPS or camera) also accumulate cache, and this is especially true on the Mi 8 because of problems with the NFC module (NXP PN80T chip), which can "glut" after long use.

How to clean:

ModuleClearanceThe effect
NFCSettings β†’ Connected devices β†’ NFC β†’ ResetCorrects payment and reading errors
GPSSettings β†’ Location β†’ Accuracy β†’ A-GPS data resetImproves the speed of satellite search
Camera.Clear the Camera application data in Settings β†’ ApplicationsRemoves artifacts and photo saving errors
Graphics (Adreno 630)Delete /data/data/com.qualcomm.qti.gpu.debugapp via Root ExplorerSolves problems with lags in games

β˜‘οΈ Preparation for cleaning of modules

Done: 0 / 4

5. Automatic cleaning with MIUI Optimizer

MIUI has an inbuilt optimization tool that can clear the cache in the background, but by default it doesn't work well.

Algorithm of action:

  1. Go to Settings β†’ About phone and tap on the β€œMIUI version” 7 times to activate the Developer Mode.
  2. Return to Settings β†’ More β†’ For Developers and Enable: MIUI Optimization β†’ Aggressive Memory Cleanup
  3. Activate β€œCache Cleanup When Screen Lock” in Battery and Performance.

⚠️ Attention: Aggressive cleaning may close the background processes (for example, music players or instant messengers).If you notice that applications are often restarted, disable this option.

6. Advanced cleaning through ADB (no root)

If standard methods do not help, you can use them. ADB (Android Debug Bridge for deep cleaning. It doesn't require superuser rights, but it needs enabled. USB-debug.

Step-by-step:

  1. Install Platform Tools on your PC.
  2. Connect Mi 8 to USB and enter Adb devices (should display your device).
  3. Follow the commands in turn: adb shell pm trim-caches 1G # Clears the cache of all adb shell applications cmd package bg-dexopt-job # Optimizes the background processes of adb shell sync # Synchronizes the file system

πŸ’‘

The 1G trim-caches command removes cache that exceeds 1GB, but does not touch critical files.

7.When cleaning the cache doesn't help: alternative solutions

If the Mi 8 continues to slow down after all the manipulations, the problem may lie deeper:

  • πŸ› οΈ Memory Fragmentation: Use the App SD Maid for defragmentation (root required).
  • πŸ”„ Outdated firmware: Update MIUI through settings β†’ Update or install custom firmware (Pixel Experience 12 shows better performance on the Mi 8).
  • πŸ”‹ Battery wear: At a charge below 20%, the Snapdragon 845 begins to trattle the processor. Replace the battery if its capacity has dropped below 70%.

If you decide to completely reset (Wipe Data), save:

  • πŸ“ Photos and video (folder) DCIM).
  • πŸ“ž Contacts (export to.vcf).
  • πŸ”‘ Wi-Fi passwords (use Xiaomi Cloud or Google Backup).

FAQ: Frequent questions about cleaning the cache on Xiaomi Mi 8

❓ Can I clean the cache every day?
No, it doesn't make sense. Cache is used to speed up applications. The optimal frequency is every 1-2 weeks or with noticeable brakes. Frequent cleaning, on the contrary, can slow down the smartphone, since the system will have to constantly restore temporary files.
❓ Why After Cleaning the Cache, Some Apps Stopped Working?
Chances are, you accidentally clicked Clear Data instead of Clear Cache, in which case the app will reset to factory settings. Solution: Reinstall the program from Google Play. If it's a system application (like the Camera), reset through Settings β†’ Apps β†’ Reset.
❓ How to Clean Google Play Services Cache Without Breaking the System?
Google Play Services is a critical process, and cleaning it can cause sync failures. Only do this if: The app takes >500MB in Settings β†’ Memory. There are errors like "Google Play Services has stopped." After cleaning, restart your phone and wait for the cache to recover automatically (it can take up to 10 minutes).
❓ Why Cache Cleaning Doesn't Free Up Space on Your Phone?
The cache takes up temporary storage that the system can reuse. Once cleaned, the vacated space is often eaten up by other processes. To actually make room: Remove unused applications (Settings) β†’ Memory. β†’ Unnecessary files. Transfer photos to Google Photos or SD-Clean the Download folder (it often accumulates gigabytes of garbage).
❓ Can the cache be cleared without data loss if the phone is not turned on?
Yes, if the smartphone is loaded into Recovery Mode. 3, Select Wipe Cache Partition. If the screen isn't responding, plug in Mi. 8 To the PC and use ADB (see section 6). In extreme cases, flashing through Fastboot with data storage will help (fastboot flash system command). system.img without --wipe-data).