yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] DB126:
Different utilization profiles (graphs) do not necessarily equate to a benefit. I am indifferent to the various doze states or the frequency/duration of "deep sleep". What matters is behaviors and efficient use of scarce resources which, for most mobile users, means better battery life. Amplify users would rave over clobbering alarms and wakelocks yet often realized *increased* power consumption while compromising device stability. Not to mention the hours invested turning knobs and dials. A few managed to get it right (lite/surgical touch); most failed due to lack of understanding, over aggressive tuning or looking for love in all the wrong places.
[Android Apps and Games] DiamondJohn:
It is not the whole story, it is what doze is all about. And different states of doze most definitely have different rates of battery consumption. https://developer.android.com/training/monitoring-device-state/doze-standby

I previously had my phone get into deep-doze, but broke out into deep-maintenance many many many times. I altered the maintenance periods (one of the many configs of doze) frequency and my standby battery usage dropped from 2 point something down to 0.7 % / hr.

Changing the behavior parameters can stop your phone entering doze and therefore has a huge effect. Finding out if your phone is entering doze and what is stopping your phone from entering or staying in a deep-doze is a very important process. Wake-locks and alarms (of different priorities) can bring your phone out of doze, and thereby into higher battery consumption. However, doze will also block lower priority wake-locks and alarms and reschedule them to a doze maintenance period.
[Android Apps and Games] DB126:
We aren't going to see eye-to-eye on this. Just to wrap up the engagement from my perspective, I never said different doze states yielded roughly the same battery consumption. What I did infer and now explicitly state is it is largely irrelevant in the big picture as Android handles the transitions. Average hourly idle drain rate is a good measure of power optimization. Most modern devices achieve 1% out of the box; many fall in the 0.5-0.7% range. Might be able to shave a tenth or two off that by jumping through hoops. So 3-5% every 24 hours. Got better things to do with my time. Rabid knob & dial turners will take exception but given the choice most people would prefer to use their device vs manage it.
[Android Apps and Games] DiamondJohn:
And what my point is, is that not all phones are behaving themselves, and do no achieve <1% /hr Do not forget that a lot of people here are not only running custom ROMs but nearly everyone is running / installed non standard apps, some of which cause battery drain. Have a read of the following thread. https://xdaforums.com/showthread.php?t=1179809 I have not read of many people on this site running their phones as they were "out of the box". This whole site would barely exist if that was the case.

You have obviously been very lucky to not have any experiences of unexplained power drains. As I said in my previous post, I (and most of the people on the above thread) have had power drain well above 1%. In my case, using simple math, I lost 60% in idle. not 3-5% over 24hrs. And I am not alone, read the above thread.
[Android Apps and Games] DB126:
Yep - I serviced that thread for years (and still do on occasion). With exception to edge cases there is no need for the tunings you propose. Identify & mitigate root cause vs building complex workarounds to mask the symptoms.
[Android Apps and Games] Hasen123:
Works good on OP7T with Android 10

I use force doze on One Plus 7t with Android 10 (Oxygen OS). After factory reset and setting up all my apps from start the device lost over 15% during the night (7 hours) - even if set to flight mode. After installing force doze the battery now drops only ~3% in the night. Thanks for this nice tool :)
[Android Apps and Games] DB126:
Would be better to find the culprit draining you phone when the screen is off vs hiding it with this tool. No doubt same app is sucking juice in the background while your using the phone too. Crappy apps tend to behave that way.
[Android Apps and Games] Panic84:
"Tap to check" is not working in android 11 disabling motion sensors. Any idea how to get it work?
[Android Apps and Games] zputnyq:
Hi guys,

It's the first time I'm using this app. I have a question about "doze delay" in the setting. Does anyone know is this in minute or second ?
[Android Apps and Games] s3korn:
the scale is from 1 to 30

so I don't think that means seconds
[Android Apps and Games] EEngineer:
I'm using ForceDoze on my LG G5, great app. I'd like more control over the Whitelisted apps, specifically I want to remove Google Play Store from the whitelist. Trying the menu buttons to remove the app or the package com.android.vending does not work. Can anyone tell me how to remove the hard coded whitelisted apps?

Thanks!
[Android Apps and Games] s3korn:
I use Package Disabler Pro to temporarily disable system apps like stores etc.
[Android Apps and Games] varunpilankar:
How is ForceDoze different from Greenify?
[Android Apps and Games] DiamondJohn:
I do not use ForceDoze.I use an aggressive doze profiule to do it automatically via androidsbuilt in desiogn.

