yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] noisyriver:
Because if it's drainig at night 3...4 % when idle it will at day too... ;) Night time is a good time for charging but it's also a good time to see your device real standby drain.

3...4 % per hour when idle is really a lot if the divice is dozing. You shoulf check with GSAM if the device is really dozing. If so and you still have that much drain I would suppose that your device does not go into deep sleep. You should check with Better Battery Stats why.

But if you have 3...4 % over the whole night this would be graet from my point of view...
[Android Apps and Games] ianmacd:
It's a good point, but your nighttime pattern of not using your device at all probably doesn't resemble your daytime usage pattern closely enough to provide a good indication of real world performance.

Even if you have long periods of no usage during the day, they are punctuated by periods of using the device. Those usage sessions bring the device out of idle state, to which it must return some time later. Even when the device is not in use, it may be in motion, possibly using power if motion sensing has not been disabled or circumvented.

The most important point for the OP, however, is that a motionless nighttime idle test won't reveal any differences between Greenify and ForceDoze. The only very minor difference is in the delay before the device is commanded to go to sleep.
[Android Apps and Games] ps89:
Hello [MENTION=5427507]ssrij[/MENTION], the 'useXposedSensorWorkaround' and 'serviceEnabled' flags still revert to 'false' after my phone is restarted for a few times. Thanks.
[Android Apps and Games] okij:
Xposed Sensor workaround is working fine in 1.3.7 rev 44 on Xperia Z3c, but was also working well before on this device.

One small issue with the new, informative Doze battery stats: New entries appear on top of the list, but when opening the stats, the bottom of the list is shown, so we have to scroll all through the list. Compact view immediately shows the top of the list, as usual.
[Android Apps and Games] noisyriver:
As you mentioned Naptime I looked at this app after a long time. And I found one really interesting feature it offers. I qoute from Google Playstore's Naptime page:

Q: What's the 'Sensors app whitelist' feature?

It works together with the 'Disable motion detection' feature and allows you to choose up-to one app (sorry, Android limits us to only one app) to request sensor information even if you disable motion detection.

For example it allows apps, such as Google Fit, to query the accelerometer or gyroscope to count your steps.

Sorry, I don't want to pit you both developers against each other, but maybe this could solve the GPS issue some people (including me) have with Force Doze?
[Android Apps and Games] ssrij:
I had the whitelist feature as well long time back, but it doesn't work, with any app. My users tried using it. Plus GPS isn't a "motion sensor". You can try enabling "Don't disable sensors on screen off" which will keep sensors enabled during screen off and you will notice GPS will still not work.

GPS being turned off is a Doze behaviour and has nothing to do with disabling motion sensors.
[Android Apps and Games] kryshnakishore:
Badly needed update Sri ji, app behaving as tilt
[Android Apps and Games] almoped:
I've tried to make the debuglog two-way scrollable with inertia simply by copying the way they do it at xposed. Seems to work ok. Maybe someone who actually knows how to do android ui stuff can be inspired to make it work on devices different from mine. I've attached the layout xml and code diff.
[Android Apps and Games] ssrij:
Great, you should submit a pull request on Github
[Android Apps and Games] ssrij:
What?
[Android Apps and Games] axxel6307:
I don't know about you, but my money doesn't grow on trees, and when I pay near a grand for my phone, I expect my moneys worth out of it, and for it to last. Charging it every night is not healthy for the overall longevity of the battery. 3 to 5% drop overngiht IMO is not good and seems like something isn't deep sleeping.
[Android Apps and Games] turtle254:
beta rev. 44 - how do you change back "doze battery stats (old)" to standard view,

seems to switch to (old) view after awhile for no reason. I have turn doze off and on

screen off and on, does not change back. I have to clear all stats and close screen to

revert back to standard view? Thanks
[Android Apps and Games] ianmacd:
Using the battery at all isn't good for its longevity. You have to draw the line somewhere, and a common place to draw that line is somewhere between convenience and idealism.

Well, whether it's good or not depends on how much it's 3-5% of.
[Android Apps and Games] nobnut:
Last time I checked, a % point was one out of a hundred. 3-5% means he lost between 3 and 5 % of his battery capacity overnight, judging by his post. It is quite self explanatory.

You should stop lecturing people and just let them converse with the OP. You are making noise which is adding verbosity to this thread.

Anyone scanning it will see someone asking a question and you reprimanding them with your own views on how they should be running their device, or what they are doing wrong.

