[Root] Doze Settings Editor (Android Marshmallow Only)

Search This thread

DiamondJohn

Recognized Contributor
Aug 31, 2013
6,490
6,457
Sydney

Goku1992

Senior Member
I have collected a bunch of doze profiles and also defiined my own. These can be found with the app i built TeMeFI You can see my doize results in them secondimage of the post: https://forum.xda-developers.com/t/...e-system-administration.3806260/post-82095971
The green is when its in deeop idle, and the red is basi8cally when i unlock my phone, and soon after closing the screen, its back in deep-idle ✌
Which name is this profile you are using? Have downloade your app! :)
 

DiamondJohn

Recognized Contributor
Aug 31, 2013
6,490
6,457
Sydney
Which name is this profile you are using? Have downloade your app! :)
The actual profile I use is pretty obvious also. Its got my handle in rhe name! But its extreme, not for people who have social app notificartions firing while the phone is down.
Screenshot_TeMeFI_20201231-115935.png
and just this morning (hasnt been on for long),
doze_results.PNG
 
  • Like
Reactions: Goku1992

Goku1992

Senior Member

Goku1992

Senior Member

DiamondJohn

Recognized Contributor
Aug 31, 2013
6,490
6,457
Sydney
  • Like
Reactions: Goku1992
They should stick through a reboot as they are saved in the global settings.
is the button revert to default settings available? or just uninstalling the app will revert to default doze?

*** UPDATE ***
Just grab the new version on another site.

btw any update settings for Light Doze on Nougat? or just put smaller value than the preset doze of this thread? Thanks.
 
Last edited:

chaoscreater

Senior Member
Do you have an adb Code to use very aggressive doze? (imitiadelly doze without motion when screen is off? Without maintenance) Thank you mate :)

Google or search XDA.

adb shell dumpsys battery unplug
adb shell dumpsys deviceidle step deep
adb shell dumpsys deviceidle force-idle
adb shell dumpsys deviceidle force-inactive
 
  • Like
Reactions: rodken and Goku1992