Greenify force closes individual apps and makes it near impossible for them to re-start themselves (use can easily do it).

Doze is a system wide state of your phone, that has rules about what apps can do. It is not on a per app.
[Android Apps and Games] varunpilankar:
How do you do it? If there is a better way I'll be interested.

I had tried using Tasker with following commands:

Display Off --> Run shell - dumpsys deviceidle force-idle deep

Display On --> Run shell - dumpsys deviceidle unforce

Later I used BBS to keep a track of any major impact, I notice extra wakelocks by android system.
[Android Apps and Games] DiamondJohn:
I do not use tasker, Android has a built inmethod to control doze states and behaviours; such as how long after screen off it goes to deep-idle, the deepest doze. My phoine automatically switches to deep-idel about 30s after the screen goes off.

The app I build call TeMeFI has the ability to apply different doze profiles and also has 10+ pre-fabbed profiles to try, including my own extremely aggressive one.

There is also the ability to graph your doze states (and battery drain rates) to visually confirm / analyse the effects of whatever you do. And two examplegraphs of these can be seen in the post https://xdaforums.com/t/app-tool-temefi-comprehensive-system-administration.3806260/post-82095971

You must be rooted.
[Android Apps and Games] EEngineer:
I had partial wakelocks from NFC that were killing my battery when the screen was off.

I disabled the NFC partial wakelock using XPosed module DeepSleep and my screen-off battery life tripled.
[Android Apps and Games] varunpilankar:
I'm using OP7 running stock A10 with Ex Kernel.. No Doze settings inbuilt.

I'll surely try your app and your profile.. Do I have to keep the app running in the background?
[Android Apps and Games] DiamondJohn:
If you are running android above about Mashmallow, the doze IS built in. Its part of the OS. Most implementations of the OS dont give you a GUI to modify it, but its there. Its in AOSP, where the ability to modify the parameters.
[Android Apps and Games] varunpilankar:
I'm running stock Oxygen OS Android 10..can't see any settings over there.

Also I tried your app and installed your profile.. Might take a day or two to get the results.

Can I run the settings without the app running in the background? As I see it's a script - I might be able to run it through Tasker.
[Android Apps and Games] DiamondJohn:
Thats what I am saying. Android has Doze, and there are settings. However most ROMs do not have a GUI to see it. But you can run dumpsys deviceidle to see what the profile stettings are (there is also an item in my app for it as well)

You should of ran the graph before you applied my profile, to have a comparison. In the thread I show examples of the changes ie in action

TeMeFI never runs anything in the background. Once applied, you can even uninstall the app. Detach does piggy-back/inject code off of existing code, but TeMeFI can be uninstalled. Every ROM I have run it on, the doze setting applies through a reboot. But, there is nothing stopping some ROM from resetting the profile on every boot, i just havn't seen it yet. I gave the script as I only had the one example device/ROM at the time and thought it may be needed.
[Android Apps and Games] varunpilankar:
Ahh.. I should have done the graph thing.. I'll still try to do that.

I already see my SOT sky rocket.. Check the image below.

Also.. I have notice normally OSS resets all my script settings for I wanted to have a much solid implementation which can be reapplied on each boot.

Any guide on that?
[Android Apps and Games] DiamondJohn:
SOT Has absolutely nothing to do with Doze. During screen on, doze will run "Normal" which is fully awake.. Your other question is OT here and poorly explained. You will get better help on an appropriate thread and explaiingn it better as to what/which settings you mean, so people could try to help.
[Android Apps and Games] varunpilankar:
I'll try to run a proper graph.. And move my discussion over TeMeFi thread.
[Android Apps and Games] badtlc:
Is this fully working on Android 12? It appears so but I dont know much about this app.
[Android Apps and Games] DiamondJohn:
:oops::oops::oops:My bad :oops::oops::oops:

I must of had a small stroke. What I said was rubbish. Sorry for saying it, and here are my corrections after actually reading what i so wrongly said.

The phone is NOT in a "idle" state while screen is on, Turning the screen on forces a "normal" (ie no doze) state

SOT having "nothing" to do with Doze isn't right, in that SOT will stop doze from entering the deeper idle states. Really re-stating the previous point.

