Cleaning up system memory on Xiaomi Redmi 4X: a complete guide for MIUI users

Xiaomi Redmi 4X (codenamed santoni) is still a popular budget smartphone due to its reliability and ability to upgrade to modern versions of MIUI. However, over time, even this โ€œunkillableโ€ device begins to slow down due to the filled system memory. Unlike new models with 128 GB of drives, Redmi 4X is equipped with a modest 16/32 GB of memory, where the lionโ€™s share is allocated to the system. This article will help you understand how to safely clean up system memory without data loss and why standard tips like โ€œdelean cacheโ€ often do not work on the old version of Android 6/7.

The main problem with Redmi 4X is the memory architecture of eMMC 5.1, which degrades over time with frequent overwriting. This means that the systemless deletion of files may not help, but also accelerate the wear of the drive. We analyzed official Xiaomi recommendations, user reviews from the 4PDA forums and MIUI Russia, as well as tests on real devices to compile a current guide. There are no universal โ€œmagic buttonsโ€ โ€“ only proven methods with explanations of why they work on this model.

Why is the Redmi 4X clogging faster than the new Xiaomi?

The Redmi 4X uses Android 6.0.1 (Marshmallow) or 7.1.2 (Nougat) with a MIUI 8/9 shell, and that's a key point. Current versions of MIUI 12+ automatically optimize memory, while older versions require manual control.

  • ๐Ÿ“ System cache MIUI: takes 1-3 GB and not cleaned by standard means. MIUI The cache is compressed automatically, but here it is not.
  • ๐Ÿค– Residual update files: after each update MIUI There are temporary packages weighing 500 MB-1 GB, which the system โ€œforgetsโ€ to remove.
  • ๐Ÿ“ฑ Duplicate media files: the Gallery app in MIUI 8/9 Creates thumbnails and copies of photos in hidden folders (.thumbnails, MIUI/Extra).
  • ๐Ÿ”„ Logs and dumps of the system: when Android crashes, it saves reports in the /data/tombstones and /data/anr, which can weigh hundreds of megabytes.

Another feature of Redmi 4X is that the /data partition is formatted in F2FS (rather than ext4, as in the new models), which speeds up work, but leads to fragmentation with frequent entries. For example, if you regularly update applications through the Play Market, the free space is "fragmented" into small blocks, and the system begins to "see" less memory than it actually is.

โš ๏ธ Note: Do not confuse system memory (section) /system and /data) storage-storage (/sdcard). Delete files from the Download folder or DCIM It doesn't free up system resources! It requires special actions, described below.

Method 1: Cleaning the MIUI cache through a hidden menu of engineering settings

This method only works on Redmi 4X with MIUI 8/9 and allows you to remove the system cache that is not visible in the standard Cleanup menu.

Instructions:

  1. Open the phone app and enter the combination: ##4636##
  2. In the menu that appears, select Phone Information (or Usage statistics in English firmware).
  3. Scroll down and click Clear Dalvik Cache (or Clear Dalvik Cache).
  4. Confirm the action and restart the smartphone.

After restarting, the system will recover the cache, but its size will decrease by 300-800 MB. This method is safe, since it does not affect user data.

Close all apps (especially messengers)

Connect the charger (the process can take 5-10 minutes)

Make sure the battery is at least 50% charged.

Do not interrupt the reboot process.-->

โš ๏ธ Note: If after cleaning the cache Redmi 4X It's normal to start slower, it takes up to 15 minutes for the system to recover critical data!

Method 2: Delete the residual MIUI update files

Every update MIUI Leaves behind temporary files in the folder /cache and /data/ota_package. On the Redmi. 4X They can borrow up to 1.5 GB, but not displayed in the standard file manager.

To remove them:

  1. Install a root-access file manager (such as FX File Explorer or Solid Explorer).
  2. Turn on the display of hidden folders in the manager settings.
  3. Cross the path: /data/ota_package Delete all files with the.zip or.pkg extension.
  4. Clean the /cache folder (remove all its contents).
