• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[GUIDE] Aggressive Doze - New experimental feature for Marshmallow (NO ROOT REQUIRED)

Search This thread

oasisfeng

Senior Member
Dec 9, 2011
1,357
6,951
"Aggressive Doze" is one of the new experimental features exclusive for Android 6.0 Marshmallow. The best part is that it works on non-rooted device!

Once enabled in settings, your device will enter Doze Mode in minutes (instead of hours stationary normally) after the screen goes off if not charging, to improve its power-saving efforts.

Doze mode is a new power saving mechanism introduced in Android 6.0. In this mode, background behaviors of all apps (except white-listed ones) are strictly prohibited, until next user interaction or charging. The device will also periodically (in hours) exit doze mode briefly.

This is not the complete solution for a better Doze, currently it still cannot keep your device rest in doze if you are carrying it around. It is expected to maximize the power-saving effect of the stock Doze mode. (UPDATE: This "interruption by motion" behavior can be completely prevented in the newest version 2.9 beta, see FAQ.1 for details) Also it may break some background functionality of your daily apps if they are not developed with Android Doze in mind.

FAQ

When I'm moving around, the Aggressive Doze is not working?

Android system uses a low power "Significant Motion Sensor" to track movement and exits Doze Mode if significant movement is detected. Aggressive Doze will not try to enter Doze after that, to avoid constantly entering and exiting Doze. Since the stock Doze is designed for battery-saving in stationary state, Android still wants to keep your apps in sync with fresh state if you are carrying it around.

In the new version 2.9 beta, this "interruption by motion" behavior can be prevented completely if "DUMP" permission is granted manually via USB-connected computer.

Why is my device very lagging when wake from sleep after a few hours.

This seems like a bad consequence of Android Doze Mode itself if too many apps are installed. Because Doze Mode effectively postpone all the background behaviors during the doze. The longer doze lasts, the more tasks to do when exiting. Consider greenifying more background-itchy apps to reduce the lag, because hibernation is still the essential solution for them.

Aggressive Doze is not working sometimes, but again working later.

Check whether there's a alarm clock in less than an hour, by looking for an alarm icon in the status bar. But the icon won't tell you the time of the alarm. You may click the DND tile in the quick launch panel to find out the actual time of the alarm (in the entry with "until next alarm"). This is because Android system refuses to enter doze mode if an scheduled alarm is in less than an hour.

Why I can't find this option in settings? My device is on Android 6.0.

Aggressive Doze in Greenify v2.8 should work on all devices with Android 6+, unless the Doze Mode is explicitly disabled by the ROM. If you are using a custom ROM made by community, ask the
ROM modder to enable this flag in the ROM:
Code:
com.android.internal.R.bool.config_enableAutoPowerModes
UPDATE: Since 2.9 beta 1, even if doze is disabled in ROM, Greenify can still activate doze mode after DUMP permission is granted manually via USB-connected computer. Beware, this may break things since the ROM is not made to be compatible with Doze.
 
Last edited:

iamnotkurtcobain

Senior Member
Oct 30, 2010
12,733
4,405
Vienna
Within the new version 2.8 beta (rolling out), there's an early attempt for better Doze mode in control. It currently activate doze mode as early as the screen goes off, and deactivate it when the screen is back on or the charger is connected.

It is surely not the complete solution for a better Doze mode. It is expected to maximize the power-saving effect of Doze mode, but may also break some background functionality of your apps. So I'm listening to all your feedback and opinions, to build a smarter and finer-tweaked Doze mode in Android 6.0.

Together with the "Shallow Hibernation" released in version 2.7, let's start a new adventure of Greenify with Android Marshmallow.
Thanks buddy! Lets start again :)
 

shakuyi

Senior Member
Apr 3, 2007
359
38
encino
Hi Oasis, I tried to perform the steps you gave but I am getting the following error
/system/bin/sh: grant: not found

this happens when I try to run the first command to grant DUMP permissions. My Nexus 5 is not rooted and ADB is running and fully up to date.

Edit: for anyone experiencing this issue try the following

1. After checking "adb devices" run "adb shell"
2. Type "pm grant com.oasisfeng.greenfiy android.permission.DUMP"
3. Type "pm grant com.oasisfeng.greenify android.permission.READ_LOGS"
 
Last edited:

blanco2701

Senior Member
Oct 11, 2015
219
97
Hello,

First of all, i'm happy with the donation version!

With this new feature there's a thing I've noticed right away. Apparently doze works with all the apps, including whatsapp, which is the app i use the most.

When doze it's activated messages arrive in intervals and it's not that reliable. Anyways, when doze activates by itself, i'm ok with the messages getting delayed, because i'm actually not using the phone. The thing with the integration through greenify, is that messages stop arriving right away.

Do you think there could be a way to kind of "bypass" certain applications? If it's possible it would work like stamina mode from Sony.

Anyways, it's just a comment... I like the instant doze since doze really helps with battery!
 