And a notification for varunpilankar[/USE
[Android Apps and Games] Moto-J:
Hi @DiamondJohn ,

Are you willing to share the settings from your aggressive profile here?

Would be nice if we could use these settings with adb:

adb shell settings put global device_idle_constants etc.....
[Android Apps and Games] DiamondJohn:
You literally quoted a link to more than what you asked for.
[Android Apps and Games] Moto-J:
Probably... Though I have seen that you made an app for it and of course I could install that.

Though I would like to use the dozd settings without app and unfortunately couldn't find the settings you are using in the aggressive profile in the forum topic you are referring to..
[Android Apps and Games] DiamondJohn:
Of course the settings are not in the forum topic, thats what the app is. It is the delivery mechanism. I think you should read the OP again to understand why I created the app.

I spent hours on hours building the app. It has over 1000 methods. And you cant be bothered to read? I get no gain from you using the app, its all your benefit. If you did do some research and work, your questions would be answered and more. If I spent this much time on each method (of a FREE app) for everyone, I would be near death before I got half way through. If you cant be bothered to read, then that app is definitely not for you.

PS: You don't need to run the method to get the settings. You would understand that if you read a little.
[Android Apps and Games] Moto-J:
No idea why this tone, though please forget my question, I just will keep using my own settings.

And anyway thanks for your response.
[Android Apps and Games] DiamondJohn:
Because you want everything handed to you the way you want it, and is easiest for you, with the extra work of others.

And again, read the thread OP. This app is not something made for the general public (or sold for money). So my statement "this app is not for you" is simply a statement of fact. Just like its not for my mother.
[Android Apps and Games] MasterGamer1:
Play store link not working
[Android Apps and Games] DiamondJohn:
I don't use it, but its also on F-Droid, which you will find the link on his GitHub page, also linked in the OP
[Android Apps and Games] eried1:
I would also be interested, @DiamondJohn.
[Android Apps and Games] Moto-J:
In the meantime I have found the optimized settings for latest Android's. Will share them here tomorrow 😉👍
[Android Apps and Games] Moto-J:
Ok, here you go! (y)

When in developersettings adb and adb root is enabled, you can use the following command lines:

adb shell device_config reset trusted_defaults device_idle

adb shell device_config put device_idle light_after_inactive_to 30000
adb shell device_config put device_idle light_pre_idle_to 30000
adb shell device_config put device_idle light_idle_to 30000
adb shell device_config put device_idle light_idle_factor 2
adb shell device_config put device_idle light_max_idle_to 50000
adb shell device_config put device_idle light_idle_maintenance_min_budget 28000
adb shell device_config put device_idle light_idle_maintenance_max_budget 300000
adb shell device_config put device_idle min_light_maintenance_time 5000
adb shell device_config put device_idle min_deep_maintenance_time 10000
adb shell device_config put device_idle inactive_to 30000
adb shell device_config put device_idle sensing_to 0
adb shell device_config put device_idle locating_to 0
adb shell device_config put device_idle location_accuracy 1000
adb shell device_config put device_idle motion_inactive_to 5000
adb shell device_config put device_idle idle_after_inactive_to 0
adb shell device_config put device_idle idle_pending_to 30000
adb shell device_config put device_idle max_idle_pending_to 60000
adb shell device_config put device_idle idle_pending_factor 2
adb shell device_config put device_idle idle_to 3600000
adb shell device_config put device_idle max_idle_to 21600000
adb shell device_config put device_idle idle_factor 2
adb shell device_config put device_idle wait_for_unlock true

adb shell device_config put device_idle min_time_to_alarm 1800000
adb shell device_config put device_idle max_temp_app_whitelist_duration 20000
adb shell device_config put device_idle mms_temp_app_whitelist_duration 20000
adb shell device_config put device_idle sms_temp_app_whitelist_duration 10000
adb shell device_config put device_idle notification_whitelist_duration 20000

Credits go to:

- https://xdaforums.com/t/root-doze-settings-editor-android-marshmallow-only.3235130/post-80495353

- https://xdaforums.com/t/improve-idle-drain-by-tweaking-android-doze-parameters.4479005/

No guarantee and for your own risk of course! ;)

