Battery life is extremely unpredictable on an Android. Finding the right ROM and kernel combo can make or break having the kind of battery that will last you all day long. Even if you do find the perfect pair, you then have to worry about apps, widgets, and other processes constantly waking your phone and draining your juice. While your media scanner isn't the biggest battery hog out there, it can definitely take a chunk out of it.
Now, thanks to XDA user thomashofmann, we have Xposed Media Scanner Optimizer which allows you to better schedule or completely shut off your media scanner. This is an Xposed module, so you will need to have a device that is rooted with the Xposed Framework installed.
Head to the "Download" section of the Xposed Installer app and search for "Xposed Media Scanner Optimizer." Once you find it, select it and tap "Install." After the install completes, tap the "Activate & Reboot" notification that appears.
To increase battery life, you should check the box next to "Repetitive Scans" and "Directories." Doing so will prevent the media scanner from performing new scans constantly and will restrict scanning to directories with a .scanMedia file.
You have to make the .scanMedia file manually by using ES File Explorer (or another root-capable file browser) and tapping the "+" icon on the bottom toolbar to create a new file.
There is also the "Run Automatically" option that can be disabled so that the scanner only runs when you tap the "Trigger MediaScanner" option from the app.
Remember that stopping the media scanner from running will prevent apps from finding newly downloaded content.
You can also enable "Media Types" to have the scanner only search folders for specific types of files. This also requires a file to be created with ES File Explorer with the names .scanPictures, .scanVideo, or .scanMusic. If you want notifications to appear each time the scanner runs, you can enable "Result Notifications."
Keep Your Connection Secure Without a Monthly Bill. Get a lifetime subscription to VPN Unlimited for all your devices with a one-time purchase from the new Gadget Hacks Shop, and watch Hulu or Netflix without regional restrictions.