No one elected you president. Your views are fine... but please remember they are yours.
[Android Apps and Games] ssrij:
Yeah that's a workaround for situations when the app isn't able to store stats properly (if an enter Doze log is missing an exit Doze log, or vice versa). It'll be fixed soon, so such incomplete logs are still shown.
[Android Apps and Games] axxel6307:
You lost me. Aren't we talking about battery 3 to 5% of one battery cycle. That's what I meant.
[Android Apps and Games] ianmacd:
I'll spell it out for you, shall I?

3% of 1800 mAh would be 54 mAh.

3% of 3500 mAh, on the other hand, would be 105 mAh.

Which of the two is worse is left as an exercise for you.

---------- Post added at 21:06 ---------- Previous post was at 21:00 ----------

I understood you, but it depends on the capacity of the battery to determine whether a 3-5% overnight drop is a lot.

3% of not much is a lot, relatively speaking. Conversely, 3% of a lot is not much.

3% overnight, assuming 8 hours of sleep, doesn't actually sound too bad to me, even with a 3000 mAh battery. It depends what the device is doing while dozing, of course.
[Android Apps and Games] axxel6307:
Gotcha. Well, to me, any of those would drive me nuts. Doze supposedly was the fix for standby drain.
[Android Apps and Games] :
Oops... Possible integer check error? It's showing me that 5 seconds is too long.
[Android Apps and Games] ssrij:
Thanks for reporting, I'll fix it now
[Android Apps and Games] noisyriver:
I got you wrong in your first post. Thought you speak about an hourly drain. 3...5% in 7 or more hours is just great, even my Note 10.1 2014 with 11.000 mAh has about 0.5 % an hour - on LP without doze, only WiFi and phone on (no mobile data) and only mails syncing.
[Android Apps and Games] axxel6307:
It's not horrible, but IMO if the phone is in a deep sleep, with a healthy battery, it should be capable of 1 or 2% drop if it's deep sleeping properly. My old nexus 5 did that with a smaller battery and before doze was around....
[Android Apps and Games] SixFourSix:
Yes I have this same exact issue.

Edit:

In other news; now it seems it is possible to stream music while screen off, and if "turn mobile data off" is activated.
[Android Apps and Games] okij:
Just in case you missed it - I sent you a PM yesterday. :)
[Android Apps and Games] okij:
Now I searched around a bit and found this link http://stackoverflow.com/questions/15453576/android-check-if-gps-is-searching-has-fix-or-is-not-in-use which shows some code to check if the GPS sensor is in use or not.

Do you think that this could work for us?
[Android Apps and Games] Idiosyncratinom:
How is this different from Franco's naptime?
[Android Apps and Games] milojoseph:
He explained already
[Android Apps and Games] Idiosyncratinom:
I had a look, and what I saw were features that both apps had:

- Enter doze on screen off

- Disable motion detectors (longer doze)

This one didn't ask for root, though, so perhaps it can be used by a much wider range of people.

Edit: I goofed - it does need root.
[Android Apps and Games] axxel6307:
[QUOTE

3% overnight, assuming 8 hours of sleep, doesn't actually sound too bad to me, even with a 3000 mAh battery. It depends what the device is doing while dozing, of course.[/QUOTE]

I wish there was an easy way to know what's waking it. I'm not rooted. Gsam felt pretty worthless to me. I did use another member heres adb method with wakelock detector to look at some stats and to be honest, I don't really understand what it reported to me. Nor do I think I'd be able to do anything about it. I'm already pretty barebones on my device. No social media, everything turned off except gmail.
[Android Apps and Games] ssrij:
It needs root to work, but you can circumvent that if you manually grant the DUMP permission via ADB.
[Android Apps and Games] axxel6307:
I'm currently using Greenify aggressive doze which currently enters doze at about 5 minutes after screen off. I believe ForceDoze is immediate at screen off. As far as doze timing is concerned, are there any stats/tests that show what the ideal doze time should be for a heavy user? Doesn't it use more battery bringing it out of doze every few minutes than if you were to leave doze off?
[Android Apps and Games] Ygor Cortes:
Look at this, guys. This is simply amazing! I could never reach this much Doze before. This app is incredible, thank you so much!

Btw the disable motion sensors for Doze (while keeping it on for the other things) feature is working great for me, Nexus 6 not rooted.
[Android Apps and Games] Elpatii:
Hi guys!

First of all, I want to thank the developer of this app, which is very well :)

