WiFi logs have the notorious behavior of filling up phone space. But MIUI ROMs appear to be particularly prone to this problem.

It seems the developers of both MIUI 8 and 9 did not find excessive WiFi logging to be a nuisance. They left that option enabled by default.

Xiaomi users have even reported the same issue with other MIUI-based ROMs.

Remember, logging is not a bad thing per se. The Android system relies on this technique for recording debugging data.

How to free up space By disabling WiFi logging in MIUI ROMs

Some of the functions that use logging include Bluetooth, Navigation, WiFi, just to mention a few.

Whereas a large number of logs could occupy internal memory unnecessarily, there’s another significant risk involved. These files may also record sensitive information.

For example, WiFi logs contain the MAC and SSID addresses of WLAN networks. And that’s in clear text, mark you. So that means; if your phone has root access, malware could know precisely where to strike.

It’s settled then. We need a way to stop MIUIs from creating these logs. Here’s how.

First Things, First

One, as with any process that changes system files, disabling WiFi logging first needs root access.

If you’ve not rooted your Xiaomi phone, there are excellent guides in previous posts.

See, for example:

Two, install a file explorer capable of navigating system folders. You could use apps like MiXplorer, ES File Explorer, or Solid Explorer for this.

Finally, install a text editor like QuickEdit. We will be changing some values in a text file, after all.

How to Disable WiFi Debug Logging in MIUI ROMs

  • Open the file explorer. Make sure that you grant it root permissions.
  • Navigate to the cnss.diag.conf file. You can find it in the root folder under: /data/misc/wifi/
  • Using the text editor, modify the values shown below to read:
LOG_PATH_FLAG = 0
MAX_LOG_FILE_SIZE = 1
MAX_ARCHIVES = 1
LOG_STORAGE_PATH =
  • Save the changes and restart your phone to turn off the WiFi debug logs.

Extra Ways of Freeing Up More Space

We’ve seen how WiFi debug logs can take up space and what you can do about it.

If that alone doesn’t seem to work, you could also do these things.

Clear an App’s Cache

A cache is where an app stores the data a user tends to access frequently. It could contain stuff like images or text that an app may usually have to get from remote services – say, the Internet.

Over time, however, a cache uses up more internal memory. It could even cause an app to misbehave.

So the next time your phone slows down or starts to fill up, clear some apps’ cache files.

Just go to Settings then Apps. Select the suspected app and click the “Clear cache” button.

If an app seems overly problematic, you could even press “Clear data.” That would make the app start as if it is a fresh installation.

Delete Downloads

You know, those image and video files that sit in your Downloads folder may not even interest you anymore.

Go ahead and delete them. It will free up some space for you.

Take Advantage of Google Photos’ Backup

The best thing about Google Photos is that it provides unlimited cloud storage for your image files.

Just make sure that you choose the option to only backup “high quality” photos.

You could then set the app to sync automatically. With that, no photos will use up your phone’s memory again.

These are only a few ways of freeing up space. Do you have any other ideas that work just as well? Please share them in the comments section.