Hey xda-Community!
I recently wanted to reduce my idle drain and searched for ways to edit Android Doze settings, because I remembered seeing a tutorial that said you can change deviceidle-constants, that dictate how Doze works (how fast it kicks in, how long it kicks in, light/deep doze).
I tried all those old tutorials, but I quickly realized the old ways to change the parameters are deprecated, so I asked people on android.stackexchange.com and someone actually gave me the answer (thanks Andrew) (https://android.stackexchange.com/questions/247680/is-device-idle-constants-deprecated-in-android-12).
This works from Android 12 on and is achieved using a shell.
Commands:
Note: When using an adb shell, you have to put "adb shell" before those commands. I'll just put the bare commands here, you add what you have to add.
Checking the settings:
You can check your current Doze settings (and statistics) with "dumpsys deviceidle".
Changing a setting;
Every parameter has to be set individually. It's not that bad tho, as you only have to do this once.
Syntax is: "device_config put device_idle [KEY] [VALUE]".
One example: "device_config put device_idle light_after_inactive_to 30000"
You can check "dumpsys deviceidle" to see what keys there even are. To help you out, here's an explanation of what each key actually sets. You can also get a visual sense of how the light mode and the deep mode work (not my work, thanks to easz from github).
Spoiler: My recommended settings
First; reset parameters with: "device_config reset trusted_defaults device_idle"
light_after_inactive_to 30000
light_pre_idle_to 120000
light_idle_to 300000
light_idle_factor 2
light_max_idle_to 900000
light_idle_maintenance_min_budget 30000
light_idle_maintenance_max_budget 180000
inactive_to 900000
sensing_to 0
locating_to 0
motion_inactive_to 0
idle_after_inactive_to 900000
idle_pending_to 60000
max_idle_pending_to 120000
idle_pending_factor 2
idle_to 900000
max_idle_to 21600000
idle_factor 2
wait_for_unlock true
I also wrote a windows batch script (works via adb, you have to rename the .txt file to .bat) and a bash file that changes the parameters to my recommendations. See attachments.
will these settings persists even after a reboot? or upgrading rom?
maxs8007 said:
will these settings persists even after a reboot? or upgrading rom?
Click to expand...
Click to collapse
yes, these will stick after a reboot. Not sure about upgrading, but I would guess that it'll stay, because we don't actually modify anything on the system partition
@Doomkopf for me those settings won't stick.
For testing purpose I just applied those yesterday morning:
adb shell device_config put device_idle motion_inactive_to 300000
adb shell device_config put device_idle light_after_inactive_to 180000
This morning they are back to stock values. Any ideas? :S
Utini said:
@Doomkopf for me those settings won't stick.
For testing purpose I just applied those yesterday morning:
adb shell device_config put device_idle motion_inactive_to 300000
adb shell device_config put device_idle light_after_inactive_to 180000
This morning they are back to stock values. Any ideas? :S
Click to expand...
Click to collapse
I set mine like 6 weeks ago, it's still set. I miss many information, what phone do you use, what ROM, how you check if it's still set etc
Doomkopf said:
I set mine like 6 weeks ago, it's still set. I miss many information, what phone do you use, what ROM, how you check if it's still set etc
Click to expand...
Click to collapse
Hi, oh well here are some more infos:
Pixel 6 Pro
Latest Android 13 Stock ROM
Kirisakura Kernel
I check via "adb shell dumpsys deviceidle".
I set it all your settings on friday and today (monday) there are back to stock values.
Previously I tried settings my own settings on wednesday morning and had stock values on the next day already as well :S
Utini said:
Hi, oh well here are some more infos:
Pixel 6 Pro
Latest Android 13 Stock ROM
Kirisakura Kernel
I check via "adb shell dumpsys deviceidle".
I set it all your settings on friday and today (monday) there are back to stock values.
Previously I tried settings my own settings on wednesday morning and had stock values on the next day already as well :S
Click to expand...
Click to collapse
That doesn't sound good I'd check right after setting it, so you can see if it was changed at all (which I assume). If it indeed gets set and unset again, you could check this github repo (https://github.com/easz/doze-tweak) at "Caveat".
Those values got reset in the past already, but as it didn't happen to me, I thought Google stopped doing that. Maybe that old workaround still works Otherwise, you'll have to flash a custom rom I guess xD
EDIT: I also recommend looking at values easy to distinguish. For example, "sensing_to" and "locating_to" were nonzero before, now they are zero (for me), so these values are easy to compare for me. The values you need to look at are at the most upper part of the output, but I guess you already knew that
Doomkopf said:
That doesn't sound good
Click to expand...
Click to collapse
Did you ever mess with any other settings using device_config before? Like the number phantom processes, empty or cached processes, ActivityManager tweaks or anything else? Because I assume you did (and using Android 10 or higher) and disabled the settings sync back to the defauls.
Did you ever use the below command?
device_config set_sync_disabled_for_tests persistent
What does the below commands says?
device_config is_sync_disabled_for_tests
Perhaps it says true? If yes that's why your settings aren't changing.
crok.bic said:
Did you ever mess with any other settings using device_config before? Like the number phantom processes, empty or cached processes, ActivityManager tweaks or anything else? Because I assume you did (and using Android 10 or higher) and disabled the settings sync back to the defauls.
Did you ever use the below command?
device_config set_sync_disabled_for_tests persistent
What does the below commands says?
device_config is_sync_disabled_for_tests
Perhaps it says true? If yes that's why your settings aren't changing.
Click to expand...
Click to collapse
You quoted the wrong man
@Utini How'd it work out? If my last response doesn't help, maybe this one helps u
Doomkopf said:
You quoted the wrong man
@Utini How'd it work out? If my last response doesn't help, maybe this one helps u
Click to expand...
Click to collapse
No, logically I quoted the correct man Just wanted to indirectly tell others about the above trick / setting
Doomkopf said:
Hey xda-Community!
I recently wanted to reduce my idle drain and searched for ways to edit Android Doze settings, because I remembered seeing a tutorial that said you can change deviceidle-constants, that dictate how Doze works (how fast it kicks in, how long it kicks in, light/deep doze).
I tried all those old tutorials, but I quickly realized the old ways to change the parameters are deprecated, so I asked people on android.stackexchange.com and someone actually gave me the answer (thanks Andrew) (https://android.stackexchange.com/questions/247680/is-device-idle-constants-deprecated-in-android-12).
This works from Android 12 on and is achieved using a shell.
Commands:
Note: When using an adb shell, you have to put "adb shell" before those commands. I'll just put the bare commands here, you add what you have to add.
Checking the settings:
You can check your current Doze settings (and statistics) with "dumpsys deviceidle".
Changing a setting;
Every parameter has to be set individually. It's not that bad tho, as you only have to do this once.
Syntax is: "device_config put device_idle [KEY] [VALUE]".
One example: "device_config put device_idle light_after_inactive_to 30000"
You can check "dumpsys deviceidle" to see what keys there even are. To help you out, here's an explanation of what each key actually sets. You can also get a visual sense of how the light mode and the deep mode work (not my work, thanks to easz from github).
Spoiler: My recommended settings
First; reset parameters with: "device_config reset trusted_defaults device_idle"
light_after_inactive_to 30000
light_pre_idle_to 120000
light_idle_to 300000
light_idle_factor 2
light_max_idle_to 900000
light_idle_maintenance_min_budget 30000
light_idle_maintenance_max_budget 180000
inactive_to 900000
sensing_to 0
locating_to 0
motion_inactive_to 0
idle_after_inactive_to 900000
idle_pending_to 60000
max_idle_pending_to 120000
idle_pending_factor 2
idle_to 900000
max_idle_to 21600000
idle_factor 2
wait_for_unlock true
I also wrote a windows batch script (works via adb, you have to rename the .txt file to .bat) and a bash file that changes the parameters to my recommendations. See attachments.
Click to expand...
Click to collapse
Hi, currently I am using Naptime by Franco with ADB permissions. I'm not sure, but it should work by using the following options (maybe not only these, but I don't know well if there are other places where Doze options are stored):
inactive_to=2592000000,
motion_inactive_to=2592000000,
light_after_inactive_to=0,
light_pre_idle_to=30000,
light_max_idle_to=86400000,
light_idle_to=43200000,
light_idle_maintenance_max_budget=30000,
light_idle_maintenance_min_budget=10000,
min_time_to_alarm=60000,
min_light_maintenance_time=10000,
wait_for_unlock=0,
quick_doze_delay_to=86400000
It's working very well (I get 2% drain in 8 hours of sleep), but I wanted to try and improve it further, because the App tells you when and how much Doze is enforced and when maintenances are performed.
In my case, from my understanding, I don't need maintanances so often, or maybe I don't need it at all, because all the apps of which I need notifications are in non-optimized battery mode.
For reference, during night it performs 4-6 maintenances circa.
Coming to the point, I wanted to ask you I can use you settings even if they have further options like:
sensing_to 0
locating_to 0
and if I can make your settings even more extreme on some values.
For further reference, I have disabled through adb the "motion_engine", any system gesture and I have the Location always disabled (through UI shortcut, not ADB or advanced options).
NovaProspekt70 said:
Hi, currently I am using Naptime by Franco with ADB permissions. I'm not sure, but it should work by using the following options (maybe not only these, but I don't know well if there are other places where Doze options are stored):
inactive_to=2592000000,
motion_inactive_to=2592000000,
light_after_inactive_to=0,
light_pre_idle_to=30000,
light_max_idle_to=86400000,
light_idle_to=43200000,
light_idle_maintenance_max_budget=30000,
light_idle_maintenance_min_budget=10000,
min_time_to_alarm=60000,
min_light_maintenance_time=10000,
wait_for_unlock=0,
quick_doze_delay_to=86400000
It's working very well (I get 2% drain in 8 hours of sleep), but I wanted to try and improve it further, because the App tells you when and how much Doze is enforced and when maintenances are performed.
In my case, from my understanding, I don't need maintanances so often, or maybe I don't need it at all, because all the apps of which I need notifications are in non-optimized battery mode.
For reference, during night it performs 4-6 maintenances circa.
Coming to the point, I wanted to ask you I can use you settings even if they have further options like:
sensing_to 0
locating_to 0
and if I can make your settings even more extreme on some values.
For further reference, I have disabled through adb the "motion_engine", any system gesture and I have the Location always disabled (through UI shortcut, not ADB or advanced options).
Click to expand...
Click to collapse
Hey; please don't quote the whole post, it doesn't really tell me anything
I don't really understand: What do you want to know from me/what is your question? ^^
Yes, you can make some values more extreme, but you said you already did (less maintenance, more idle)
Doomkopf said:
Hey; please don't quote the whole post, it doesn't really tell me anything
I don't really understand: What do you want to know from me/what is your question? ^^
Yes, you can make some values more extreme, but you said you already did (less maintenance, more idle)
Click to expand...
Click to collapse
Hey, I'm really sorry, I'm new on XDA.
I wanted to know why you have some options valued that I don't, like for example:
light_idle_factor 2
sensing_to 0
locating_to 0
and if using them might improve even more my doze.
Also, even if I have Naptime installed, which already improved things by a lot, I wanted to know if some of my values could be improved further to avoid useless maintenances (like I said I have between 4 and 6 maintenances during night, but I barely need 1).
NovaProspekt70 said:
Hey, I'm really sorry, I'm new on XDA.
I wanted to know why you have some options valued that I don't, like for example:
light_idle_factor 2
sensing_to 0
locating_to 0
and if using them might improve even more my doze.
Also, even if I have Naptime installed, which already improved things by a lot, I wanted to know if some of my values could be improved further to avoid useless maintenances (like I said I have between 4 and 6 maintenances during night, but I barely need 1).
Click to expand...
Click to collapse
Doomkopf said:
You can check "dumpsys deviceidle" to see what keys there even are. To help you out, here's an explanation of what each key actually sets. You can also get a visual sense of how the light mode and the deep mode work (not my work, thanks to easz from github).
Click to expand...
Click to collapse
I linked a xda post that explains every value in detail (first link in second quote/my post);
locating_to and sensing_to: By the pictures (also in second quote/my post), you can see how deep doze works; before going into IDLE mode of deep doze, it goes through a sensing phase (motion detection starts) and locating phasing. Default behavior of doze is to not go sleep when you move the device. This skips this phase (time for detecting motion with sensor is 0). Same with locating; when android notices that you move the device (train, car, ...) via gps (or wifi triangulation, etc) it doesn't go to sleep. This also skips that phase
light_idle_factor 2: This multiplies light_idle_to with 2 everytime if goes thorugh a idle/maintenance cycle until it reaches light_max_idle_to. So this basically doubles your light idle time every cycle until it reaches a max duration (which you can set, I also did in my recommended settings)
In that overview you could also think about how to tweak your values so you get less maintenances during night, as you wanted. Basically you have to make both (deep and light) idle_to's longer. I recommend to increase light idle_to first (more light idle, less maintenance), before going too deep on deep sleep - sometimes your phone needs to do backups at night, etc. Dont be afraid to set a "too large" maintenance window, your phone won't suddenly start to draw much power for nothing. You just have a few seconds/minutes less deep sleep (which is ok, little percentage). Give it something like 2 minutes per night, if you're afraid a backup will take longer, you can even go for 3-4 minutes per night.
Doomkopf said:
I linked a xda post that explains every value in detail (first link in second quote/my post);
locating_to and sensing_to: By the pictures (also in second quote/my post), you can see how deep doze works; before going into IDLE mode of deep doze, it goes through a sensing phase (motion detection starts) and locating phasing. Default behavior of doze is to not go sleep when you move the device. This skips this phase (time for detecting motion with sensor is 0). Same with locating; when android notices that you move the device (train, car, ...) via gps (or wifi triangulation, etc) it doesn't go to sleep. This also skips that phase
light_idle_factor 2: This multiplies light_idle_to with 2 everytime if goes thorugh a idle/maintenance cycle until it reaches light_max_idle_to. So this basically doubles your light idle time every cycle until it reaches a max duration (which you can set, I also did in my recommended settings)
In that overview you could also think about how to tweak your values so you get less maintenances during night, as you wanted. Basically you have to make both (deep and light) idle_to's longer. I recommend to increase light idle_to first (more light idle, less maintenance), before going too deep on deep sleep - sometimes your phone needs to do backups at night, etc. Dont be afraid to set a "too large" maintenance window, your phone won't suddenly start to draw much power for nothing. You just have a few seconds/minutes less deep sleep (which is ok, little percentage). Give it something like 2 minutes per night, if you're afraid a backup will take longer, you can even go for 3-4 minutes per night.
Click to expand...
Click to collapse
Thank you very much, very helpuful!!
Based on your information, I think I understand better how Naptime works. It increases the parameters of Light Doze making them similar to those of Deep Doze, and also increases the duration.
Wouldnt it be easier to just create a routine or mode ?
Like when I am around my work place I have set it to turn wifi off so it dont keep scanning for wifi and stuff.
I personally feel with Samsung most things can be controlled within their phone and developer settings and not to mention their add on apps like Good Guardian and Good lock.
tfn said:
Wouldnt it be easier to just create a routine or mode ?
Like when I am around my work place I have set it to turn wifi off so it dont keep scanning for wifi and stuff.
I personally feel with Samsung most things can be controlled within their phone and developer settings and not to mention their add on apps like Good Guardian and Good lock.
Click to expand...
Click to collapse
I do use Samsung Routines to Enable Offline Mode and Battery Saving at night, which along with Naptime gives me 2% used battery in 8 hours over night, but during the day I can't find a good usage for it.
tfn said:
Wouldnt it be easier to just create a routine or mode ?
Like when I am around my work place I have set it to turn wifi off so it dont keep scanning for wifi and stuff.
I personally feel with Samsung most things can be controlled within their phone and developer settings and not to mention their add on apps like Good Guardian and Good lock.
Click to expand...
Click to collapse
I don't know what it would be easier as; this method?
This basically just configures doze to better fit your needs. It already had values in it before and it was activated before. You can (and should) do all this and still create a routine or mode additionally.
Doze is android's main internal battery saving feature, so tweaking it goes a long way.
Related
UPDATE [11th September 2011]
Modified the SetCPU profiles:
Removed AC-charging Overclock (subject to temperature warnings mentioned in replies)Reduced some MAX values (has added 5 hours of real-world battery use and makes no noticable difference in performance)Added an optional < 101% profile to default the maximum clock speed to 729MHz (does not reduce performance, adds 2 hours effective runtime)Specified the Priority values (which I had forgotten to mention originally)
Introduction - The Desire S Battery Problem
As a fellow Desire S owner, you no doubt agree that it is a lovely phone: sleek, thin, relatively light, feature-filled... almost everything anyone could ever want from a phone!
However...
As a fellow Desire S owner, you no doubt agree that the battery life (on the Stock Sense ROM, regardless of how strict your PWM settings) is rather pathetic.
I have two HTC Desire S phones (one for myself, one for my wife), and both of them have almost exactly the same runtime (give or take a few minutes) when run in identical test conditions... no more than 18 hours (almost all of which with the display turned off) between charges, and less than 8 hours average with light-to-moderate screen-time when in use.
Bottom line: it's rather pathetic, and unacceptable.
Thankfully, we have options now... and this guide provides you with the option I have chosen for my Desire S phones.
Introduction - The Sacrifice
HTC Sense is (to many) considered a very "pretty" GUI, with nice animated transitions, a rounded feel etc, however it comes at a price: it's a battery hog!
I have played with many Sense 2 and Sense 3 ROMs on the Desire S, all of which share the common result of dimished battery runtime...
Bottom line: The simplest way to get more battery life is to sacrifice Sense entirely!
Just to point out: HTC Sense is the only sacrifice this guide makes in the persuit of optimal battery life! Unlike other guides, this one doesn't compromise any other features, or ANY performance (in fact, I've found performance with the setup described here to be even better than the stock ROM... noticably so!)
DISCLAIMER
I cannot (and will not) be held responsible for any losses or damages resulting from your use of this guide or the materials it contains. If you brick your phone, you've done something wrong and the fault is your own.
You should follow this guide with a fully charged battery, and if possible perform all steps involving a PC from a Laptop, with your phone connected via USB to minimize the risks associated with sudden power loss on your mains supply.
Stage 1: S-OFF
Aside from a lucky few whose Desire S came with S-OFF as a factory default, most of us have S-ON handsets.
With S-ON, you cannot flash a custom ROM onto your Desire S... but fear not, as there is now a FREE (and insanely simple) way to unlock our handsets, giving us the precious S-OFF we require.
You will require the Android SDK to be installed on your system, as well as the USB drivers for the HTC Desire S (these are installed as part of HTC Sync, though you should close HTC Sync from the system tray before proceeding as the S-OFF process will refuse to run with HTC Sync running at the same time)
Head on over to http://revolutionary.io/ to download their tool. This guide presumes you are using Windows, though it should be easy enough - if you're a Linux user - to adapt this information for your Linux platform.
Once you press the link to download Revolutionary, you will notice that a form appears asking for certain information. You'll see a screenshot of this below, but before we get to that there's something you must do...
Open a Command Prompt window from the Platform-Tools directory of the Android SDK.
From that Command Prompt window, type adb devices. Presuming you have the HTC Desire S drivers installed correctly, and your handset connected to your PC via USB, you should something like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
LEAVE THIS COMMAND PROMPT WINDOW OPEN, WE'LL NEED IT AGAIN SHORTLY
The third line of text begins with your handset's serial number.... you will need to enter this into the form on the Revolutionary website in order to generate your Beta key:
Once the Revolutionary zip file has downloaded, extract its contents into a folder on your PC (doesn't matter where, so long as you have access to that location).
Run revolutionary.exe following the instructions provided (it's a very quick and simple process... the automated portion of which shouldn't take more than 2 or 3 minutes to complete)
When it prompts you to install the Recovery mod, do it! You will need it for the next stage of this guide!
Your HTC Desire S now has S-OFF, is equipped with a version of ClockWork Recovery, and is ready to recieve the custom ROM! (All is good with the world).
Stage 2: The Custom ROM
IMPORTANT - THIS WILL FACTORY RESET YOUR PHONE (UNAVOIDABLE) SO DON'T FORGET TO BACK UP WHATEVER YOU NEED BEFORE YOU PROCEED WITH THIS GUIDE! YOU HAVE BEEN WARNED!
NOTE You will either need a spare MicroSD card, or to back up your existing MicroSD card and make it accessible to have files written to it from your PC (I use a card reader, but you can always use the USB Mass Storage feature of the phone itself to access the SD card in your phone from your PC)
The custom ROM of choice is NeoLojik's CyanogenMod 7, lovingly and paintakingly prepared especially for our HTC Desire S handsets, with quite probably the most prompt and spectactular support from NeoLojik himself.
I have chosen NeoLojik's CM7 ROM because it has proven (after exhastively testing other ROMs for the Desire S) to provide me with the very best battery performance, as well as all of the settings you will tweak as part of this guide.
Download (from the ROM's thread linked above):
The latest version of his ROM
The recommended Tiamat Kernel
The recommended version of the Google Apps package
To save time later, download The Android Market 3.1.3 APK
(You can download the APK from your phone directly after you've completed this portion of the guide, if you prefer)
Place the three ZIP files, as well as the Android Market APK, on the root folder of your MicroSD card (by "root" I mean the initial path of the SD card, which is whatever drive letter it mounts as on your Windows PC - e.g. "H:\")
Now, with your phone still connected to your PC via USB (and the SD card put back into your phone, if required), return to the Command Prompt window we used earlier and type adb reboot recovery
Now direct your attention to your phone
Once the Recovery Menu has loaded (should take about 30 seconds) we will follow some simple instructions below... but first, a few points on how to use Recovery:
Use the Volume Up and Down buttons on your handset to highlight one of the displayed options
Use the Power button to trigger the highlighted option.
wipe data/factory reset
wipe cache partition
apply update from sdcard
choose zip from sdcard
update-cm7.1.0-RC1-DesireS-Nexx-signed.zip (or whatever the ROM's filename is at your time of downloading... it will change as the ROM evolves)
apply update from sdcard
choose zip from sdcard
Tiamat_Saga-v1.1.2.zip (or whatever the filename is for the recommended Tiamat kernel at your time of downloading)
apply update from sdcard
choose zip from sdcard
gapps-gb-20110613.zip (again, filename might be slightly different for you)
Remembering with each selection to navigate to the "YES" option in the confirmation menu (this exists to prevent you from accidentally flashing the wrong file onto your phone)
Now, from your PC (or from the Recovery menu... doesn't matter which), you want to reboot your phone! To do this from the PC, you will just type adb reboot into the Command Line window we used previously.
Your phone will now boot with the new ROM (CyanogenMod), and has been factory reset (so you'll have to run through the first-run configuration wizard).
NOTE: Don't be scared if (after the boot animation disappears) the screen remains black for a minute or so! The first boot of the new ROM (especially with the Tiamat Kernel) does take a bit longer than every subsequent boot there-after. Just give the phone a few minutes, and press the Power button. You SHOULD see the Lock screen once the device is ready!
Run through the first-run wizard following instructions provided (fairly strait forward), though keep in mind that (at the time of writing) the wizard does not prompt for a WiFi connection until AFTER it attempts to log in to your Google account! Fear not, though, as when it fails to connect to your Google account (presuming you don't have Mobile Data available to you), it'll then prompt for a WiFi network and repeat the Google account login afterwards.
Once you have completed the first run config, open the "File Manager" app included as part of the ROM.
Navigate to /sdcard and run the com.android.vending-3.1.3.apk file. You'll be prompted to allow unknown sources, you want to tick that box and click on the APK again.
Once you've installed this, you will be running the latest (and greatest) version of Android Market, which (amongst other things) enables you to use a different Google account for your Apps (very useful if you want to install your paid applications on your wife's phone, as I have)
Welcome to CyanogenMod!....
Stage 3: Battery-saving Mega Settings [Menu-by-Menu]
The Settings I'm providing you here are the results of countless hours of experimentation (as well as logic and common sense). They have proven to provide the best degree of battery runtime with absolutely no performance or feature sacrifice!
If a menu or entry within a menu isn't mentioned, it's because it has no bearing on power saving!
Wireless & networks
Wi-Fi settings
Network notification = OFF
Press the Menu button, then Advanced
Wi-Fi sleep policy = NEVER
Call settings
Vibrate on answer = OFF
Vibrate every 45 seconds = OFF
Vibrate on hangup = OFF (NOTE: I leave this ON as my one concession as it's the only way you will know if a call drops out on you unexpectedly!)
Vibrate call waiting = OFF
Always use proximity = OFF
Enable sensor rotation = OFF
Voicemail notifications = ON (it doesn't save power, but seriously... you want it on!)
CyanogenMod settings
Display
Automatic backlight
Light sensor filter > Enabled = OFF (If enabled, unnecessarily drains more battery life! The feature itself is pointless as there is no difference to the UX with it Enabled or Disabled!)Light levels
Use custom = ON
Screen dim level = 14
Allow light decrease = ON
Edit other levels...
This is what I consider to be the most optimal set of levels:
Lower | Screen | Buttons
0 | 21 | 2
160 | 31 | 2
255 | 35 | 2
320 | 40 | 0
640 | 50 | 0
1280 | 75 | 0
2600 | 90 | 0
5800 | 130 | 0
8000 | 200 | 0
10000 | 255 | 0
Press Save & apply (scroll to the top to find the button)
NOTE: You may want to play around with some of the values in this table, as screen brightness is not a "one size fits all" affair, and what I can see clearly might not be so clear for you (or vice-versa). Basically, use those levels as a starting point, and tweak them from there until you find the best settings for you in various lighting conditions.
I will say this, you don't want to set the Buttons value above 0 if you can see the buttons even faintly at a given light level. The backlighting for the buttons is a surprising battery drain (it's calculated as part of the Screen's power consumption in the Battery Usage menu). Bottom line: if you don't need any lighting on the hardware buttons in order to use them even in pitch blackness, then set the value of Buttons for each set in the table to 0 and squeeze more life out of your battery!
Performance (press OK when the warning is displayed)
CPU settings
Available governors = SMARTASS ("SMARTASS" has been designed specifically [and brilliantly] to scale the CPU frequency with such a perfect balance of performance-on-demand versus power saving... it's the perfect choice!)
Min CPU frequency = 192
Max CPU frequency = 1036 (We'll be using SetCPU [full version, bought from the Market] to set up some magical CPU profiles later in this guide, saving us LOTS more battery life!)
Set on boot = ON
Sound
Haptic feedback = OFF (Remember: The phone's vibrator consumes more power than playing a beep or other short tone through the speaker at even the highest volume!)
Accounts and sync
Auto-sync = OFF (Auto-sync being disabled saves both battery power, as well as bandwidth on your Mobile Data tarif [2G and/or 3G dependant on carrier]. Really, you should just "sync on demand" as and when you want/need to!)
This concludes the Settings portion of the guide!
Stage 4: SetCPU (for ROOT users) configuration
SetCPU for ROOT Users is available for on the Android Market for just £1.25 (or $1.99 USD). Not only does this program enable you to overclock/underclock your phone's CPU, but more importantly it enables you to provide Profiles, to scale the CPU based on the operational status of your phone.
This is well worth the infintismal pricetag, as the potential power savings (at no performance cost) is more than significant!
Open SetCPU, go to the Profiles tab:
Enable = ON
Notifications = ON (Really this is up to you! I like to have notifications for when the profile is changing to ensure that the CPU is scaling properly, and to ensure that my profiles are the best they can be for performance/battery balance)
Add Profile
Profile = Charging AC
Max = 1036800 (Potentially, you could set it up to 2GHz, but I have stability (and heat) concerns, and I can't possibly see any circumstance where 2GHz would be remotely useful! If you do elect to overclock (particularly whilst charging), you will need to add a profile (with 100% priority) to drop the Max value if the temperature exceeds 45 C)
Min = 192000
Scaling = smartass
Press Save
Add Profile
Profile = Charging USB
Max = 1036800 (Basically 1GHz [original] CPU clock. We don't want to bleed into the minimal input of power provided by USB, so this is the best setting to use)
Min = 192000
Scaling = smartass
Press Save
Add Profile
Profile = Battery <
Battery < = 75%
Max = 652800
Min = 192000
Scaling = smartass
Press Save
Add Profile
Profile = Battery <
Battery < = 50%
Max = 576000
Min = 192000
Scaling = smartass
Press Save
B]Add Profile[/B]
Profile = Battery <
Battery < = 30%
Max = 422400
Min = 192000
Scaling = smartass
Priority = 80
Press Save
Add Profile
Profile = Screen Off
Max = 345600
Min = 192000
Scaling = smartass
Priority = 60
Press Save
Add Profile
Profile = Time
Time = 01:00 - 08:00 (NOTE: Substitute the given range with whatever your daily sleeping hours are!)
Max = 345600
Min = 192000
Scaling = smartass
Priority = 70
Press Save
The following profile is optional... and (if used) would specify your default clock speed
Add Profile
Profile = Battery <
Battery < = 101%
Max = 729600
Min = 192000
Scaling = smartass
Press Save
Feel free to experiment with other profiles as well! Perhaps you may want to procedurally reduce your CPU speed based on Battery % in a more gentle way... this is certainly possible, and would squeeze even more life out of your battery.
You should also feel free to use lower MAX values for each setting (I would strongly advise against higher values) if you feel that the lower clock speed makes little-to-no noticable difference in performance as you use your phone.
Personally, I notice no difference between 729600 and 1038600!
Stage 4: Recalibrating your Battery
Install the Battery Calibration app (FREE on the Android Market).
If your phone isn't charged, charge it up so that it is showing 100% (with the Green LED lit).
Run Battery Calibration and press the Battery Calibration button. Immediately unplug the power/USB cable from your phone, and allow it to run (as normal) until fully discharged.
Once the phone has switched itself off, plug it into the AC cable (using the mains charger).... and LEAVE YOUR PHONE SWITCHED OFF until the LED indicator is lit green!
You may want to repeat the discharge/recharge cycle one or two more times (as many people claim that this provides a better calibration)... though really that just entails running your phone on the battery until it is fully discharged, then allowing it (whilst switched off) to fully recharge on the mains adapter (AC)... which is not what most people would normally do as a routine.
Potential Stage 5: Tasker
Tasker (£3.99 on the Android Market) enables you to create profiles which automatically change various settings based on one or more given criteria. This even includes the ability to switch on and off features of your phone such as WiFi, Bluetooth, GPS, GSM, Mobile Data and Airplane Mode.
By creating suitable Tasker profiles, you can squeeze even more battery life out of your phone!
If it's of benefit to people (let me know in the comments) I can expand this guide to include step-by-step instructions on creating the various profiles I would recommend in order to squeeze more battery runtime out of your phone without sacrifising features/functionality.
General Battery Storage/Maintenance Advice (Applies to all Lithium-Ion Batteries, including those used in Laptops)
To prolong the operational lifespan of your battery, you should not really allow your battery to run for very long below 50% charge, as "topping up" a half-charged battery generates less wear and tear on the battery, prolonging its overall lifespan.
NEVER leave your phone fully discharged for more than an hour, or the LiIon cells will begin to degrade, meaning your battery will never be able to physically hold as much charge. Indeed, the longer you leave a discharged battery, the less overall capacity your battery will retain.
NEVER store your battery (even if the phone is running at the time) in cold conditions! As a general rule of thumb, if it's "a little chilly" for you, it's unhealthy for the battery!
Both of the above tips form respectively the Number 1 and 2 causes of battery death! Don't let your battery become another statistic!
If - like me - you have one or more "spare batteries", you will likely be tempted to store them when they are fully charged (100%). This sounds like a good thing to do, but actually it can have (to a slightly lesser degree) the same damaging effect on the battery as leaving it fully discharged for any prolonged period of time!
The absolute best level of charge at which you should store a battery is at 50%, or as close there-to as possible!
Dependant on how often you find yourself recharging your battery, you should recalibrate it between every 3 to 6 months (the more often you discharge/recharge, the less often you should recalibrate).
Also, you should ALWAYS recalibrate after having flashed a new (or updated) ROM and/or Kernel!
My results using the exact configuration [excluding Tasker] detailed in this guide...
As I stated above, with the way I use my Desire S, I was lucky to get 8 hours of what I would call "light-to-moderate" use whilst running on the battery!
With the configuration detailed in this guide, I have now had a successful "100% to discharged" usage of 46 hours (under the exact same usage conditions as when I was using the stock ROM factory-installed on the phone (and updated OTA ~ a week ago).
This is a VERY significant improvement, though I must stress that results will vary heavily based on how much (or what) software you're running on the phone, how often you're interacting with it, how long you spend in calls etc.
Basically, every phone is different, and every operator (me, you, everyone) is different.
Please also keep in mind that your phone won't "settle in" to the new settings in terms of battery runtime until you've done 2 or 3 discharge/recharge cycles (as explained in the Battery Calibration portion of this guide)
Conclusion
There are plenty of third-party ROMs out there, and (obviously) I can't physically test them all! I have tested what I believe anyone would consider to be a perfectly suitable number (more than a dozen now), and have found the exact combination detailed in this guide to provide the very best battery runtime for me.
I understand that some of you will likely have your own ROM preference (for various reasons), but I hope that at least some sections of this guide will be useful to you.
If you just want to get the very best battery performance out of your Desire S, and either don't particularly care what ROM you use, or (like me) happen to love Cyanogen anyway... this guide will fit you like a glove!
Need any more advice?
No problem... post your comments and questions as a reply to this guide, and I'll answer anything I can, as promptly as possible (please consider that I have a company to run, and a life beyond the Internet... so replies might not always be "instant")
I hope you like this guide, and more importantly... I hope you enjoy your new-found battery runtime!
Unfortunately, I'm a Sense fan. ...so will take persuding to move away from the interface, as been using it for many years, but, I still appreciate a piece full of insight and advice written for the communities benefit. Well done and thanks for sharing.
I'll reference this in the development INDEX next to CM7 ROMS
ben_pyett said:
Unfortunately, I'm a Sense fan. ...so will take persuding to move away from the interface, as been using it for many years, but, I still appreciate a piece full of insight and advice written for the communities benefit. Well done and thanks for sharing.
I'll reference this in the development INDEX next to CM7 ROMS
Click to expand...
Click to collapse
Yeah, I can understand why so many people strictly adhere to Sense ROMs... for me the "slight prettiness" of Sense doesn't justify the hammering of the battery... especially as I actually preffer the L&F of Cyanogen anyway
If I have gotten 18 hours with almost always screen off I returned the phone. With nomal usage my phone last more than one day. Keeping the screen almost always off last almost 2 days with wifi and sync turned on (to be honest, never reached that again). ROM is whether LBC or rooted stock whith stock HTC kernel. So I can find any problem there. Nevertheless, this is a smartphone, and I always have a charger with me
I will try CM and what the battery life is like.
Profile = Charging AC
Max = 157440 (Potentially, you could set it up to 2GHz, but I have stability concerns, and I can't possibly see any circumstance where 2GHz would be remotely useful!)
Min = 192000
Scaling = smartass
Press Save
Fried CPU kgo. Overclock + Charging = Excessive heat being generated.
zeekiz said:
Profile = Charging AC
Max = 157440 (Potentially, you could set it up to 2GHz, but I have stability concerns, and I can't possibly see any circumstance where 2GHz would be remotely useful!)
Min = 192000
Scaling = smartass
Press Save
Fried CPU kgo. Overclock + Charging = Excessive heat being generated.
Click to expand...
Click to collapse
I have tested this setting with my own phone, and the heat increase was LESS than 1 Celcius (infintismal)... sure, if you wanted, you could use a lower value.
Its your call, your thread, I just feel that it isn't a good idea. At least even consider placing a warning adjacent to it.
LaKraven said:
I have tested this setting with my own phone, and the heat increase was LESS than 1 Celcius (infintismal)... sure, if you wanted, you could use a lower value.
Click to expand...
Click to collapse
You could add a setcpu profile for limitting the temperature. I dont overclock, but when im using my phone while charging, it gets hot, so I limit the temperature at 41.1 C , so 768mhz - 245mhz , on demand.
lbc ROM, stock kernel
zeekiz said:
Its your call, your thread, I just feel that it isn't a good idea. At least even consider placing a warning adjacent to it.
Click to expand...
Click to collapse
I've updated the guide (see the update notes at the very top of the post). The on-AC overclock setting has been removed, and I have placed a warning about overclocking next to it.
Updated the post to address a typo in one of the SetCPU profiles (I missed a 0 from the end of 345600).
I will have done this process by tomorrow, I'm sure - even bought Tasker. - Hoping I wont damage something in the process since I've never dealt with an HTC phone before. :/ Since my mom bought it to me as a present, she just peeks in from time to time to check wth am I doing with it - gotta keep a satisfied grin on my face all the time while I'm figuring how to fix this problem lolz
Really you just need to follow instructions (read everything through at least twice before you begin), be patient... and double-check everything you're abuot to do before you do it.
You can't do any more than that!
I've flashed both of these phones so many times now, and the only mistake I ever made was forgetting to clear the cache (Which results in an infinite boot loop or "soft brick", easily recovered by constantly typing "adb reboot recovery" in your Command Prompt, which will eventually make the phone re-enter recovery mode (exiting the infinite boot loop), at which point you can wipe, clear cache, reflash, and relax!
LaKraven said:
Really you just need to follow instructions (read everything through at least twice before you begin), be patient... and double-check everything you're abuot to do before you do it.
You can't do any more than that!
I've flashed both of these phones so many times now, and the only mistake I ever made was forgetting to clear the cache (Which results in an infinite boot loop or "soft brick", easily recovered by constantly typing "adb reboot recovery" in your Command Prompt, which will eventually make the phone re-enter recovery mode (exiting the infinite boot loop), at which point you can wipe, clear cache, reflash, and relax!
Click to expand...
Click to collapse
Funny, so true, in fact, did just that myself about two minutes ago while testing another ROM, meant trip to PC, plug in, power on, and then sorted adb reboot recovery
Swyped from HTC Desire S using XDA Premium
ben_pyett said:
Funny, so true, in fact, did just that myself about two minutes ago while testing another ROM, meant trip to PC, plug in, power on, and then sorted adb reboot recovery
Swyped from HTC Desire S using XDA Premium
Click to expand...
Click to collapse
Good to know I'm not the only one! It's such an easy step to overlock... just a good job it's also the least fatal mistake to make!
and then this
.. Ther is no Path in User, but there is in System...Geez, so tired..What do....:/ I'm all set to flash, just this thing I think...
You need to reinstall Java JDK.
This has happened to me before!
LaKraven said:
You need to reinstall Java JDK.
This has happened to me before!
Click to expand...
Click to collapse
Thx man I did that, I also don't have any command prompts in here :
C:\Program Files (x86)\Android\android-sdk\platform-tools
Bombastc said:
Thx man I did that, I also don't have any command prompts in here :
C:\Program Files (x86)\Android\android-sdk\platform-tools
Click to expand...
Click to collapse
Open Windows Explorer, navigate to C:\Program Files (x86)\Android\android-sdk\platform-tools
Hold down SHIFT and RIGHT-CLICK in on that folder
Click "Open command line window here"
You're then ready to start using ADB commands
LaKraven said:
UPDATE [11th September 2011]
Potential Stage 5: Tasker
By creating suitable Tasker profiles, you can squeeze even more battery life out of your phone!
If it's of benefit to people (let me know in the comments) I can expand this guide to include step-by-step instructions on creating the various profiles I would recommend in order to squeeze more battery runtime out of your phone without sacrifising features/functionality.
Click to expand...
Click to collapse
I would really like that. Yesterday followed your guide and learning new things as i went about the CyanogenMod. I'm curious now how far my battery will bring me :-D.
At the moment i'm using the trial version of phoneweaver and automateit, which are nice programs, but if tasker is more efficient although having a steeper learning curve, i will switch in an instant.
shizuku said:
I would really like that. Yesterday followed your guide and learning new things as i went about the CyanogenMod. I'm curious now how far my battery will bring me :-D.
At the moment i'm using the trial version of phoneweaver and automateit, which are nice programs, but if tasker is more efficient although having a steeper learning curve, i will switch in an instant.
Click to expand...
Click to collapse
As a tasker convert myself, I can also say that you'll read a great review of some of its functionality and a slightly biased review of the product by wnp_79 as part of his [GUIDE] Update 28/06/11: HTC Desire S Guide (V1.03) For Newcomers to Android which is in a sticky at the top of the forum.
Have you ever tried having your phone lay on a table for some time and when you come back to pick it up, it had almost burned through the table because of the battery heat do to an app running the CPU on a constant 100%?
Or have you tried waking up two hours to late for work, because you alarm did not go off do to the phones battery running dry during the night?
Bad applications or problems with some back-end processes is a problem for most people. To get some help with this problem, I have been running the Watchdog app for the last 3 years. It is a great application that will alert you whenever an app or a process is running wild in the background. However there is one issue with this app. It only alerts you when there is a problem. This does not help much if you are to far away from the phone, if your phone is in silent mode or if you are sleeping.
I wrote the developer of the app to see if there was any plans for making a tasker plug-in so that profiles can be made to handle this. I have yet to get an answer. In the mean time, I have made a complete watchdog profile for tasker that does what the watchdog app does, only this profile will auto terminate any wild processes if the screen is turned off. If the screen is on, it will to what the watchdog app does and alert you of the problem. It could be that you was playing a game or running a benchmark, so auto terminate while the screen is on, would not be a good idea.
The profile however, will drain more battery than the watchdog app does. Because of this I have set the check interval for 15 minutes instead of the 5 minutes I used on the app. This reduces the drain to about the same amount.
And to save even more power, I have included a Data control profile that will turn off data/wifi/sync when the screen is off, as long as you are not connected to a power source or if you are downloading, uploading or streaming. In this case the profile will wait until this state changes before turning off anything. And while off, tasker will alow sync (email and such) once every 15 minutes.
Both profiles is included in the attached download below.
Important!
The watchdog profile will need a proper busybox installed with proper symlinks for sed, grep and awk. It will also need a toolbox that supports top and ps with arguments.
You can run the update script from the Busybox Installer thread to make sure that your phone will work with this profile.
Changelog (2012-11-18)
Reduced the time from where the screen turns off, to the time Data/Sync is disabled
Data/Sync will now turn back on when the screen is unlocked rather than turned on. No need to waste power if you just want to check the time or notifications (Which can be done from lock screen in Android 4.x)
Fixed the 15 minutes data check when the screen is off. It only executed once after the screen was turned off
_______________________
Wow! Your watchdog implementation looks great! Will adopt it on my phone over the weekend.
Now I have only one battery-drain-controlling dream left - being able to find out the apps holding the wakelock for too long to kill them automatically. The reason for this is that sometimes I find battery drain to go from usual 1% per hour to 10% per hour just because some badly written app has not released the wakelock.
Alte.78 said:
Wow! Your watchdog implementation looks great! Will adopt it on my phone over the weekend.
Now I have only one battery-drain-controlling dream left - being able to find out the apps holding the wakelock for too long to kill them automatically. The reason for this is that sometimes I find battery drain to go from usual 1% per hour to 10% per hour just because some badly written app has not released the wakelock.
Click to expand...
Click to collapse
Are you talking about BetterBatteryStats? I know that it tells you exactly how long since a point in time (which can be manually customized) that certain programs/tasks hold wakelocks.
But not sure about any kind of specific stratification that displays only programs that hold the lock too long to kill them automatically (assuming that's what you are wanting?).
And OP, these sound great - I'm importing them as we speak :highfive:
dk_zero-cool said:
Important!
The watchdog profile will need a proper busybox installed with proper symlinks for sed, grep and awk. It will also need a toolbox that supports top and ps with arguments.
_______________________
Click to expand...
Click to collapse
I got all excited when reading about this until I read the Important section. After watchdog everything started getting confusing . I know I read somewhere about busybox but the other terms are all new to me...could someone explain it with a little more details on what I have to get/set up in order for this to work??
2am said:
I got all excited when reading about this until I read the Important section. After watchdog everything started getting confusing . I know I read somewhere about busybox but the other terms are all new to me...could someone explain it with a little more details on what I have to get/set up in order for this to work??
Click to expand...
Click to collapse
The profile is using some linux commands to get a list of all current processes and their CPU usage. These commands needs to be available in order for the profile to work.
If you are using a custom ROM, then you are most likely to have all what is needed. Especially if you are using a more current custom ROM.
In order to test this, download a terminal app or enter an ADB shell (Hope you know what this is) and see if the command line
Code:
top -n 1 | sed -e 1,7d | grep -e '[0-9]\+%' | awk '{print $3}'
returns anything. If it does (Except errors), then you will have all that is needed.
Alternatively you could check my Better Busybox Integration thread which will make sure that your phone is setup to work with this.
dk_zero-cool said:
The profile is using some linux commands to get a list of all current processes and their CPU usage. These commands needs to be available in order for the profile to work.
If you are using a custom ROM, then you are most likely to have all what is needed. Especially if you are using a more current custom ROM.
In order to test this, download a terminal app or enter an ADB shell (Hope you know what this is) and see if the command line
Code:
top -n 1 | sed -e 1,7d | grep -e '[0-9]\+%' | awk '{print $3}'
returns anything. If it does (Except errors), then you will have all that is needed.
Alternatively you could check my Better Busybox Integration thread which will make sure that your phone is setup to work with this.
Click to expand...
Click to collapse
well I entered that command and got
invalid argument "-n". and then a bunch of other lines after that...and I checked your other thread and there's even more code language ...ugh, I think this is one of those threads that I need to leave alone because it's too much for me to handle...sucks too cause your set up sounds really awesome...thanx for trying to help me though
2am said:
well I entered that command and got
invalid argument "-n". and then a bunch of other lines after that...and I checked your other thread and there's even more code language ...ugh, I think this is one of those threads that I need to leave alone because it's too much for me to handle...sucks too cause your set up sounds really awesome...thanx for trying to help me though
Click to expand...
Click to collapse
I will make a more simple command fix for you tomorrow that will make your phone work with this without having you enter any code.
dk_zero-cool said:
I will make a more simple command fix for you tomorrow that will make your phone work with this without having you enter any code.
Click to expand...
Click to collapse
ah thank you soo much!!!
2am said:
ah thank you soo much!!!
Click to expand...
Click to collapse
I have updated the Busybox Installer script to make sure that it will work on newer devices other than MTD, and I have added a custom toolbox binary that will contain the proper options for these profiles.
Just check the first post at the buttom in the Important section. Fallow the link, download the installer and run it in your recovery. After that you can import the profiles from this thread into your Tasker application.
I have problem on my Note 10.1,.when is my battery on 5 % i get low brightness.Does anyone know how to fix this,to set brightness on max when is battery low????
Samsung galaxy note 10.1 n8000 4.1.2
dekar123 said:
I have problem on my Note 10.1,.when is my battery on 5 % i get low brightness.Does anyone know how to fix this,to set brightness on max when is battery low????
Samsung galaxy note 10.1 n8000 4.1.2
Click to expand...
Click to collapse
that's a feature. Charge it
shaun298 said:
that's a feature. Charge it
Click to expand...
Click to collapse
how???? im unable to change brightness when battery is 5 %
dekar123 said:
how???? im unable to change brightness when battery is 5 %
Click to expand...
Click to collapse
Dud, just charge it up.
Aluyi said:
Dud, just charge it up.
Click to expand...
Click to collapse
It's not a solution,my chinese 9` inch tablet whith 5 % off battery could stand mabye 20 minutes,is that on all note 10`1 tablets???
Does anyone know how to get full brightness when my battery is 5 %???????
There is no way to change it.
It propably protects the battery to become too empty without getting your device plugged in time. "Too empty" means that sometimes if you drain your litium battery empty totally, it wont start to charge it at all. So it is there for protecting you and your device without having next problem not being able to charge it.
Sent from my GT-N8000 using Tapatalk 4
enigma_x said:
There is no way to change it.
Click to expand...
Click to collapse
Have you ever investigated this subject that you are so sure? If you cannot do it - don't assume that no one can.
I don't also see any relation between dimming the screen and protecting the battery of getting broken. If 5% level is a level on which the battery should be charged because of the damage risk, then it would be absurd to dim the screen (ie take an action aimed at saving the remaining power so the user can work a few minutes longer on the last remaining 5% until it reaches 0 or 1% = drain battery even more = in your theory: increasing the risk of the damage even more), and not to turn off the device at all. Be aware, that Samsung indeed implemented a protection aimed to secure the user of the risk of breaking the battery (well, I don't think it's the clue anyway - iI guess the main purpose is in preserving user of data loss/filesystem corruption, which is possible to occur when the system is being shutdown in an "immediate" way, without chance to perform shutdown sequence properly) due to full discharge, but it is triggered on 0 - 1% level and is resulting in starting a "regular" system shutdown, aimed mainly to save all the working data before user loses it *** See comment at the very end of my post for additional info about changing this behavior, which is confirmed to work by myself...
It is almost ALWAYS possible to mod behavior of the system, especially by decompiling system apps and modyfing smali, which is not extremely difficult/impossible by the way, as the community has released such a solutions for many issues/feature requests, concerning even n8000 itself (ink lockscreen, syscope disable, power menu, flashable themes...).
In this case, I can see another possibility, which is even less intrusive to the system; AFAIR the percentage level of 5% is not embedded in some system or framework app, but it is defined in one of the system's apps preferences (guess settings provider? dont remember...), in sqlite database. And sqlite database can be easily accessed and its content can be modified by sqlite tools, ie sqlite3 binary from command line, and even some apps from play store. Then, you shall be able to lower the value to, for example, 1%, so the screen backlight will be turned off with further delay, ie. at REALLY critical power level of 1%..
EDIT: Didn't found above setting, dont have time for this, but found another one (at database lying at com.android.provider.settings) - "dim_screen" which is set 1 by default. Maybe changing it to 0 with any SQL editor will force NOT to dim screen at all.
An for the begin, I have a solution that is very very very possible to work...
As for now, I have not tested it, especially if the critical battery level setting (default 5%) has direct relation to the battery level on which screen is dimmed, but I am ALMOST sure about it, as the crtitical level setting that I am talking about (no matter where it is stored...) is recognized system-wide.
Oh, almost forgot, the solution!!!
Install Xposed Framework (search for it on xda if u dunno what it is) + module XBatteryThemer - apart of other options, it has the option to lower critical battery level (as well as two other levels, which determine displaying the low battery alert popup) to as low as 1%. Your screen shall no longer dim at 5%.
*** actually, there is another one Xposed module (CriticalBatteryShutdown, or something...?) which can force the device not to turn off when battery reaches some level between 0 and 1%, which is arbitrary action by default. With this mod the device is working untile theres really no power left, which sometimes can give you additional 10 minutes. A
dekar123 said:
Does anyone know how to get full brightness when my battery is 5 %???????
Click to expand...
Click to collapse
Please correct me if I´m wrong, does that make sense to you if your battery is 5% and you thinking of raising the slider higher ? Maybe you should check your energy saving settings. My two cents.
esgie said:
Have you ever investigated this subject that you are so sure? If you cannot do it - don't assume that no one can.
I don't also see any relation between dimming the screen and protecting the battery of getting broken. If 5% level is a level on which the battery should be charged because of the damage risk, then it would be absurd to dim the screen (ie take an action aimed at saving the remaining power so the user can work a few minutes longer on the last remaining 5% until it reaches 0 or 1% = drain battery even more = in your theory: increasing the risk of the damage even more), and not to turn off the device at all. Be aware, that Samsung indeed implemented a protection aimed to secure the user of the risk of breaking the battery (well, I don't think it's the clue anyway - iI guess the main purpose is in preserving user of data loss/filesystem corruption, which is possible to occur when the system is being shutdown in an "immediate" way, without chance to perform shutdown sequence properly) due to full discharge, but it is triggered on 0 - 1% level and is resulting in starting a "regular" system shutdown, aimed mainly to save all the working data before user loses it *** See comment at the very end of my post for additional info about changing this behavior, which is confirmed to work by myself...
It is almost ALWAYS possible to mod behavior of the system, especially by decompiling system apps and modyfing smali, which is not extremely difficult/impossible by the way, as the community has released such a solutions for many issues/feature requests, concerning even n8000 itself (ink lockscreen, syscope disable, power menu, flashable themes...).
In this case, I can see another possibility, which is even less intrusive to the system; AFAIR the percentage level of 5% is not embedded in some system or framework app, but it is defined in one of the system's apps preferences (guess settings provider? dont remember...), in sqlite database. And sqlite database can be easily accessed and its content can be modified by sqlite tools, ie sqlite3 binary from command line, and even some apps from play store. Then, you shall be able to lower the value to, for example, 1%, so the screen backlight will be turned off with further delay, ie. at REALLY critical power level of 1%..
EDIT: Didn't found above setting, dont have time for this, but found another one (at database lying at com.android.provider.settings) - "dim_screen" which is set 1 by default. Maybe changing it to 0 with any SQL editor will force NOT to dim screen at all.
An for the begin, I have a solution that is very very very possible to work...
As for now, I have not tested it, especially if the critical battery level setting (default 5%) has direct relation to the battery level on which screen is dimmed, but I am ALMOST sure about it, as the crtitical level setting that I am talking about (no matter where it is stored...) is recognized system-wide.
Oh, almost forgot, the solution!!!
Install Xposed Framework (search for it on xda if u dunno what it is) + module XBatteryThemer - apart of other options, it has the option to lower critical battery level (as well as two other levels, which determine displaying the low battery alert popup) to as low as 1%. Your screen shall no longer dim at 5%.
*** actually, there is another one Xposed module (CriticalBatteryShutdown, or something...?) which can force the device not to turn off when battery reaches some level between 0 and 1%, which is arbitrary action by default. With this mod the device is working untile theres really no power left, which sometimes can give you additional 10 minutes. A
Click to expand...
Click to collapse
Did I say that 5% is the minimum level? No, I didnt. All I said it is, it gives you more time and IF you drain your battery EMPTY, it may not charge. Of course there are self-protection manager already, but as you know, they dont always work as they should. There are several questions on net what to do when the phone doesnt start charging because they drained the battery to a state to auto-shut off. I dont understand why anyone would like to drain the battery almost empty and in a bad scenario you have a dead battery. Will it happen with your device? Maybe or maybe not. And it is not even healthy for a lithium battery to let it full disharged/cycled on everytime.
And yes I have read that there are apps that allows you to change this but only if your device is rooted. Never tried, mine is not rooted.
This will explain it very well: http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries
Sent from my Galaxy Note 10.1 (N8000).
---------- Post added at 07:01 PM ---------- Previous post was at 06:55 PM ----------
Aluyi said:
Please correct me if I´m wrong, does that make sense to you if your battery is 5% and you thinking of raising the slider higher ? Maybe you should check your energy saving settings. My two cents.
Click to expand...
Click to collapse
No, you cannot set the brightness by a slider when the battery level is 5%. It automatically goes to a state to save the battery. It is built in the system.
Sent from my Galaxy Note 10.1 (N8000).
Deleted
So I've been browsing for the past 2 hours on wifi and these are my stats.
Battery: 2200 mAh
SoC: Extremely Power Hungry MT6591
Brightness: Adequate
Now at 35%, the phone was being used pretty much constantly (chrome, a movie in mx player, imgur, 2 hours on whatsapp, light CoC)
Here are the results.
19%. And this is the max I could manage. Going to plugin now.
Testing out now...Thanks!!
---------- Post added at 12:10 PM ---------- Previous post was at 12:02 PM ----------
Adithya FRK said:
Blue Blood Modified Battery Profile (SOT) for L Speed + GovTuner
NOTE: This profile and the configurations for GovTuner is entirely based upon the need for more SOT or 'screen-on-time'. Performance improvements are not the 'primary' objective, but there are some.
Name: Sorry but I couldn't make up a better one. LOL.
This profile will try its best to give you a better screen on time taking into consideration there will be some decrease in performance (some visible, some not).
Installation Instructions
Part 1 - L Speed
1. Download the .zip file attached.
2. Open it with any file manager/archiver and you should see the profile file.
3. Goto your SD Card -> LSpeedBackup (create folder if it doesn't exist) and paste the file inside the .zip there.
4. Open L Speed -> Backup -> Restore: Blue Blood.
L Speed's done.
Part 2 - GovTuner
1. Visit GovTuner's XDA thread and download the latest zip file.
2. Flash the zip file and install 'Terminal Emulator' from playstore.
3. Open 'Terminal Emulator', and type 'su' and enter. Grant the SuperSU request and you will now be in a root shell.
4. Now type 'govtuner' and enter.
5. Choose battery profile by typing '1' and touching enter.
6. After activating battery profile, enter 'i' and enter '2' as the value.
7. Now you can press the 'X' on the top right hand corner to close the window.
GovTuner is now all setup.
You are pretty much ready now. Enjoy your extra SOT!!
I SERIOUSLY RECOMMEND USING AppOpsXposed, Greenify, Amplify and Powernap with this to get rid of the idle drain because in the end that too translate to a better SOT. :highfive: (The below results are obtained with the help of those applications too)
My phone which is an extremely battery hungry thing needs to be charged atleast 3 times a day to last from morning to night. With this I've managed to get away with just 1 charge for 14 hours (4-4.5 hours of SOT vs 1-2 hours).
Please do reply back with your experiences. I'm waiting for some happy faces. :fingers-crossed:
Also criticisms. :angel:
Credits: Debuffer (GovTuner), Paget96 (L Speed)
Click to expand...
Click to collapse
Any alternatives to AppOpsXposed, Amplify and Powernap that don't require Xposed?? Already use Greenify and Servicely.
jeraspie28 said:
Testing out now...Thanks!!
---------- Post added at 12:10 PM ---------- Previous post was at 12:02 PM ----------
Any alternatives to AppOpsXposed, Amplify and Powernap that don't require Xposed?? Already use Greenify and Servicely.
Click to expand...
Click to collapse
You can use AppOps from play store which doesn't need xposed. Alternatives to Powernap? Naptime works. Amplify doesn't have an alternative to my knowledge sorry
Hey, thanks for sharing this! Much needed for my phone htc desire 816 (a5dwg) running lineage 7.1.1 and at any rom, it is hungry. I mean literally I've purchased a new original 2600mAh battery for this reason. Still the problem persists. Today only, I've charged the phone to full and kept it on airplane and silent (took the phone to school ), and found that after 3 hours, battery is 20-25% reduced. I'm a little noob that's why I'm asking you that "what are the steps that should be followed / apps to be installed to maintain the battery like yours
Thanks in advance ?
singhjot0020 said:
Hey, thanks for sharing this! Much needed for my phone htc desire 816 (a5dwg) running lineage 7.1.1 and at any rom, it is hungry. I mean literally I've purchased a new original 2600mAh battery for this reason. Still the problem persists. Today only, I've charged the phone to full and kept it on airplane and silent (took the phone to school ), and found that after 3 hours, battery is 20-25% reduced. I'm a little noob that's why I'm asking you that "what are the steps that should be followed / apps to be installed to maintain the battery like yours
Thanks in advance ?
Click to expand...
Click to collapse
Glad I can help. Something is keeping your phone awake all that time that its's not going to deep sleep. That's mostly Google to blame but let's start with the basics
Before that don't call yourself a noob. You got a custom ROM running, most people I know can't even do that.
To fix Idle Drain
First find if you have Idle drain.
Install Better Battery Stats and open it, grant root etc. Now plug the phone to the charger and hit refresh. Now unplug the charger, turn the screen off for a minute or so.
Now turn it on, you should see the device state. If it says Deep Sleep 0%, then the below things can help you.
Disable background Wi-Fi scanning.
Your phone scans for WiFi even when you turn it off. The steps below are based on my Lollipop 5.1, but I believe it's the same on 7.1 too.
Goto Settings -> Wifi -> The three buttons on the top right -> Advanced
There disable 'Network Notifications', 'Scanning Always Available' and 'Keep Wifi awake during sleep'.
Greenify
You must already be using this.
As a rule of thumb, greenify any app which requires an internet connection, those keep waking the system over and over again. Just make sure you don't add any core system apps.
If you have Facebook's app installed, remove it. It's the biggest battery hogging app ever happened (i don't agree that's made) in human history. Use it in chrome. Or any wrapper apps from Play store: Metal, Friendly are a few options.
If you have xposed installed,
Powernap
Set it to endurance mode and that's all. Whitelist amplify, greenify and lspeed. You can whitelist more apps later if you feel the need.
Amplify
This is a must in reducing wakelocks. Unfortunately I can't write the whole procedure here because it's been done before. Check this.
http://forum.xda-developers.com/android/general/guide-extreme-battery-life-t3095884
Still, every phone is unique. After following that thread, IF your device still isn't sleeping (after trying the below too), try blocking more wakelocks. Do a search if you are not sure of a particular wakelock. It will take some time, but it will be worth it.
AppOpsXposed
You can disable some of Google's data collection and analytics whatever stuff using this. Follow this nice thread. It helps massively.
https://forum.xda-developers.com/crossdevice-dev/sony/existenz-hacks-tweaks-battery-life-t3516705
If you have managed to get that deep sleep in BetterBatteryStats almost 90% of the time the screen was off, then congratulations you have fixed your Idle drain.
Reply back with your experiences. :fingers-crossed:
Adithya FRK said:
Glad I can help. Something is keeping your phone awake all that time that its's not going to deep sleep. That's mostly Google to blame but let's start with the basics
Before that don't call yourself a noob. You got a custom ROM running, most people I know can't even do that.
To fix Idle Drain
First find if you have Idle drain.
Install Better Battery Stats and open it, grant root etc. Now plug the phone to the charger and hit refresh. Now unplug the charger, turn the screen off for a minute or so.
Now turn it on, you should see the device state. If it says Deep Sleep 0%, then the below things can help you.
Disable background Wi-Fi scanning.
Your phone scans for WiFi even when you turn it off. The steps below are based on my Lollipop 5.1, but I believe it's the same on 7.1 too.
Goto Settings -> Wifi -> The three buttons on the top right -> Advanced
There disable 'Network Notifications', 'Scanning Always Available' and 'Keep Wifi awake during sleep'.
Greenify
You must already be using this.
As a rule of thumb, greenify any app which requires an internet connection, those keep waking the system over and over again. Just make sure you don't add any core system apps.
If you have Facebook's app installed, remove it. It's the biggest battery hogging app ever happened (i don't agree that's made) in human history. Use it in chrome. Or any wrapper apps from Play store: Metal, Friendly are a few options.
If you have xposed installed,
Powernap
Set it to endurance mode and that's all. You can whitelist apps later if you feel the need.
Amplify
This is a must in reducing wakelocks. Unfortunately I can't write the whole procedure here because it's been done before. Check this.
http://forum.xda-developers.com/android/general/guide-extreme-battery-life-t3095884
Still, every phone is unique. After following that thread, IF your device still isn't sleeping (after trying the below too), try blocking more wakelocks. Do a search if you are not sure of a particular wakelock. It will take some time, but it will be worth it.
AppOpsXposed
You can disable some of Google's data collection and analytics whatever stuff using this. Follow this nice thread. It helps massively.
https://forum.xda-developers.com/crossdevice-dev/sony/existenz-hacks-tweaks-battery-life-t3516705
If you have managed to get that deep sleep in BetterBatteryStats almost 90% of the time the screen was off, then congratulations you have fixed your Idle drain.
Reply back with your experiences. :fingers-crossed:
Click to expand...
Click to collapse
Thankyou so much, will try this surely ?
Adithya FRK said:
Glad I can help. Something is keeping your phone awake all that time that its's not going to deep sleep. That's mostly Google to blame but let's start with the basics
Before that don't call yourself a noob. You got a custom ROM running, most people I know can't even do that.
To fix Idle Drain
First find if you have Idle drain.
Install Better Battery Stats and open it, grant root etc. Now plug the phone to the charger and hit refresh. Now unplug the charger, turn the screen off for a minute or so.
Now turn it on, you should see the device state. If it says Deep Sleep 0%, then the below things can help you.
Disable background Wi-Fi scanning.
Your phone scans for WiFi even when you turn it off. The steps below are based on my Lollipop 5.1, but I believe it's the same on 7.1 too.
Goto Settings -> Wifi -> The three buttons on the top right -> Advanced
There disable 'Network Notifications', 'Scanning Always Available' and 'Keep Wifi awake during sleep'.
Greenify
You must already be using this.
As a rule of thumb, greenify any app which requires an internet connection, those keep waking the system over and over again. Just make sure you don't add any core system apps.
If you have Facebook's app installed, remove it. It's the biggest battery hogging app ever happened (i don't agree that's made) in human history. Use it in chrome. Or any wrapper apps from Play store: Metal, Friendly are a few options.
If you have xposed installed,
Powernap
Set it to endurance mode and that's all. You can whitelist apps later if you feel the need.
Amplify
This is a must in reducing wakelocks. Unfortunately I can't write the whole procedure here because it's been done before. Check this.
http://forum.xda-developers.com/android/general/guide-extreme-battery-life-t3095884
Still, every phone is unique. After following that thread, IF your device still isn't sleeping (after trying the below too), try blocking more wakelocks. Do a search if you are not sure of a particular wakelock. It will take some time, but it will be worth it.
AppOpsXposed
You can disable some of Google's data collection and analytics whatever stuff using this. Follow this nice thread. It helps massively.
https://forum.xda-developers.com/crossdevice-dev/sony/existenz-hacks-tweaks-battery-life-t3516705
If you have managed to get that deep sleep in BetterBatteryStats almost 90% of the time the screen was off, then congratulations you have fixed your Idle drain.
Reply back with your experiences. :fingers-crossed:
Click to expand...
Click to collapse
I've installed "L Speed" and greenify from play store
& I've shred my stats. Pls look and suggest improvements
singhjot0020 said:
I've installed "L Speed" and greenify from play store
& I've shred my stats. Pls look and suggest improvements
Click to expand...
Click to collapse
Can you also post a screenshot of your battery stats
Adithya FRK said:
Can you also post a screenshot of your battery stats
Click to expand...
Click to collapse
Sorry, I've switched to stock to check battery capabilities but still problem persists
Battery droppes from 100 to 83 in 30-35 minutes
in govtuner change the gov to ondemand, i guess u use perfomance.
What can I do, I got a notification that L speed us eating my battery...but if optimized will not work as it should right?
Today update my Rom and got error. Not working because if use 3th party kernel ini.t emulator...but I'm not using one.
Sir_gpm said:
What can I do, I got a notification that L speed us eating my battery...but if optimized will not work as it should right?
Today update my Rom and got error. Not working because if use 3th party kernel ini.t emulator...but I'm not using one.
Click to expand...
Click to collapse
What ROM are you using?
FreedomOS for oneplus 3t.
@Adithya FRK
Choosing battery profile from govtuner is the same as choosing it from Lspeed CPU menu, right? Or is there some significant change between the two?
ninjanmizuki said:
@Adithya FRK
Choosing battery profile from govtuner is the same as choosing it from Lspeed CPU menu, right? Or is there some significant change between the two?
Click to expand...
Click to collapse
Both are the same. See post #2 of GovTuner's official thread here - https://forum.xda-developers.com/an...mod-gov-tuner-project-29th-june-2016-t3407828
But don't enable both of them at the same time.
After 1 whole month of tweaking with various functions of L Speed, finally found a combination to improve the battery even more.
BlueBlood v2.1 (Download link in Post #1)
Tested on L Speed Beta from Play Store.
Adithya FRK said:
After 1 whole month of tweaking with various functions of L Speed, finally found a combination to improve the battery even more.
BlueBlood v2.1 (Download link in Post #1)
Tested on L Speed Beta from Play Store.
Click to expand...
Click to collapse
Sir, can u share your KA settings, such as your govenor, i/o
Sent from my ASUS_Z00A using Tapatalk
I ran diffchecker on the adb system settings output with force 90hz enabled and disabled, and found the setting that switches when you activate "force 90Hz" in the developer settings: "min_refresh_rate=90.0". If you're rooted you can set that with Tasker based on whatever conditions you want, using the shell command function. The code to activate it is "settings put global min_refresh_rate 90.0", and the code to deactivate is "settings delete global min_refresh_rate" (both need "use root" ticked). I've been testing having it triggered on my phone when I'm connected to my home wifi and ambient light is < 15. The home wifi condition is so I don't run into big battery drains when I'm out late at night, and I'm using ambient light rather than screen brightness because as someone pointed out in a Reddit thread, Smooth Display will still run under 75% screen brightness under certain ambient lighting conditions. So far, battery is definitely taking a hit, but it's not a big deal when I'm home and chargers are in easy reach.
tardis_42 said:
I ran diffchecker on the adb system settings output with force 90hz enabled and disabled, and found the setting that switches when you activate "force 90Hz" in the developer settings: "min_refresh_rate=90.0". If you're rooted you can set that with Tasker based on whatever conditions you want, using the shell command function. The code to activate it is "settings put global min_refresh_rate 90.0", and the code to deactivate is "settings delete global min_refresh_rate" (both need "use root" ticked). I've been testing having it triggered on my phone when I'm connected to my home wifi and ambient light is < 15. The home wifi condition is so I don't run into big battery drains when I'm out late at night, and I'm using ambient light rather than screen brightness because as someone pointed out in a Reddit thread, Smooth Display will still run under 75% screen brightness under certain ambient lighting conditions. So far, battery is definitely taking a hit, but it's not a big deal when I'm home and chargers are in easy reach.
Click to expand...
Click to collapse
This is handy, thank you! Quick question though, how do you run an adb system settings output to see the difference when you switch other settings?
TheBobMiller said:
This is handy, thank you! Quick question though, how do you run an adb system settings output to see the difference when you switch other settings?
Click to expand...
Click to collapse
Assuming you have adb running and connecting to your phone fine already, it's pretty easy. Enter adb shell, then run three commands: "settings list global", "settings list system", and "settings list secure". Open up diffchecker.com and copy the results from the shell into one side. Change whatever setting you're interested in on your phone, then run these commands again and copy the output into the other side of the diffchecker window. It'll show you anywhere the output has changed, and that should be your setting - although there might be a couple other differences flagged, eg I think system uptime is in there somewhere.
tardis_42 said:
Assuming you have adb running and connecting to your phone fine already, it's pretty easy. Enter adb shell, then run three commands: "settings list global", "settings list system", and "settings list secure". Open up diffchecker.com and copy the results from the shell into one side. Change whatever setting you're interested in on your phone, then run these commands again and copy the output into the other side of the diffchecker window. It'll show you anywhere the output has changed, and that should be your setting - although there might be a couple other differences flagged, eg I think system uptime is in there somewhere.
Click to expand...
Click to collapse
Thank you so much! I'm not sure how I never knew this but being an avid Tasker user, I should've known this by now. This is gonna really come in so useful for me! Thank you!
How did you find this script <min_refresh_rate> ? Do you max to lock the maximum fps would be <max_refresh_rate>?
Small change to the command; in Android 11 beta 2.5, you have to use "settings put system min_refresh_rate 90.0". Changing the global flag does nothing to the frame rate anymore but changing the system value can force 90hz, even if you have smooth display turned off.
Trixter313 said:
Small change to the command; in Android 11 beta 2.5, you have to use "settings put system min_refresh_rate 90.0". Changing the global flag does nothing to the frame rate anymore but changing the system value can force 90hz, even if you have smooth display turned off.
Click to expand...
Click to collapse
Thank you!
I have been looking for this since beta 2 came out ?