Ever found yourself in a situation where you wanted your Android phone to automatically turn off after a certain period of inactivity? While Android doesn't have a built-in feature for this, you can achieve this using a third-party app or a simple ADB command. Let's explore both methods in this comprehensive guide.
Using a Third-Party App: ShutDown Manager
ShutDown Manager is a free app available on the Google Play Store that allows you to schedule your phone to turn off at a specific time or after a period of inactivity.
How to Set Up ShutDown Manager
- Download and install ShutDown Manager from the Google Play Store.
- Open the app and grant it the necessary permissions.
- Tap on "Schedule Power Off" to set up a timer to turn off your phone at a specific time.
- To set up a timer based on inactivity, tap on "Power Off After Idle". Here, you can set the duration of inactivity after which the phone will turn off.
Using ADB Command: Turn Off Android Phone
If you're comfortable with command-line interfaces, you can use the Android Debug Bridge (ADB) command to schedule your phone to turn off. This method requires your phone to be rooted and have ADB installed on your computer.

How to Set Up ADB to Turn Off Your Phone
- Enable USB debugging on your Android phone. Go to "Settings" > "About phone" and tap "Build number" seven times to enable Developer Options. Then, go to "Settings" > "System" > "Developer Options" and enable "USB debugging".
- Connect your phone to your computer and open a command prompt or terminal window.
- Type the following command to turn off your phone after a specified duration (in seconds):
`adb shell input keyevent 26`
For example, to turn off your phone after 300 seconds (5 minutes), you would type:
`adb shell input keyevent 26`
Safety Precautions
While these methods can be useful, it's important to use them responsibly. Turning off your phone too frequently can drain its battery faster. Also, ensure that you don't set up a timer to turn off your phone while you're using it, as this could lead to data loss or interrupted processes.
In case you change your mind, you can always uninstall the ShutDown Manager app or stop using the ADB command to prevent your phone from turning off automatically.