When you want to reset to default, just use the first line, which is resetting all device_idle settings to default.
[Android Apps and Games] DiamondJohn:
An app with my setting are in my sig ie its been available for years. This app also graphically displays your doze history. As well as battery charge/drain history and 5k other things.
[Android Apps and Games] whitewallman:
Will Forcedoze work with Android 13?
[Android Apps and Games] eried1:
Just curious: What unit does the numbers in the respective limit represent? Can't be seconds? Milliseconds?
[Android Apps and Games] Moto-J:
Milliseconds 😉
[Android Apps and Games] AnonVendetta:
So, is ForceDoze pretty much useless on Android 13? I used to use it on Marshmallow/Nougat and it seemed to save quite a bit of battery. I've been using the app on an A13 gsi for a few days, I think any good it's doing is neglible at best. Another quirk I've noticed is the notification text "battery usage in last doze session", when you pull down the status bar. After having the screen off for just a few mins it will sometimes give a wild value like 293%. Or it will give a negative value. Other times the value looks normal/realistic.
[Android Apps and Games] Moto-J:
As of A12/13 the doze settings are changed to device_config device_idle settings, so indeed old apps using the old parameters are useless now.

Though, even with the new parameters I do not see noticable improvements. Tested a lot last months but A12/13 is that good with idle management that these kind of apps or changed settings do not seem to improve battery management. With my Moto G100 battery life is at least 4-5 days with LOS19.1 (now at 63%, last charge 3 days ago...).

Most important things for battery life:

- drainers like Google stuff (play services etc..);

- apps running in background though not neccessary for your usage >> restrict those!!

- screen refresh rate (everything more then 60Hz);

- use dark mode for amoled;

- disable things like screen saver, tick screen to activate,

- mobile data always active (setting in developer settings >> disable!!)

- when you want: suspend execution for cached apps (setting in developer settings >> enable)

etc...

A lot possible to improve battery life without changing doze settings, which are in fact pretty much optimized these days.
[Android Apps and Games] Goku1992:
I miss this app mate :/
[Android Apps and Games] xt7xda:
I checked G100 uses sd870 & it has 5000 ma batrery.

I have op9r with sd870 & 4500ma battery.

I would like to know how your phone is having 4_5 days battery backup. Please share your phone config, setup etc.
[Android Apps and Games] brmbjn:
Must di it again every reboot device ?
[Android Apps and Games] DaRdamnDoG:
I thought reset defaults only work if your rom is debug.
[Android Apps and Games] Moto-J:
No, only one time, settings will stay after reboot.

Though, to be honoust, I am not using "optimized" doze settings anymore as default is great already.
[Android Apps and Games] Moto-J:
See for example post 7 of the following topic ;):

https://xdaforums.com/t/banking-apps-how-to-modify-build-prop-using-recovery-and-more.4501623/
[Android Apps and Games] brmbjn:
why adb shell device_config reset trusted_defaults device_idle

not work ?

how to fix

i am not rooted
[Android Apps and Games] Goku1992:
I think this app wont work on Android 13+ cause Google changed the doze behavior
[Android Apps and Games] Darayavahus:
Force doze is obsolete. Move on.
[Android Apps and Games] nekoli:
hello, I was doing some research on Force Doze and came across your post. would you happen to know a workaround for non-root users? I have Shizuku but I'm a newb. any help would be greatly appreciated💖

if it's obsolete the maybe you know something new that replaced it?
[Android Apps and Games] Darayavahus:
With newer android versions it's better not to use any doze applications. They already have what it takes.

If you really feel like having this as a must, try "greenify". It's still being developed and updated
[Android Apps and Games] nekoli:
thanks!
[Android Apps and Games] nekoli:
actually it seems it hasn't been updated since 2019 lol
[Android Apps and Games] ontwykende:
ok... i am on Android 14 (OOS14)... And I have proble.... Every time I even slightly movie phone, my screen show fingerprint and is alive... only way to prevent this behavior is to turn all sensors off (developet tie)... But it's not realy convinient solution...

So, does anyone know how can I disable motion sensor... Tasker maybe?

i am root... just motion sensor, when screen off?

Thanks...
[Android Apps and Games] chrcol:
I am using an app called battery guru which has a customised doze profile, I am pretty sure it tweaks the sensor part of doze.

Because without using the custom doze settings from this app, the ambient screen on my oneplus phones (both of them) stops responding when I lift up the phone after a short screen off time. Now with the battery guru doze settings, that problem is solved. Doze is still enabled, but it seems it perhaps disables or tweaks the sensors part of it.