MrMarques01

Senior Member
Jun 9, 2011
410
259
OnePlus 7 Pro
Google Pixel 4 XL
Hello,

First of all, i'm happy with the donation version!

With this new feature there's a thing I've noticed right away. Apparently doze works with all the apps, including whatsapp, which is the app i use the most.

When doze it's activated messages arrive in intervals and it's not that reliable. Anyways, when doze activates by itself, i'm ok with the messages getting delayed, because i'm actually not using the phone. The thing with the integration through greenify, is that messages stop arriving right away.

Do you think there could be a way to kind of "bypass" certain applications? If it's possible it would work like stamina mode from Sony.

Anyways, it's just a comment... I like the instant doze since doze really helps with battery!
+1
In the developer preview of 6.0 you could exclude apps from being doze'd. Such an option would be great in Greenify as well, since messages don't wake up the phone with activated aggressive doze
 

oasisfeng

Senior Member
Dec 9, 2011
1,357
6,951
Hi Oasis, I tried to perform the steps you gave but I am getting the following error
/system/bin/sh: grant: not found

this happens when I try to run the first command to grant DUMP permissions. My Nexus 5 is not rooted and ADB is running and fully up to date.

Edit: for anyone experiencing this issue try the following

1. After checking "adb devices" run "adb shell"
2. Type "pm grant com.oasisfeng.greenfiy android.permission.DUMP"
3. Type "pm grant com.oasisfeng.greenify android.permission.READ_LOGS"

Sorry for the typo, I just corrected it in the online guide. Thanks for the report.
 
  • Like
Reactions: shakuyi

oasisfeng

Senior Member
Dec 9, 2011
1,357
6,951
Hello,

First of all, i'm happy with the donation version!

With this new feature there's a thing I've noticed right away. Apparently doze works with all the apps, including whatsapp, which is the app i use the most.

When doze it's activated messages arrive in intervals and it's not that reliable. Anyways, when doze activates by itself, i'm ok with the messages getting delayed, because i'm actually not using the phone. The thing with the integration through greenify, is that messages stop arriving right away.

Do you think there could be a way to kind of "bypass" certain applications? If it's possible it would work like stamina mode from Sony.

Anyways, it's just a comment... I like the instant doze since doze really helps with battery!

If WhatsApp uses GCM for instant message push, then maybe the developer has not yet adopted for the priority GCM push which goes through in the Doze mode. This is what Google suggests all IM message to use.
I'll try to work around this issue, maybe allow all GCM push to exit doze mode for a while.
 

matze0611

Senior Member
Feb 23, 2011
67
4
Today I got Greenify 2.8 beta 1, but still my apps aren't greenified.

Edit: I reinstalled Greenify and su asked me for permission, now it works, thank you.

Best regards

Matthias
 
Last edited:

Smultie

Senior Member
Apr 13, 2006
711
227
Within the new version 2.8 beta (rolling out), there's an early attempt for better Doze mode in control. It currently activate doze mode as early as the screen goes off, and deactivate it when the screen is back on or the charger is connected.

The best part of this feature - NO ROOT REQUIRED! Still you need to perform a one-time procedure with USB-cable and a connected computer, which is surely familiar to many of you XDA members.

This is not the complete solution for a better Doze mode. It is expected to maximize the power-saving effect of Doze mode, but may also break some background functionality of your apps. So I'm listening to all your feedback and opinions, to build a smarter and finer-tweaked Doze mode in Android 6.0.

Together with the "Shallow Hibernation" released in version 2.7, let's start a new adventure of Greenify with Android Marshmallow.

Oasisfeng, what's the normal amount of time before doze activates? Would it perhaps be better to have an option to set the amount of minutes after screen off to start the aggresive Doze?
 

MrRaines

Senior Member
May 5, 2014
340
935
I just test greenify beta, and battery seems like always for now... Tomorrow I'll see better how new greenify works...
 

atulclassic

Senior Member
Feb 20, 2013
1,099
916
Mumbai
OnePlus 9R
@oasisfeng
mine is rooted but still the Doze feature is not activated.
Is it only for 6.0 devices?
 

Attachments

  • Screenshot_2015-10-14-11-55-33.png
    Screenshot_2015-10-14-11-55-33.png
    189.3 KB · Views: 2,337

randy6644

Senior Member
May 6, 2014
230
43
Oasisfeng, what's the normal amount of time before doze activates? Would it perhaps be better to have an option to set the amount of minutes after screen off to start the aggresive Doze?

I‘m thinking about the same thing.It'd be great to have an option to set the time to start the doze mode. It'd be so damn perfect!
 
Last edited:
  • Like
Reactions: princem131

oasisfeng

Senior Member
Dec 9, 2011
1,357
6,951
Oasisfeng, what's the normal amount of time before doze activates? Would it perhaps be better to have an option to set the amount of minutes after screen off to start the aggresive Doze?