Top Liked Posts

  • There are no posts matching your filters.
  • 317
    Android Marshmallow Doze Settings Editor

    Requires Root

    This app is a simple editor of the settings or parameters which affect the operation of Doze.
    If no root is available then it will offer an ADB command that will modify the doze settings.
    Because there is no root on open it will always load the default settings.

    Changelog - v6.0
    • You can now add your own custom profiles.
    • Added tuhinxp04's profile
    • Bugfix - No longer crashes when device settings unavailable. Will change to non root mode.
    • Bugfix - Info screen now shows default in current display type
    • Bugfix - Info screen now shows location accuracy with meters
    Changelog - v5.0
    • New built in profiles
    • Bugfix - Back arrow in settings not closing activity

    The next post contains descriptions of each parameter.

    Source Code
    https://github.com/p0isonra1n/Doze-Settings-Editor

    Disclaimer
    I accept no responsibility for any outcome that this app may cause. Use at your own risk.
    88
    Parameter Descriptions
    These are all direct from the Doze source code.

    Inactive Timeout - inactive_to
    This is the time, after becoming inactive, at which we start looking at the motion sensor to determine if the device is being left alone. We don't do this immediately after going inactive just because we don't want to be continually running the significant motion sensor whenever the screen is off.
    Sensing Timeout - sensing_to
    If we don't receive a callback from AnyMotion in this amount of time + locating_to, we will change from STATE_SENSING to STATE_INACTIVE, and any AnyMotion callbacks while not in STATE_SENSING will be ignored.
    Locating Timeout - locating_to
    This is how long we will wait to try to get a good location fix before going in to idle mode.
    Location Accuracy - location_accuracy
    The desired maximum accuracy (in meters) we consider the location to be good enough to go on to idle. We will be trying to get an accuracy fix at least this good or until locating_to expires.
    Motion Inactive Timeout - motion_inactive_to
    This is the time, after seeing motion, that we wait after becoming inactive from that until we start looking for motion again.
    Idle After Inactive Timeout - idle_after_inactive_to
    This is the time, after the inactive timeout elapses, that we will wait looking for significant motion until we truly consider the device to be idle.
    Idle Pending Timeout - idle_pending_to
    This is the initial time, after being idle, that we will allow ourself to be back in the IDLE_PENDING state allowing the system to run normally until we return to idle.
    Max Idle Pending Timeout - max_idle_pending_to
    Maximum pending idle timeout (time spent running) we will be allowed to use.
    Idle Pending Factor - idle_pending_factor
    Scaling factor to apply to current pending idle timeout each time we cycle through that state.
    Idle Timeout - idle_to
    This is the initial time that we want to sit in the idle state before waking up again to return to pending idle and allowing normal work to run.
    Max Idle Timeout - max_idle_to
    Maximum idle duration we will be allowed to use.
    Idle Factor - idle_factor
    Scaling factor to apply to current idle timeout each time we cycle through that state.
    Min Time to Alarm - min_time_to_alarm
    This is the minimum time we will allow until the next upcoming alarm for us to actually go in to idle mode.
    Max Temp App Whitelist Duration - max_temp_app_whitelist_duration
    Max amount of time to temporarily whitelist an app when it receives a high tickle.
    MMS Temp App Whitelist Duration - mms_temp_app_whitelist_duration
    Amount of time we would like to whitelist an app that is receiving an MMS.
    SMS Temp App Whitelist Duration - sms_temp_app_whitelist_duration
    Amount of time we would like to whitelist an app that is receiving an SMS.

    Extra Infomation
    Difference: Doze and App Standby (developer.android.com)
    Some tests and issues: code.google.com
    78
    is it possible to the explanation in more simple english. I have no way to know what those means?? maybe is just me

    For you and anyone else who feels lost, here's my grasp on all (all this info is in the pages back but here's a summary). Hope it's correct and useful:

    • Inactive timeout: After screen goes off, wait this much time without doing anything. If screen comes back on, it obviously breaks this timeout and it starts again after it's back off

    • Sensing timeout: After Inactive timeout has passed, the device starts Sensing. That means it's using the accelerometer to see if it's being moved. Any movements (this is important) will trigger this. If any movement is detected, it stops polling the accelerometer, stops the locating timeout (see below) and starts Motion inactive timeout (see later)

    • Locating timeout: at the same time as sensing, the device is trying to locate itself. The idea is that when in Doze, the device is not moving, so it wants to know where it is for the purpose of location services and apps, etc. This timeout is the maximum time the device is allowed to look for location.

    • Location accuracy: what is considered "accurate enough".

    • Motion inactive timeout: if the device has detected motion, this timeout starts. The device is waiting this long before going again into sensing and locating. This timeout can be triggered from most other states. The difference is that while Sensing, the device is looking for Any motion, while in the other states, the trigger is "significant motion", which, I believe means motion, which is expected to move the device to new location, I.e. stronger movement like shaking or picking up the phone in hand and moving. That is only my interpretation of Any motion and Significant motion, so I may be wrong but my testing so far confirms this.

    • Idle after inactive timeout: After Sensing state has passed without any motion, this timeout starts. The device waits this long looking for Significant motion. If such motion is detected, Motion inactive timeout starts. If not, the device enters the next step Idle (wich is the state that stops wakelocks, background network, etc…)

    • Idle pending timeout: this is the time length that is the window in which apps are allowed to act normally. It'll come up every so often (depending on settings below).

    • Max idle pending timeout: this is the maximum time length the apps are allowed to behave normally. There is a maximum because every time the phone enters Idle_pending state, the time until the next pending state increases, just like the length of the pending state itself to compensate for the longer Idle.

    • Idle pending factor: This is the factor by which the idle pending timeout increases each time it runs. Factor of 2.0 (default) means every next time idle pending timeout is twice as long until max idle pending timeout (see above) is reached.

    • Idle timeout: This is the initial length of the Idle state

    • Max idle timeout: The maximum length of the Idle state – just like with pending state

    • Idle factor: factor by which idle timeout increases each time, just like the pending factor

    … the rest are pretty clear I believe


    The general flow goes something like this:

    1. screen goes off
    2. inactive_to starts
    3. sensing and locating start
    – if no movement detected, proceed to 4.
    – if any movement detected, go to ***
    4. idle_after_inactive_to starts
    – if no significant movement detected, proceed to 5.
    – if significant movement detected, go to ***
    5. Idle_to starts (device is in Doze now)
    – if no significant movement detected, proceed to 6.
    – if significant movement detected, go to ***
    6. Idle_pending_to starts (device is temporarily out of Doze for apps to sync)
    – if any (or significant, not sure) movement occurs, go to ***
    – if no movement occurs, proceed to 7.
    7. multiply Idle_to × Idle factor (until max is reached) and Idle_pending_to × Idle_pending_factor (until max is reached), and go back to 5. Loops like this until broken by movement or screen on.

    ***Motion inactive timeout: Wait this long. After that start Sensing and Locating (step 3).

    I attached a mockup flow chart (my skills with these are miserable but maybe it's helpful). If not visible, here's a link: https://www.dropbox.com/s/r1nrxgv0h2z4gqe/Visio-Doze Flowchart.png?dl=0
    60
    this is what i have so far. greenify uninstalled.

    - inactive_to set to 600000 (10min) - the time i want my device to sit before it thinks about going into doze.
    - locating_to set to 0 - going into idle (doze) right away
    - sensing_to set to 0 - disabling motion and going into inactive right away
    - location_accuracy not changed - doesnt matter because we are going into idle right away with locating_to set to 0
    - motion_inactive_to set to 0 - disabling motion
    - idle_after_inactive_to set to 0 - we are already waiting 10min with inactive_to, no need to wait any longer
    - idle_pending_to set to 120000 (2min) - my phone can check for updates for 2min before going back into idle
    - max_idle_pending set to 120000 (2min) - my phone can check for updates for 2min before going back into idle
    - idle_to set to 1800000 (30min) - the time in idle before my phone can change to idle pending to check for updates

    i wonder if these settings will revert to defaults if i reboot? if so, is there a way to automate these settings with initd?
    59
    Hey guys,
    what profile is in your opinion the best balanced profile, not too aggressive and not too light?
    Here's what I use (in seconds):

    inactive to – 900 (15 min)
    sensing to – 20
    locating to – 0
    location accuracy – 20.0
    motion inactive to – 600 (=10 min)
    idle after inactive to – 0 (after sensing and locating are passed, don't wait further)

    idle pending to – 60
    max idle pending to – 240
    idle pending factor – 2

    idle to – 1800 (=30 min)
    max idle to – 21600 (=6 hrs)
    idle factor – 2

    min time to alarm – 900 (=15 min)
    max temp app whitelist duration – 120
    mms temp app whitelist duration – 60
    sms temp app whitelist duration – 20

    things I'd consider changing depending on usage:
    • inactive to – depending on how often you turn on the screen. Generally my idea is that if I haven't turned it on for 15 min, I probably won't do so again any time soon.
    • motion inactive to – this timeout basically does this: after the device has detected movement (either from Sensing state or from Idle), it'll wait this much before using the sensors again to check for motion. So if you move a lot, increase the value for better battery. If you don't move a lot, decrease for better battery.
    • idle pending to – if you have apps that sync media, or other big files, you may want to increase this. I think Titanium Backup, or other similar apps, will need much more time to do scheduled backups, so keep that in mind also. Otherwise one minute seems to be enough for most apps to do their job. You can use 2–3 minutes + a little higher max_idle_pending_to, to be on the safe side, if you're worried. I don't think it'll make that much of a difference.