How to set automatic / scheduled hot reboot in android phones?

Write for Us: Familiar with Smart Home Automation, Media Streaming, HTPC, and Home Server topics? Write for us and get paid. Writing experience not required. APPLY HERE.

In my previous post, I showed how to setup automatic / scheduled reboot in android phones. This worked for me and I woke up to a fresh Droid 2 every morning. Soon I realized that the reboot was messing with overclocking. My Droid 2 is overclocked using QuickClock Advanced. For some reason my /system/libs/modules/overclock.ko does not load properly upon boot. So on rebooting I would lose my overclock and would have to manually load the profile in QuickClock Advanced. This was inconvenient and so I set out searching for better options.

Hot rebooting is the term used to describe the rebooting only the android graphical shell. It is much faster than a full reboot. More often than not rebooting the graphical shell will remove the occasional sluggishness of the phone. It is much simpler alternative to task killers to free up memory. In fact there are apps that can do this. My test showed that once loaded the overclock.ko module was not unloaded during hot reboot. Therefore my overclocking stayed intact. Other advantages are that the system up-time is not reset after a hot reboot.

Android experts (which I am not) would argue that android OS does not require reboot and it is capable of handling the resources intelligently. While they may be right, my personal experience is that hot rebooting clears up the occasional sluggishness of my phone. Then I thought how it would be to wake up everyday and have a phone that had just hot rebooted and is ready to go. I did some research and accomplished it as described below.

Note: Your phone should be rooted for this to work.

Search the market and install Script Manager. There is a free version as well as an ad-sponsored version.

Script Manager App
Script Manager App

Save the following codes to a file named "hotreboot" (or anything you like). You can write it on your phone using Script Manager or any text editor or on your PC and move it to your SD card on the phone.

#!/system/bin/sh
su -c 'pkill -TERM -f system_server'

Then open Script Manager and go to "Advanced Options" and select "Scheduler".

Script Manager Options
Script Manager Options

Schedule the script to run as shown below. Of course, choose the run time that works for you.

Script Manager - Scheduler
Script Manager - Scheduler

After adding the hotreboot script, it should appear in the list below (as shown in the picture above). Long-press it and select "Config". Choose "Run as root" and "Is Script", as shown in the picture below. Be careful NOT to select "Run at boot" or your phone will go on a reboot loop.

Script Manager - Script Config
Script Manager - Script Config

Save and exit all the way out. Thats it. Your phone should automatically hotreboot at the scheduled time. If you like you can add a hotreboot shortcut to your homescreen using the Script Manager widget.

Now my phone is set to automatically reboot once a week and hotreboot everyday to give me a fresh and slick android experience. Enjoy!

Did this post help you?
SmartHomeBeginner brings in-depth tutorials easy enough to understand even for beginners. This takes a considerable amount of work. If this post helps you, please consider supporting us as a token of appreciation:
  • Feeling generous? Become a Sponsor (discounted options) or a Patron. You will receive privileges on our Discord Server.
  • Just want to thank us? Buy us a Coffee or a Ko-Fi.
  • May be another day? Shop on Amazon using our links. Your prices won't change but we get a small commission.
  • Don't feel like spending? You can still show your support by sharing this post, linking to it in forums, or even commenting below.

Anand

Anand is a self-learned computer enthusiast, hopeless tinkerer (if it ain't broke, fix it), a part-time blogger, and a Scientist during the day. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, Smart Home Automation, and related HOW-TOs.