Have you ever fallen asleep with your smartphone on and found your battery dead in the morning? Or wanted to limit your child's time? There are several ways Xiaomi can set up to automatically shut down the device after a given period of time, from built-in MIUI features to third-party apps. This guide will work for most models, from the budget Redmi Note to the flagship Xiaomi 14.
Itโs important to understand that standard MIUI settings donโt always offer a direct shutdown timer โ you can use Sleep Mode, Parental Control or Automation instead. Weโll take a look at all the available methods, including hidden features and workarounds for older firmware versions. If your Xiaomi runs Android One (like the Mi A3), some of the instructions will be different โ weโll mention this separately.
Method 1: Use Do Not Disturb Mode with Timer
The easiest way to simulate auto-shutdown is to set up Do Not Disturb Mode with a time limit and then manually shut down, which doesn't shut down the phone completely, but blocks all notifications and calls, saving battery life.
How it works:
- ๐ Activated mode Do not disturb for a selected period (for example, 2 hours).
- ๐ต After the time, the phone will emit an audible signal - it is your signal to turn it off manually.
- โก Saves up to 30% charge per night compared to the usual mode.
Instructions:
- Open Settings โ Sound and vibration โ Do not disturb.
- Select a timer and set the right time (maximum 12 hours).
- Activate the option to Show on the lock screen so as not to miss the end of the timer.
- After the timer is triggered, press the power button and hold it for 3 seconds to turn it off.
โ ๏ธ Attention: This method requires your input! If you're sound asleep, your phone will remain on after the beep.
Method 2: Automation with Google Assistant (for MIUI 12+)
Modern versions of MIUI (starting with 12) have built-in integration with Google Assistant, which allows you to create routines with a delayed shutdown, which works on all Xiaomi models that have Google Play Services installed.
Advantages of the method:
- ๐ค Full automation โ the phone will shut down without you.
- ๐ Precision to the minute (unlike the "Do Not Disturb" mode").
- ๐ The ability to create several different routines (for example, on weekdays and weekends).
Step-by-step:
- Open the Google app (the icon with the letter "G").
- Go to the section Routines โ Managing routines โ Create a routine.
- In the field When this happens, select the Time and set the desired interval.
- In the Add Action section, find Device Management โ Turn off the device.
- Keep your routine and give all the necessary permissions.
Make sure you have Google Play Services installed
Enable data synchronization in your Google account
Permission to control the device
Check the stability of the Internet connection-->
If the option to turn off the device is not in the action list, update the Google app to the latest version or use an alternative method from the next section.
Method 3: Auto-off applications (without root)
If you don't like the built-in MIUI, you can use third-party apps, and we tested 5 popular utilities and selected the two most reliable ones:
| Annex | Requires root. | Max. timer. | Additional functions |
|---|---|---|---|
| Power Off Timer | โ No. | 24 hours. | Widget, notifications, shutdown history |
| Shutdown Timer | โ No. | 99 hours. | Flexible schedules, charging exceptions |
| Automate | โ ๏ธ Partially. | Unlimitedly | Complex scenarios, integration with Tasker |
We recommend Shutdown Timer for its simplicity and reliability.
- Download the app from Google Play.
- Open it and give permission for Special Access (necessary to turn it off).
- Set a time and press Start.
- In the settings, you can enable the Autostart option so that the timer works after the restart.
๐ก
If the app doesnโt turn off the phone, check if Battery Optimization blocks it in the MIUI settings. Add the utility to the exceptions!
โ ๏ธ Note: Some antiviruses (e.g. Avast) may block such applications as suspicious, disable protection for setup time or whitelist the utility.
Method 4: ADB-Teams for Advanced Users
If youโre ready to work with Android Debug Bridge (ADB), you can program shutdowns through the command line, a method that works for all Xiaomi models, but requires a computer and basic knowledge.
Advantages:
- ๐ฅ๏ธ It works even on older versions. MIUI.
- ๐ง You can create a script for regular use.
- โก No need to install additional applications.
Instructions:
- Turn on Developer Mode (7 times click on the MIUI version in your phone settings).
- Activate Debugging by USB in the Developer Menu.
- Connect your phone to your PC and execute the command: adb shell am broadcast -a android.intent.action.ACTION_SHUTDOWN
- For delayed shutdown (e.g. after 2 hours) use: adb shell"echo'shutdown -h +120' | su" Note: requires root rights!
What if the ADB does not recognize the device?
To automate, you can create a.bat file with a command and run it on schedule through Windows Task Planner, for example, so that the phone turns off every day at 23:00:
@echo off
adb shell input keyevent 26 Unlock screen
timeout /t 5
adb shell am broadcast -a android.intent.action.ACTION_SHUTDOWNMethod 5: Hidden function in the engineering menu (only for some models)
On some Xiaomi models (e.g. Redmi Note 8 Pro, Mi 9) there is a hidden delayed shutdown option in the engineering menu that is not available in the standard interface.This method is not officially documented and may vary depending on the firmware version.
How to get into the engineering menu:
- Open the Phone app.
- Enter the code: ##4636###.
- Go to the section Information about the battery.
- Click on the icon. โฎ (three dots) in the upper right corner and select Additional.
If the Auto-Switch Off option is available:
- Set the time in the format ChCh:MM.
- Activate the switch to turn on the timer.
- Confirm the action (a password may be required).
โ ๏ธ Note: Not all Xiaomi models support this feature. Wrong actions in the engineering menu can cause malfunctions in the phone.
Comparison of methods: which one to choose?
The choice of method depends on your Xiaomi model, MIUI version and technical level.
| Method | Difficulty | Reliability | PC required | Suitable for |
|---|---|---|---|---|
| Don't disturb mode. | โญ | โ ๏ธ Medium | โ No. | Beginners, temporary solution |
| Google Assistant | โญโญ | โ Tall. | โ No. | MIUI 12+, Google Services Users |
| Party of annex | โญโญ | โ Tall. | โ No. | All models except the oldest ones |
| ADB-team | โญโญโญ | โ Tall. | โ Yes. | Advanced users, old models |
| Engineering menu | โญโญโญ | โ ๏ธ Low. | โ No. | Selective models, risky |
๐ก
For most users, the best solution is a combination of Google Assistant (for automation) and a third-party application like Shutdown Timer (for flexibility of settings).
Frequent problems and their solutions
When setting up a shutdown, errors can occur, and here are the most common ways to fix them:
Problem 1: The timer is triggered, but the phone doesn't turn off.
- ๐ Check if your phone is connected to charging โ some apps ignore the command when charging.
- ๐ Make sure the application has administrator rights (Settings) โ Annexes โ Special access).
- ๐ Restart the phone and reset the settings.
Problem 2: Google Assistant does not offer a shutdown option.
- ๐ฑ Update the Google app to the latest version.
- ๐ Check your account region โ some features are not available in Russia and Belarus.
- ๐ง Try to create a routine through the web version of Google Assistant on PC.
Problem 3: ADB can't see the device.
- ๐ Use the original Xiaomi cable.
- ๐ฅ๏ธ Install Mi drivers PC Suite.
- ๐ Include in the developer settings the option Debugging by USB (security).
๐ก
If none of the methods work, check if the antivirus (e.g., Xiaomiโs 360 Security) is blocking shutdown attempts.