Currently zero. I'm planning for a smarter delay before doze (probably the same as the delay before greenified apps hibernate). But for now, I'd like to push the benefit to the limit for a test run and find the actual drawback of 0 delay. :D
 

Top Liked Posts

  • There are no posts matching your filters.
  • 86
    "Aggressive Doze" is one of the new experimental features exclusive for Android 6.0 Marshmallow. The best part is that it works on non-rooted device!

    Once enabled in settings, your device will enter Doze Mode in minutes (instead of hours stationary normally) after the screen goes off if not charging, to improve its power-saving efforts.

    Doze mode is a new power saving mechanism introduced in Android 6.0. In this mode, background behaviors of all apps (except white-listed ones) are strictly prohibited, until next user interaction or charging. The device will also periodically (in hours) exit doze mode briefly.

    This is not the complete solution for a better Doze, currently it still cannot keep your device rest in doze if you are carrying it around. It is expected to maximize the power-saving effect of the stock Doze mode. (UPDATE: This "interruption by motion" behavior can be completely prevented in the newest version 2.9 beta, see FAQ.1 for details) Also it may break some background functionality of your daily apps if they are not developed with Android Doze in mind.

    FAQ

    When I'm moving around, the Aggressive Doze is not working?

    Android system uses a low power "Significant Motion Sensor" to track movement and exits Doze Mode if significant movement is detected. Aggressive Doze will not try to enter Doze after that, to avoid constantly entering and exiting Doze. Since the stock Doze is designed for battery-saving in stationary state, Android still wants to keep your apps in sync with fresh state if you are carrying it around.

    In the new version 2.9 beta, this "interruption by motion" behavior can be prevented completely if "DUMP" permission is granted manually via USB-connected computer.

    Why is my device very lagging when wake from sleep after a few hours.

    This seems like a bad consequence of Android Doze Mode itself if too many apps are installed. Because Doze Mode effectively postpone all the background behaviors during the doze. The longer doze lasts, the more tasks to do when exiting. Consider greenifying more background-itchy apps to reduce the lag, because hibernation is still the essential solution for them.

    Aggressive Doze is not working sometimes, but again working later.

    Check whether there's a alarm clock in less than an hour, by looking for an alarm icon in the status bar. But the icon won't tell you the time of the alarm. You may click the DND tile in the quick launch panel to find out the actual time of the alarm (in the entry with "until next alarm"). This is because Android system refuses to enter doze mode if an scheduled alarm is in less than an hour.

    Why I can't find this option in settings? My device is on Android 6.0.

    Aggressive Doze in Greenify v2.8 should work on all devices with Android 6+, unless the Doze Mode is explicitly disabled by the ROM. If you are using a custom ROM made by community, ask the
    ROM modder to enable this flag in the ROM:
    Code:
    com.android.internal.R.bool.config_enableAutoPowerModes
    UPDATE: Since 2.9 beta 1, even if doze is disabled in ROM, Greenify can still activate doze mode after DUMP permission is granted manually via USB-connected computer. Beware, this may break things since the ROM is not made to be compatible with Doze.
    15
    I just managed to completely disabled the significant motion sensor during doze on my Nexus 5X, without root.
    Still there's a minor side effect I'm working on to eliminate. I'll update a new beta version when it's ready.
    9
    2.9 beta 1 is pushed to beta channel with improved Aggressive Doze:

    * Prevent Aggressive Doze from being interrupted by significant motion. (only tested on Nexus 5X, not sure whether it works on other devices)
    * Activate Aggressive Doze even if doze is disabled in ROM. (may break things since the ROM is not made to be compatible with Doze).

    Both require DUMP permission to work. That means you need either root or manual granting DUMP permission (for non-root).
    8
    Hello,

    First of all, i'm happy with the donation version!

    With this new feature there's a thing I've noticed right away. Apparently doze works with all the apps, including whatsapp, which is the app i use the most.

    When doze it's activated messages arrive in intervals and it's not that reliable. Anyways, when doze activates by itself, i'm ok with the messages getting delayed, because i'm actually not using the phone. The thing with the integration through greenify, is that messages stop arriving right away.

    Do you think there could be a way to kind of "bypass" certain applications? If it's possible it would work like stamina mode from Sony.

    Anyways, it's just a comment... I like the instant doze since doze really helps with battery!

    If WhatsApp uses GCM for instant message push, then maybe the developer has not yet adopted for the priority GCM push which goes through in the Doze mode. This is what Google suggests all IM message to use.
    I'll try to work around this issue, maybe allow all GCM push to exit doze mode for a while.
    7
    He is talking about AD in general and wants the doze-periods manually adjustable ...

    Doze mode have many adjustable parameters, which could be overwhelming for most users. If you use Doze Editor or similar tool, you should understand that.
    Tools should relief not increase the complication in the digital life. That's the spirit of Greenify - "forget and enjoy". Leave the complication of suitable solution to the developers behind.