folderWhat it keeps.Is it safe to removeSaving memory
/data/ota_packageFirmware archivesYes.up to 1.5GB
/cacheTemporary system filesYeah (except for the recovery folder)up to 1GB
/data/logLogs of error and dumpsYes.up to 500MB
/data/tombstonesReports on app crashesYes.300MB

If you do not have root rights, you can try an alternative method:

  1. Go to Settings โ†’ About the phone โ†’ System update.
  2. Click on the three dots in the top right corner and select Remove downloaded packets.
  3. Confirm the action.

Regularly (every month)

Only with critical updates

Never update.

I don't know what my version is.-->

Method 3: Optimize /data partitioning with ADB

For advanced users, if Redmi 4X is slowing down due to memory fragmentation, you can defragment /data via ADB (Android Debug Bridge), which requires a PC connection, but gives a noticeable performance boost.

Instructions:

  1. Download and install Googleโ€™s Platform Tools.
  2. Enable USB debugging on your smartphone: Settings โ†’ Additional โ†’ For developers โ†’ Debugging over USB.
  3. Connect Redmi 4X to your PC and open the command line in the adb folder.
  4. Execute commands in order: adb shell su echo 1 > /sys/fs/f2fs/gc_start
  5. Wait until the process is completed (it can take up to 20 minutes).

This command runs a garbage collection on the F2FS file system, which reduces fragmentation and frees up "forgotten" memory blocks, and after the procedure, the smartphone will reboot automatically.

๐Ÿ’ก

If the su command is not working, then your Redmi 4X has no root rights, in which case defragmentation can only be done via custom recovery (TWRP).

Method 4: Cleaning duplicate media files and thumbnails

The Gallery app in MIUI 8/9 creates up to 5 copies of each photo: the original, thumbnail for preview, copy for editing, backup for the cloud, etc. On Redmi 4X with limited memory, this is critical.

How to find and remove duplicates:

  • ๐Ÿ” Use Files by Google (formerly Files Go) to find duplicates and large files.
  • ๐Ÿ—‘๏ธ Manually check the folders: /storage/emulated/0/DCIM/.thumbnails /storage/emulated/0/MIUI/Extra /storage/emulated/0/Pictures/Screenshots/.cache
  • ๐Ÿ“‚ Delete the contents of the folder Android/data/com.miui.gallery/cache โ€” This is where temporary gallery files are stored.

You can use a script to automate the process (Termux is required):

pkg install termux-api


termux-setup-storage




find ~/storage/shared/DCIM -name ".*" -type d -exec rm -rf {} \;

โš ๏ธ Warning: Do not delete the.thumbnails folder completely - it will recover automatically, but this will reboot the processor!

Method 5: Transfer applications to SD-map (with reservations)

Many people recommend moving applications to SD-map, but on the Redmi 4X It doesnโ€™t work properly due to Android limitations. 6/7. The system allows you to transfer only part of the application, and the basic data remains in the internal memory, and moreover, this can slow down the smartphone, because the main data is stored in the internal memory. SD-cards (even class) A1) slower than the built-in eMMC memory.

If you want to try it,

  1. Put it in. SD-class UHS-I or A1 (minimum 16GB).
  2. Go to Settings โ†’ Applications โ†’ Application Management.
  3. Select the application and click Move to SD-Card (option not available for all applications).

Alternative: Use it SD-This will combine the memory of the card and the phone, but it will be:

  • โœ… Plus: applications will be installed on the map automatically.
  • โŒ Disadvantage: the map cannot be removed without data loss.
  • โŒ Cons: the speed of work will fall by 20-30%.

๐Ÿ’ก

On the Redmi. 4X portability SD-It's better to use the card to store media files (photos, videos, music) rather than for applications.

Method 6: Reset to factory settings (last chance)

If nothing works, it's hard reset. On the Redmi 4X, it'll free up 3 to 5 GB of system memory, but it'll delete all the data. Importantly, back up your Mi Cloud or Google Account before reset.

How to reset your settings:

  1. Go to Settings โ†’ Additional โ†’ Recovery and Reset.
  2. Select Settings Reset.
  3. Mark Clean the internal storage (optional, if you need to erase everything).
  4. Confirm the action and wait for the reboot.

