How To Set Wi-Fi As Metered Connection On Xiaomi MIUI

If you’re struggling with high data consumption on your android device, setting you Wi-Fi connection as a metered connection will save you some data in that it will prevent random updates from running without your express approval. Sadly, Xiaomi is yet to deploy this feature to MIUI so in this quick tutorial, I’ll be showing you how to implement this using ADB

NOTE: This is a bit advanced for some but following instructions will make it easy.

Install Android Debug Bridge

If you don’t have ADB installed already on your PC or MAC, do please follow this detailed tutorial >>> How to install ADB on Windows, macOS, and Linux. Make sure to also set it up to run from any directory on your PC or Mac. This is detailed in the aforementioned tutorial.

Activate Metered Connection

Note: Please make sure your Wi-Fi name doesn’t have any spaces. If it does, you will have to change it for this to work. Also, I’m not sure if USB Debugging needs to be on for this to work. You can temporarily activate it and deactivate it when you are done with this guide >> Activate USB Debugging.

UPDATE 25th October, 2023: I’ve confirmed you need to activate USB Debugging for this to work. USB Debugging is needed for the computer to recognize your android device.

Connect your android device to your PC or MAC. When you do this, you’ll see a prompt on your device asking you to authorize USB Debugging for your PC or MAC. Accept this prompt only if you trust the device i.e. if the computer is your personal device. Turning on USB Debugging exposes your device to threats.

download

1. Open Command Prompt on Windows then type in adb devices as shown in screenshot below. This will show the android device connected to your computer.

Activate Metered Connection on MIUI

2. Run adb shell cmd netpolicy list wifi-networks and this will list the available Wi-Fi connections saved on your android device.

Notice that all of the Wi-Fi connections on my device are marked as NONE.

From my understanding, TRUE = Treat As Metered Connection, FALSE = Treat As Unmetered Connection and NONE = Detect Automatically.

For this guide, I’ll be marking the Wi-Fi connection, Blue_4G as a metered connection.

3. Run adb shell cmd netpolicy set metered-network Blue_4G true and you’re good to go. Replace Blue_4G with the name of the Wi-Fi connection you’re trying to meter.

4. To check if all went well, re-run adb shell cmd netpolicy list wifi-networks and your Wi-Fi connection should now be set as true, which means that the connection is metered.

Turn off USB Debugging.

That’s all. Enjoy

Please Rate This Post:
4.6/5 - (5 votes)

You’ll also like:

Please share this article to help others. Thanks