I have (maybe) a problem: if I look the graphics of GSam, my phone enters in Doze mode only at night.

But if I look the logs of ForceDoze, my phone enters in Doze mode all of the day. I don't know if logs are strange, but I have many micro-sessions (a few seconds) while my phone is fixing on my desk.

Which is wrong?

For now, in 24 hours, I've lost 41% with screen on (3h SoT) and 12% with screen off. It's a lot, no? My Shield Tablet K1 (without root while my Nexus 6 is rooted) lost 0% of battery in 12 hours.
[Android Apps and Games] hhuimie:
Issue: many times when I reopen the screen, the app can not connect to network.

I must close wifi and reopen wifi.

It's so annoying.

another question: what's difference between forcedoze and power nap. should I use both?
[Android Apps and Games] noisyriver:
Sorry, but I think you are really wasting your time.

1. Greenifies Agressive Doze only works, when your device is not moved. Force Doze is working all the time, as long as your screen is of. So force doze will be better for you, as you main concern very obviously ;) seems to be to minimize battery drain. Disable Greenifies AD!

2. As Force Doze only improves battery drain when moving, you won't see any differences overnight between Greenify and FD. Maybe over night both will be a LITTLE better than normal doze behaviour as this waits half an hour before it kicks in - bit even this is minimal.

3. You device will NEVER go to 100 % deep sleep / 0% drain if turned off. Even if you only have Gmail. Some services need to run to make sure you get your mails. And this needs energy. Your normal phone connectivity needs energy. And your battery alone will lose energy even if not used at all! On top of this there are some other services, first of all Google Play. Maybe you could improve battery drain a little more when disabling this, but...

4. ...your drain is alway really great! 3% overnight (assuming you are not on on Flight mode) means something about 10% per day. Maybe with a lot of effort you could improve this by two or three percent but for what? You then most likely turn the Smartphone into a Dumbstone... ;) With your actual drain you can leave your device for 9 days alone and still having on the 10th day enough energy to read all the mails from the previous 9 days... ;) Even my old (not smart) phone 15 years ago did not stay on longer than five days without charging - and this one did not even know about E-Mails.

So calm down and don't fall into some sort of battery draining phobia... ;)

On my Note 4 with Stock Samsung Rom I had up to 3 percent drain per hour only with Whatsapp and Mail syncing. A lot of people find this normal...
[Android Apps and Games] ianmacd:
No, Greenify can also be instructed to ignore motion while dozing. See this thread and the first question in the FAQ.
[Android Apps and Games] axxel6307:
Haha I think its too late. Okay I see what you saying. However, greenify does disable motion sensors too, which mine are.
[Android Apps and Games] noisyriver:
Oh, I did not know. But reading from the FAQ it sounds to me, that in FD this is still better implemented? I also had the feeling that FD together with greenify did not give me any difference from FD alone. What do you think, if you tested this? So using greenify with the agressive doze option sounds to me still not as good as FD alone (and maybe look to end all apps always correctly with the back button) because Greenify needs some Wake locks. Your experiences would be interesting though.
[Android Apps and Games] axxel6307:
If you are not rooted, using greenify for hibernating apps will cause drain. I don't use it for hibernation, just the aggressive doze and motion disable. Eventually, I'll give FD a try. I understand FD dozes at screen off. I've been asking if that's good for a heavy user and haven't had any feedback yet....
[Android Apps and Games] ianmacd:
You can configure a pre-Doze delay in ForceDoze, so you can have a 1 minute (or longer) delay after screen-off before ForceDoze does its work to force your device into Doze.

The only problem with this delay is that ForceDoze uses a wakelock to ensure that nothing else interferes with it before it can do its work. If your screen turns on and off a lot in the course of a day, the use of this wakelock will mount up. On my phone, it grew to become the most time-consuming partial wakelock on the system.

For that reason, I have now removed the pre-Doze delay again, so that I can ascertain whether it's more efficient to have the device enter and exit Doze many times throughout the day, or use a 1 minute wakelock each time.

I don't recall seeing a wakelock used by Greenify to implement Aggressive Doze, even though it also delays dozing for a few minutes after screen-off. So, it could be that Greenify uses something superior to a wakelock, or is less reliable in putting the device to sleep. I really don't know. Anecdotally, I can say that there were times when I used Greenify's AD that the device inexplicably failed to Doze, and I almost never experience this with ForceDoze. I have no figures to support this, however, and so no conclusion can be drawn from it.
[Android Apps and Games] Droidphilev:
Hi,