So for your problem you could perhaps make doze disable motion sensor really aggressively so its on quickly after screen off.
[Android Apps and Games] ontwykende:
Does it work on OOS 14 ?
[Android Apps and Games] Zaxx32:
Naptime app (if u can find it) also has an option to disable motion sensor. You may also look in settings - system - gestures - and disable 'lift to check phone' and enable 'tap to check'. Don't know if those options are available in OOS 14...I have the Pixel 6. U may try asking about motion sensor in the Battery Guru thread. Good luck...
[Android Apps and Games] chrcol:
No idea sorry. One plus 6 is on OOS9 and 8 pro OOS11.
[Android Apps and Games] Intellectua1:
This is my first time using this app non rooted on my Note 5 and it drained my battery from 89% to 0 overnight. The battery stats don't give me much data besides that it seems my phone has "exited" doze every minute and killed itself but I can't seem to understand why. This seems to be a rare occurrence.

Screenshots below.
[Android Apps and Games] PeterImmel:
Is this ('false') how it is supposed to be?

[--------- beginning of system, --------- beginning of crash, --------- beginning of main, 05-22 14:51:38.352 29236 29236 I ForceDozeService: Doze delay: 0ms, 05-22 14:51:38.352 29236 29236 I ForceDozeService: Screen ON received, 05-22 14:51:38.352 29236 29236 I ForceDozeService: Cancelling enterDoze() because user turned on screen and 5000ms has not passed OR disableWhenCharging=true, 05-22 14:58:15.894 29236 29236 I ForceDozeService: Doze delay: 0ms, 05-22 14:58:15.894 29236 29236 I ForceDozeService: Screen OFF received, 05-22 14:58:15.897 29236 29236 I ForceDozeService: Waiting for 5000ms and then entering Doze, 05-22 14:58:45.291 29236 1055 I ForceDozeService: Entering Doze, 05-22 14:58:45.647 29236 29452 I ForceDozeService: Now forced in to idle mode, 05-22 14:58:47.364 29236 1123 I ForceDozeService: Disabling motion sensors, 05-22 14:59:53.718 29236 29236 I ForceDozeService: Doze delay: 0ms, 05-22 14:59:53.718 29236 29236 I ForceDozeService: Screen ON received, 05-22 14:59:53.719 29236 29236 I ForceDozeService: Exiting Doze, 05-22 14:59:53.786 29236 29484 I ForceDozeService: Stepped to: ACTIVE, 05-22 14:59:55.772 29236 1235 I ForceDozeService: Re-enabling motion sensors, 05-22 15:00:25.396 29236 29236 I ForceDozeService: Doze delay: 0ms, 05-22 15:00:25.396 29236 29236 I ForceDozeService: Screen OFF received, 05-22 15:00:25.398 29236 29236 I ForceDozeService: Waiting for 5000ms and then entering Doze, 05-22 15:00:30.404 29236 1313 I ForceDozeService: Entering Doze, 05-22 15:00:30.550 29236 29486 I ForceDozeService: Now forced in to idle mode, 05-22 15:00:32.449 29236 1316 I ForceDozeService: Disabling motion sensors, 05-22 15:22:38.537 29236 29236 I ForceDozeService: Doze delay: 0ms, 05-22 15:22:38.537 29236 29236 I ForceDozeService: Screen ON received, 05-22 15:22:38.537 29236 29236 I ForceDozeService: Exiting Doze, 05-22 15:22:38.653 29236 29254 I ForceDozeService: Stepped to: ACTIVE, 05-22 15:22:40.565 29236 2787 I ForceDozeService: Re-enabling motion sensors, 05-22 15:23:02.330 29236 29236 I ForceDoze: Check if SU is available, and request SU permission if it is, 05-22 15:23:02.734 29236 29236 I ForceDoze: SU available: true, 05-22 15:23:02.735 29236 29236 I ForceDoze: Phone is rooted and SU permission granted, 05-22 15:23:43.415 29236 29236 I ForceDozeService: Doze delay: 0ms, 05-22 15:23:43.416 29236 29236 I ForceDozeService: Screen OFF received, 05-22 15:23:43.416 29236 29236 I ForceDozeService: Connected to charger and disableWhenCharging=true, skip entering Doze, 05-22 15:23:43.564 29236 29236 I ForceDozeService: Doze delay: 0ms, 05-22 15:23:43.565 29236 29236 I ForceDozeService: Screen ON received, 05-22 15:23:43.566 29236 29236 I ForceDozeService: Cancelling enterDoze() because user turned on screen and 5000ms has not passed OR disableWhenCharging=true, 05-22 15:24:37.802 29236 29236 I ForceDoze: Check if SU is available, and request SU permission if it is, 05-22 15:24:38.196 29236 29236 I ForceDoze: SU available: true, 05-22 15:24:38.196 29236 29236 I ForceDoze: Phone is rooted and SU permission granted]