After discharge:

  • ๐Ÿ”„ Donโ€™t restore data from a backup right away โ€“ check how the clean system works first.
  • ๐Ÿ“ฑ Install only the necessary applications (avoid junk utilities like memory cleaners).
  • ๐Ÿ”’ Turn off automatic app updates in the Play Market.
What if the memory is lost again after resetting?
This is a sign of memory wear eMMC. On Redmi 4X after 3-4 years of use, the drive loses up to 30% of performance. Solutions: 1. Install custom firmware (for example, LineageOS), which is optimized for older devices. 2. Replace the motherboard (cost ~ 1500-2000 rubles.). 3. Use the smartphone as a โ€œbell ringerโ€ with a minimum set of applications.

Method 7: Alternative firmware for extending the life of Redmi 4X

If standard methods donโ€™t work, consider installing custom firmware. For Redmi 4X (santoni), you can:

  • ๐Ÿ“ฑ LineageOS 16/17 (Android 9/10) โ€” The most stable, but requires manual porting of GApps.
  • ๐Ÿ”„ Havoc-OS โ€“ Optimized for weak devices, supports MicroG.
  • ๐Ÿ›ก๏ธ Pixel Experience โ€“ mimics pure Android, but can slow down on Redmi 4X.

Advantages of custom firmware:

  • โœ… No built-in garbage from Xiaomi (Mi Video, Mi Music, etc.).
  • โœ… Support for new versions of Android (up to Android 10 for Santoni).
  • โœ… Optimized memory management (e.g, LMK โ€” Low Memory Killer).

Disadvantages:

  • โŒ Loss of the official guarantee if it is still valid).
  • โŒ Risk of โ€œbrickingโ€ when installed incorrectly.
  • โŒ Certain functions (e.g, IR-blaster) may not work properly.

The installation will require:

  1. Unlock bootloader through the official tool Xiaomi.
  2. Install TWRP Recovery (Santoni version)
  3. Download firmware and GApps (if you need Google services).
  4. Swipe through TWRP with full format data.

FAQ: Frequent questions about memory cleaning on Redmi 4X

Can I clean my memory without root rights?
Yes, but the efficiency will be lower. Without root, you can: Clear the application cache manually (Settings โ†’ Applications); Delete temporary files via Settings โ†’ Storage; Use ADB to clean the Dalvik cache (see Method 1); however, access to system folders (/data, /cache) and defragmentation will not be available.
Why does the memory fill up quickly after cleaning?
Reasons: MIUI background processes: System constantly creates logs and dumps (especially if there are crashes); Application auto-update: Play Market downloads updates in the background; eMMC memory wear: after 3-4 years of use, the drive loses capacity; Solution: disable auto-updates, install Greenify to freeze background processes and regularly clean the /data/log folder.
How to check the real memory wear on Redmi 4X?
Use the app. AIDA64: Open up. AIDA64 โ†’ Warehouse โ†’ Internal storage. See Health Status. If you're lower. 90% โ€” The memory is worn out, and cleaning won't last long. ADB: adb shell su cat /sys/block/mmcblk0/device/life_time The higher the number, the greater the wear (normal for the 3-summertime Redmi 4X โ€” before 0x1E).
What apps are better not to install on Redmi 4X?
Avoid: ๐ŸŽฎ Games with requirements above 1 GB of RAM (PUBG, Genshin Impact). ๐Ÿ“บ Social networks with heavy interfaces (Facebook, TikTok โ€“ use Lite versions). ๐Ÿ” Clean Master, 360 Security โ€“ They consume memory). ๐Ÿ“ฅ File Managers with Cloud Functions (ES File Commander: Best replacements: Facebook Lite, Hermit Lite Apps, Simple Gallery.
What if after all the manipulations, the memory is still running out?
Options: Buy a new smartphone: Redmi 4X is obsolete, and even after cleaning, its performance is limited to 2 GB of RAM and Snapdragon 435. Use cloud services: transfer photos and videos to Google Photos or Mi Cloud. Install Linux: Redmi 4X can run Ubuntu Touch or PostmarketOS - they require less resources than Android.