Is it possible that logging inside the app isn't working after a reboot? When i open the app first time after a boot the service is running but the log is empty (haven't touched the device for about 20 mins after boot).

Nexus 6, Dirty Unicorns M 6.0.1, Rooted, Xposed
[Android Apps and Games] koboltzz:
There seems to be a problem with all force doze apps on MM at that moment:

Naptime: After 24-36h a process named 'time_daemon' goes wild immediately after turning display on and uses random cpu cores with random utilisation (20-35%)(system/bin)

Greenify aggressive doze: the same

ForceDoze

: the same

Culprit:

Enabling sensors after doze seems to provoke this bug

Fix:

Toggling display orientation on/off won't fix it.

Reboot fixes it

Killing with busybox won't fix it (after that 'system_server' goes wild)

Killing with taskmanager from '3C Toolbox' fixes it completly

Specs:

Nexus 6

Latest StockROM

Latest SuperSU (beta)

Latest ForceDoze (beta channel member)
[Android Apps and Games] xda-amg:
iI was trying the app. There is an unexpected behaviour I encounter. I expected to have interruptions in my background music playback. However music plays when screen off as usuall, preventing device to go to deep sleep. Howevet my notifications , for example Viber, are delayed until screen becomes on.

If not going to deep sleep, why interrupt in notification. Also why not going to deep sleep, when music player is not whitelisted?
[Android Apps and Games] ianmacd:
What's your hardware and software configuration?

I haven't seen this with either ForceDoze or Greenify. Naptime I haven't used enough to have noticed.

A couple of minutes spent googling suggests that problems with time_daemon might be Cyanogenmod-specific.
[Android Apps and Games] koboltzz:
My hardware and software configuration is in my post from the beginning :)

You will only notice it,

1. if you don't torn off your phone/ reboot your phone for quite some time (let's say 2-3 days, sometimes for me in 24h)

2. if you you watch your cpu utilisation closely (normal cpu utilisation when doing nothing 3-5%, when you open a taskmanager the monitoring will use up to 15% utilisation by itself, when the bug occurs it will be 30-35% overall and one core nearly 100%)

3. if you have an advanced taskmanager which will show each system process
[Android Apps and Games] ianmacd:
Sorry, I somehow skipped over your specs.

I do observe the performance of my devices closely enough that I should have seen this behaviour if it was occurring, so I believe it is not a problem on my hardware. Nevertheless, I will now explicitly watch for it and let you know if I see it. I do have different hardware to you, however.
[Android Apps and Games] ssrij:
Have you added your music player to whitelist?
[Android Apps and Games] ssrij:
You can remove the app from recents, it will still work
[Android Apps and Games] ssrij:
Tasker support is already there, you can create an intent from Tasker to disable/enable the service. Details are in the first post of this thread
[Android Apps and Games] Arstoien:
It seems I'm not able to activate Doze with this app. I don't have problem stepping in Doze via adb, Tasker or Greenify. But (everything else disabled) ForeDoze doesn't enable Doze. I'm using Nexus 5 on stock rom, latest security patch. SuperSU shows it has su access.
[Android Apps and Games] JoeFCaputo113:
You are amazing sir, sorry for not reading beforehand!! :D:good::highfive:

EDIT: So we put "com.suyashsrijan.forcedoze.ENABLE_FORCEDOZE" in the "Action" intent, correct? And target is supposed to be "Broadcast Receiver" right? Thanks man.

EDIT 2: Nvm, that's right ^^, got it to work! :good:
[Android Apps and Games] colonel_lp:
fantastic... 1.2.1 seems to work well, it's going into doze fine, yet it hasn't asked for root access despite following your install suggestions..

one thing I noticed is when taking the phone from my ear to hang up, the pattern unlock screen appeared and I had to unlock the phone to hang up. never happened before. can't get debug log as it won't ask for root access.

xperia Z3 d6603 | RSXW mm
[Android Apps and Games] ssrij:
You should check the log to see what's going on, the app writes a lot of debugging information there.
[Android Apps and Games] ssrij:
I am not sure why it didn't ask for root, I think your root app automatically granted it root permissions when you started the app, otherwise you should see a dialog box asking for SU access. You can try extracting the logcat via ADB and see what's going on. I don't think it has something to do with the app though
[Android Apps and Games] akama1:
Just downloaded and gonna start using it today. I don't use auto brightness and auto rotate. Set delay time to 10 minutes. App seems very promising so far... Will report back results in a few days time :)
[Android Apps and Games] patalao:
Trying it on LG G4 but after a while on screen off I can't turn the screen on,have to restart the phone.

