FORUMS
Remove All Ads from XDA

Doze - In depth

3,803 posts
Thanks Meter: 1,377
 
By italia0101, Senior Member on 27th October 2015, 04:03 PM
Post Reply Email Thread
Hey fellas, was doing a little research on how exactly Doze mode works in Android Marshmallow, i've benefited from much battery standby time due to this feature.
Had a play with adb shell on my PC too and found some cool functions
; (btw these have to be done on a PC afaik, if you try to do them in terminal on the device itself it'll throw up a permission error )
$ adb shell dumpsys deviceidle ( will show you the doze settings )
Settings:
inactive_to=+30m0s0ms
sensing_to=+5m0s0ms
motion_inactive_to=+10m0s0ms
idle_after_inactive_to=+30m0s0ms
idle_pending_to=+5m0s0ms
max_idle_pending_to=+10m0s0ms
idle_pending_factor=2.0
idle_to=+60m0s0ms
max_idle_to=+6h0m0s0ms
idle_factor=2.0
min_time_to_alarm=+60m0s0ms
max_temp_app_whitelist_duration=+5m0s0ms
mms_temp_app_whitelist_duration=+60s0ms
sms_temp_app_whitelist_duration=+20s0ms


So this shows how long it takes for Doze to kick in, and what it looks for.

You can also force the different states and move them along ;

$ adb shell dumpsys deviceidle step , this allows you to step into the next state manually, if you do this with the screen on / charging it'll show ACTIVE and won't move state, so first you need to do ;
adb shell dumpsys battery unplug
then turn off the screen


Now when you "$ adb shell dumpsys deviceidle step" this happens
$ adb shell dumpsys deviceidle step => output will be Stepped to: IDLE_PENDING
$ adb shell dumpsys deviceidle step => output will be Stepped to: SENSING
$ adb shell dumpsys deviceidle step => output will be Stepped to: IDLE
$ adb shell dumpsys deviceidle step => output will be Stepped to: IDLE_MAINTENANCE
Following steps will alternate between IDLE and IDLE_MAINTENANCE


Idle = Doze mode .
Idle_Maintannce = is when doze modes allows the alarms / scheduler to run every so often

Oh and there's also a quicker and easier " adb shell dumpsys deviceidle force-idle" to force doze mode straight away so you don't have to worry about the battery unplugging / screen off as previously mentioned

Shame we can't ( or i don't know how ) use these " on device " as we could essentially kick doze mode in when we wanted ( not sure if that's a good thing, but fun playing ;-0 )

Anyway, just thought i'd share
The Following 51 Users Say Thank You to italia0101 For This Useful Post: [ View ] Gift italia0101 Ad-Free
27th October 2015, 11:52 PM |#2  
ldjr's Avatar
Member
Flag Texas
Thanks Meter: 29
 
More
This is pretty neat. I am no developer, but it looks like someone might eventually be able to tweak the doze times and such.

I gotta say that my battery life has almost doubled since I switched from LP to MM. I am assuming doze has a lot to do with it.
28th October 2015, 12:50 AM |#3  
Yourgodtim's Avatar
Junior Member
Flag Monroe
Thanks Meter: 6
 
More
Doze... Love it even as it is. I can go hours even with a wear connected and after 8 hours lost 10 percent battery. Love Doze. It will be fun to play around with and see if more can be saved just by tweaking.
28th October 2015, 01:56 AM |#4  
bobloadmire's Avatar
Senior Member
Thanks Meter: 97
 
More
so theoretically with root you could link force enable to the lock screen button?
The Following User Says Thank You to bobloadmire For This Useful Post: [ View ] Gift bobloadmire Ad-Free
28th October 2015, 02:24 AM |#5  
snoprosledneck88's Avatar
Senior Member
Thanks Meter: 191
 
More
I hope so. Why would they make it so you phone can't move for doze to work. Most people keep their phones in their pocket

Sent from my Nexus 6 using Tapatalk
28th October 2015, 08:44 AM |#6  
Member
Thanks Meter: 11
 
More
Came here via Reddit on which this topic is posted.

My Nexus 7-13 idle drains 2-3% an hour on MM 6.0. With wifi, location, etc. all off and all user-apps (not system-apps) Greenified. Skipped LP, but KK 444 had less than 1% drain after 8 hours sleep. Already did factory reset, no fix.Very dissapointing so far.

Rotation sensor is broken on N7-13 btw. Do not know if can be correlated to potentially misfunctioning Doze.

Verstuurd vanaf mijn XT1562 met Tapatalk
28th October 2015, 09:39 AM |#7  
AndDiSa's Avatar
Senior Member
Flag Heidelberg
Thanks Meter: 3,822
 
More
2-3% per hour? That's much too much, I suppose there is a wakelock active, most likely due to a Google Play Services update. On the N7-2012 with unofficial MM 6.0 in idle mode the battery consumption is almost 0.0%.

Btw.: Rotation sensor on MM 6.0 is broken on N7-2012, too, so it might be related to doze mode.
28th October 2015, 11:03 AM |#8  
italia0101's Avatar
OP Senior Member
Thanks Meter: 1,377
 
More
Quote:
Originally Posted by bobloadmire

so theoretically with root you could link force enable to the lock screen button?

That's kinda what I was hoping to see yeah

Sent from my Nexus 6P using Tapatalk
28th October 2015, 11:31 AM |#9  
Member
Thanks Meter: 11
 
More
Quote:
Originally Posted by AndDiSa

2-3% per hour? That's much too much, I suppose there is a wakelock active, most likely due to a Google Play Services update. On the N7-2012 with unofficial MM 6.0 in idle mode the battery consumption is almost 0.0%.

Btw.: Rotation sensor on MM 6.0 is broken on N7-2012, too, so it might be related to doze mode.

Tnx for reply. Rotation was broken since JB. Sometimes it works a few hours to a day. Most probably the familiar in many Flo's cable not good connected/connectable factory built flaw. Should open the device, but Asus built quality is so poor I am afraid it won't survive. Guess I will check Youtube instructionals again and reconsider opening the device. (Now using fine app Ultimate Rotation as fix).

Will run wakelock detector later. According to Android battery section 2% battery drain by Android System. Gsam says over 20%. Really hope is fixable. Theming RRO's with Layers Manager (and MacPie theme) in MM 6.0 is the 1 of the best things happened to Android. Looks so amazing no more having the ugly and eye torturing white terrorizing Android since LP like on my 2 Moto's.



Verstuurd vanaf mijn XT1562 met Tapatalk
28th October 2015, 12:18 PM |#10  
DroidDredd's Avatar
Senior Member
Thanks Meter: 129
 
More
Quote:
Originally Posted by Yourgodtim

Doze... Love it even as it is. I can go hours even with a wear connected and after 8 hours lost 10 percent battery. Love Doze. It will be fun to play around with and see if more can be saved just by tweaking.

I'm sure we will get there but .... lets hope no one will Overdoze/dose and kill their phone
The Following 2 Users Say Thank You to DroidDredd For This Useful Post: [ View ] Gift DroidDredd Ad-Free
28th October 2015, 12:34 PM |#11  
Junior Member
Thanks Meter: 0
 
More
Thats great
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes