Battery saver mode on Android can be quite effective at extending your battery life by restricting background services, disabling animations, and performing various other tweaks. However, it employs some extra measures which some may seem excessive or unnecessary. Does vibration really use enough power to justify switching it off, for example? The trade-off of disabling vibration is you may miss important messages. The screen also dims in battery saver, but just because my battery has reached 15% doesn't mean I don't need to use full brightness to be able to see. These are things you had to put up with when using battery saver, with no method to pick and choose what you wanted – until now. We will be showing you how to customize battery saver mode in Android 8.0 Oreo. To follow this tutorial, you do not need root access but you will need to use adb.
Customize Battery Saver Mode in Android 8.0 Oreo
With Android Oreo, yet another improvement that has been added is the ability to edit what battery saver does! These commands require adb, but the changes you make will stick. Firstly, observe the following image, taken from the source code of Android Oreo.
So each of these values should be fairly simple as to understand what they do, but we'll explain how it works anyways. Each setting takes a boolean, an integer, or a float value. A boolean is a "true" or "false", an integer is just a standard whole number, and a float is a number that can contain decimals.
So what are the use cases for this? Here are some examples:
Enabling Vibration
To enable vibrations in battery saver mode, we want to set vibration_disabled to "false".
Enabling Animations
To enable animations in battery saver, we want to set "animation_disabled" to "false".
Disabling Brightness Dim
To disable the brightness dim, change "adjust_brightness_disabled" to "true".
How to change battery saver settings
So, after you've picked the values that you want to change, we can come up with our ADB commands that we want to run to perform these changes to battery saver mode. For instance, I want to enable vibration, enable animations, and disable the screen brightness dim whenever I turn on battery saver. Open up a command prompt/terminal and type "adb devices" to make sure your device is recognized by your computer.
Once you have something like the output above, type "adb shell" and you're ready to continue!
For instance, in my case I would type the following.
settings put global battery_saver_constants "vibration_disabled=false,animation_disabled=false,adjust_brightness_disabled=true"
As you can see, I put the changes that I wanted to make to battery saver mode into a key=value comma separated list. You can add or remove as many operands to this command as you wish. Any values that you leave untouched will not be changed and will retain their original, default values.
After sending the above command, disconnect your phone from your computer. Enable battery saver and see that your phone now vibrates, animations are on, and the brightness doesn't dim anymore.
Making Changes to Battery Saver On-Device (Root)
It's actually possible to edit these settings from your device if you have root! If your device is rooted via Magisk or SuperSU, you can simply run the same command as above from a terminal app such as Termux. Just run the commands as usual, following the above syntax.
Explanation
It would seem Google is working to add many requested features for quality of life improvements. With commands added for theming, lockscreen shortcuts and now this, Google definitely is trying to polish the operating system and allow tweaking of many device areas. Hopefully we find even more modifiable settings like these!
from xda-developers http://ift.tt/2iwtRCV
via IFTTT
No comments:
Post a Comment