Using stock settings.

Enviado do meu LG-H815 através de Tapatalk
[Android Apps and Games] akama1:
The op did mention about having problems on LG devices :/ hopefully it gets fixed soon
[Android Apps and Games] kryshnakishore:
Chcked my self, removing from recent still work in background. Killed using greenify then doze doesn't work
[Android Apps and Games] xda26:
Not compatible on lollipop
[Android Apps and Games] akama1:
Doze isn't even built into lollipop. Doze only comes with marshmallow and the purpose of this software is to force the phone to doze after screen off or after a duration of time that you set it.
[Android Apps and Games] akama1:
I've been using force doze.... Noticed that android os battery usage has significantly gone up and there are a lot of wakelocks from force doze
[Android Apps and Games] liver20:
Me too

Enviado desde mi Z1 mediante Tapatalk
[Android Apps and Games] colonel_lp:
there is no mention of forcedoze in SuperSU log, and I can't access forcedoze debug logs! the only thing I found in logcat is

05-17 07:41:35.161 I/ForceDoze(11213): android.permission.DUMP already granted, skipping SU check

xperia Z3 d6603 | RSXW mm
[Android Apps and Games] kain83:
Guys, I tried to Whitelist an app from sensorservice but it seems it doesn’t work at all. The app is GravityScreen, it makes me possible to turn on the screen when I put my phone out from my pocket or when I wave on the infrared sensor. So it seems that the IR sensor is deactivated even if I whitelist the app from sensorservice (and I put it in the whitelist also).

Any tip? Thank you!

p.s. of course if I enable motion sensors for all the app it works without any problem.
[Android Apps and Games] ssrij:
That's because the app you whitelist needs to request sensor access again from the API. It has to handle cases where the operating system cancels sensor access for apps or re-grants sensor access after cancelling.
[Android Apps and Games] kain83:
Ok, thank you for the explanation. So I have to enable motion sensors for all the app, maybe I will see improvement in the battery consumption anyway.

Thank you and good job!
[Android Apps and Games] B3311:
Fogive me for not having read the whole thread. I will after football?

On rev 43, Edge+, custom MM ROM, rooted, Xposed. According to the stats everything seems to be working. Thought I'd check FD with GSAM, an app I've never used before. Next to zero doze time shows on its graph when FD is active. Wasn't sure if that should be the case? In flight mode the doe time is continuous - 100%. Tried whitelisting GSAM, no difference.

I'll supply logs if needed later, just wondered if my setup is wrong? I sync nothing - literally. No calendar, sync nothing with Google, don't have facebook.

Thanks for any advice. Sorry for not trying to help myself first with a thorough read, an exception purely down to Euro 16....
[Android Apps and Games] xda-amg:
no app is added to my whitelist.

by the way I have OPO with Slimsaber rom, 6.0.1.
[Android Apps and Games] ianmacd:
Sample idle discharge measurements

I just woke my Galaxy S2 Tab (T710) from a 17½ hour Doze session, in which ForceDoze reports 7% of the battery charge was lost.

The device has a 4000 mAh battery, so that's 16.47 mAh per hour. At that rate and assuming a full charge, the device would have a 250 hour stand-by time.

Maintenance sessions seem to typically last between 5 and 15 minutes, although one during the night inexplicably kept the device busy for some 75 minutes.

Since ForceDoze isn't actually doing much once the device is in deep sleep, these figures don't say much about the app itself, but I thought they may be interesting anyway.
[Android Apps and Games] kryshnakishore:
Badly needed update, please remove motion sensor option it's confusing
[Android Apps and Games] Joy Bangla:
what's the problem bro?? You get easily confused often? provide details so dev can help
[Android Apps and Games] Idiosyncratinom:
With the download manager and Google play store apps whitelisted, downloads are still paused in doze.

To resume the downloads, I have to disable and then enable wifi .
[Android Apps and Games] ssrij:
That's normal, they will be resumed on screen on or during a maintenance window
[Android Apps and Games] ssrij:
Install GSAM and see what's eating the battery