yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] darkwolf_99:
[MENTION=5427507]ssrij[/MENTION]

Could you please send me the values settings of light doze and deep doze in forcedoze with ADB commands in Android N? I wonder if the adb commands can make my device into doze immediately after the screen turns off.
[Android Apps and Games] TotallyAnxious:
Could you look into adding magisksu support? Su is only requested when in the doze settings tuner and root options are greyed out on 7.0
[Android Apps and Games] ssrij:
What I see is, the app isn't requesting for permission on startup because it detects that the DUMP permission has already been granted.

Try doing this: Uninstall the app, delete any copies of the APK, then reboot your device and then install the app. Let me know if that changes anything.
[Android Apps and Games] ssrij:
You can find the values here: https://github.com/theblixguy/Force...shsrijan/forcedoze/ForceDozeService.java#L314
[Android Apps and Games] ssrij:
It's not possible to add support for specific SU apps. Any SU app should be automatically compatible. I'll check my code to see if there's something wrong that's preventing other SU apps from not showing the request dialog properly.
[Android Apps and Games] ssrij:
I have pushed out a new beta. Mostly bug fixes and small improvements. I also have improved the way the app requests SU access, it should work more reliably now.

If all is well, I'll make this the final build and release it for everyone tomorrow.
[Android Apps and Games] Bewildered Wolf:
Didn't work bro :/.

I uninstalled FD. Cleared Cache from Recovery.

Installed latest beta from XDA.

Still same result.
[Android Apps and Games] ssrij:
Try again, with the new beta I just released!

EDIT: There was a bug in the previous beta I released (v1.4.0 rev58). I fixed it. Please download the new beta (v1.4.0 rev59)
[Android Apps and Games] ssrij:
Whoops, a NullPointerException managed to sneak into the code, thus causing the service to crash. I have pushed another beta out that fixes it. My apologies!
[Android Apps and Games] Bewildered Wolf:
Still the same bro. I guess ll have to live with that :(
[Android Apps and Games] ssrij:
Open Debug logs (Settings -> Debug log) and share the log to me.
[Android Apps and Games] Bewildered Wolf:
Here bro.
[Android Apps and Games] ssrij:
ForceDoze: android.permission.DUMP already granted and user not on Nougat, skipping SU check

What's strange is, the SU permission is needed to grant android.permission.DUMP in the first place, so it's not possible that the app doesn't make the SU show the request dialog and at the same time make SU grant the DUMP permission. Can you grab the log from SU and share it?
[Android Apps and Games] turtle254:
What is the ADB command for "deviceidle" and do I set it to "0" for instant enter in to Doze at screen off?
[Android Apps and Games] Bewildered Wolf:
Sorry bro. Don't have super SU pro.
[Android Apps and Games] ssrij:
To force the device into deep Doze: adb shell dumpsys deviceidle force-idle deep

To revert: adb shell dumpsys deviceidle unforce
[Android Apps and Games] ssrij:
Well, something's wrong with SU then. It works fine on my Nexus 5X running Nougat 7.1.2 and SU 2.79-SR3.

As I said before, the DUMP permission cannot be granted using SU unless you accept the SU request. It could be that the SU is silently granting the request, but even in that case, the app will simply assume that root is available and unlock any root-dependant features.

Can you check if in SU settings, you have turned on "Re-authentication"?

If someone here is on Marshmallow and can replicate this bug, then please let me know along with the app log and SU log. I will then look into this, as I am not able to replicate this myself at present as I don't have a rooted Marshmallow device.
[Android Apps and Games] turtle254:
Does this go in to effect at screen off or just while using this while connect up to PC?
[Android Apps and Games] ssrij:
You have to connect your device to the PC first and then execute it. It goes into effect immediately. Once you force the device into deep Doze, it will only come out when you run the unforce command.
[Android Apps and Games] Bewildered Wolf:
Re-authentication is turned on bro.

Waiting for someone to replicate this :)
[Android Apps and Games] dcop7:
For me, it doesn't request root access. It never did. The options like "Doze app blocklist" are greyed out with the description "Root required".

Note: Versin 1.4.0 r59
[Android Apps and Games] Bewildered Wolf:
[MENTION=5427507]ssrij[/MENTION] same problem is with me bro ._.
[Android Apps and Games] DB126:
Recent builds of SuperSU have behaved erratically with certain ROMs. After spontaneously loosing root multiple times on CM 12.1 (sometime requiring a reflash of CM to restore the SU binary - argh!) I fell back to the native CM root manager and haven't had a problem since. Others noted issues with missing root prompts in Greenify and similar apps on various ROMs. I do have a near AOSP MM device with SuperSU 2.79 (base) and will try to test later today.
[Android Apps and Games] ssrij:
If you're on Marshmallow and on latest SU (v2.79-SR3) and facing this issue, then I need the app log and the SU log to understand why it's happening.
[Android Apps and Games] kunal1540:
Already given root permission On latest beta I can't access the new features which require root
[Android Apps and Games] petr232:
Any idea how to fix the issue where ForceDoze doesn't enter Doze unless the screen timeout is 5 seconds? Activating Ignore lockscreen timeout or changing Automatic lock to 0s causes this:
[Android Apps and Games] ssrij:
I have pushed a new beta update that should fix the issue.
[Android Apps and Games] ssrij:
Are you rooted? What device and OS version are you using?
[Android Apps and Games] petr232:
Rooted, Z3C Marshmallow.
[Android Apps and Games] ssrij:
Try the new beta I just pushed out.
[Android Apps and Games] ssrij:
New beta is out, containing bug fixes and small improvements.

I think everything is working fine for the most part. If there aren't any serious issues reported, I will make this version final and make it available to everyone.
[Android Apps and Games] darkwolf_99:
Sometimes new beta can make right exit records when the screen turns on and the device is woken up from deep doze.
[Android Apps and Games] dcop7:
I have a problem with this feature. If I select an app, when it enters doze, my icon in the homescreen disappears. I'm using Nova Launcher.
[Android Apps and Games] ssrij:
Does the icon come back when you turn on your device?
[Android Apps and Games] dcop7:
I think not. Maybe others can also test this.
[Android Apps and Games] zera89:
Lately my device is always in active status in gsam. it doesn't turn on Doze when I lock my device
[Android Apps and Games] DB126:
How is this related to Force Doze? Supporting logs would help the developer if there is a connection.
[Android Apps and Games] zera89:
It's related because I'm using force doze. And I'm not rooted so I need a pc to create logs.
[Android Apps and Games] android_htc:
I also tried blocking all apps except WhatsApp...icons come back in the app drawer but not the home screen if I recall correctly.

I am now just blocking notifications and this had good results overnight, only 2% battery drain for 6 hours or so.

I am using MM on Note 4
[Android Apps and Games] ssrij:
You can get a log using the Debug logs feature in the app (Settings -> Debug logs). Since you're unrooted, you will have to run this command before you can use this feature:

adb shell pm grant com.suyashsrijan.forcedoze android.permission.READ_LOGS

Also, when you post about an issue, please mention the following details: App version, OS/kernel version, device name and model.
[Android Apps and Games] ssrij:
I can confirm the icons disappear from the home screen. I think that's just a side effect of disabling apps.
[Android Apps and Games] DB126:
Well, you supplied one additional piece of key information (not rooted). Tough for a developer action bug reports w/o supporting detail.
[Android Apps and Games] ssrij:
The new app is live for everyone. Over the next few days I will continue to fix any issues that remain, as I get more logging data from the full user base. Look out for some more beta updates soon.
[Android Apps and Games] DB126:
Installed 1.4.0 rev 61 from Play Store. Received SU prompt on initial launch as expected and have access to all settings. Rooted w/Xposed. SuperSU as above.
[Android Apps and Games] Bewildered Wolf:
Yeah bro same here. [MENTION=5427507]ssrij[/MENTION] bro the problem is fixed on its own :) thank you for this app and your time and effort :)
[Android Apps and Games] zera89:
Sorry for my not so detailed post.

I'm on official Nougat on S7 Edge.

I'm trying to figure out if ForceDoz is working on my device checking "Gsam" stats in Wakelock and in a graph named Other. I'm not capable of understanding Wakelock data but in "other" graph I can't see any line in doze all day long.

I'll provide you a log very soon, I need to come home e grant the needed permission.

I really appreciate your help to make forcedoze work on my device. I'll surely donate, your app is awesome.
[Android Apps and Games] ssrij:
It could be because you have turned on the option "Don't disable sensors on screen off".
[Android Apps and Games] zera89:
That option is off.
[Android Apps and Games] ssrij:
Do you have Always on Display turned on? Maybe try turning it off.

Also, to check Doze time, you need to first click the triangle icon in GSAM (at the bottom) and select "Since screen off". Then click on "Held Awake" and it will show you the time your device has spent in Doze while your screen was off.

Let your device stay in Doze for a reasonable amount of time (30-45 mins) before checking it otherwise it won't have enough data.
[Android Apps and Games] milojoseph:
Recent updates has not be working. My gsam is reporting only 2hrs of deep sleep as i used to get 10hrs. Can you upload your previous apk so i can fever back.
[Android Apps and Games] ssrij:
I haven't really changed anything related to how the app puts the device into Doze. As I have mentioned before, in order to verify if the apps putting the device into Doze properly, let the device Doze for a reasonable amount of time first, then open GSAM and select "Last screen off" by clicking the triangle icon on the bottom and then select "Held Awake" and see if the timings match the timings shown in ForceDoze.

Anyhow, you can find all the APKs here: https://www.androidfilehost.com/?a=show&w=files&flid=57989
[Android Apps and Games] sunsero:
Do NOT watch, it's not related at all

He's spamming many threads with this link
[Android Apps and Games] bunty5555:
I will make also with your app...i am use your doze mode app its really great...amazing battery performance. ..thnks for make it
[Android Apps and Games] kryzeK:
[MENTION=5427507]ssrij[/MENTION] Hey! I did proper app shortcuts icons for ForceDoze. But since I can not find where they are in source, I'll post here for you :)
[Android Apps and Games] ssrij:
Wow, thanks a lot! I'll put them in the new update and credit you!
[Android Apps and Games] cleeezzz:
Hi ssrij, I really want to use this app over greenify but I can't get it to doze longer than a few seconds? I put the phone down for a couple hours and it didn't doze much at all. Attached screenshots of settings and log. This is on a Nexus 6P on 7.1.1 PureNexus.
[Android Apps and Games] ssrij:
Probably because you have the

experimental

option on ("Disable motion sensing for Doze"). Turn it off and it should work fine.
[Android Apps and Games] ssrij:
New beta is out!

New:

* Turkish translation (thanks Shepards on XDA!)

Changed:

* App Shortcuts icon design (Thanks kryzeK on XDA!)

Fixed:

* Rare crashes on some devices

* QuickTile not reflecting new state when turning on/off ForceDoze from the app itself
[Android Apps and Games] TotallyAnxious:
App is working much better for me now. The superuser stuff you did the other day seems to have fixed everything I mentioned. Just noticed this typo. The disable mobile data description says "wifi/data".
[Android Apps and Games] lilmikey201:
When i enable forcedoze my screen doesnt wakeup when i get a text. When i disable it everything works fine
[Android Apps and Games] justda:
Non rooted Sammy S7E 935T on the latest nougat firmware. My opinion since the nougat drop:

Works great, I can't give an exact amount of stand bye I am saving but I am guessing about 5 to 6% all day. For someone like me who is always turning on the screen to check the time this app is fantastic.

I tried it with AOD and I didn't notice any battery change. But I'm also not trying g to be exact here...

Bottom like the app works and is easy to use and set up without root, great job!
[Android Apps and Games] ssrij:
Thanks for letting me know, I've fixed that in the latest beta.
[Android Apps and Games] ssrij:
I dont think that's a big deal, imagine getting lots of notifications, your phone's screen would be constantly waking up and turning off, that would cause your battery life to go down.
[Android Apps and Games] ssrij:
I've pushed out another beta that should fix a crash introduced by a bug in the last beta when toggling ForceDoze on or off.
[Android Apps and Games] darkwolf_99:
Congratulations on releasing new official version!

A little issue of record often happens. In my unrooted 7.0, now new official version and new beta can always make correct records of exit deep doze, but there's no right exit records when the device is woken up from light doze. It isn't easy to find because it lasts in light doze for only about five minutes every time.
[Android Apps and Games] janbenes:
Not working on Yotaphone 2 Marshmallow

Unfortunately, Force Doze causes a persistent wakelock on my Yotaphone 2. The effect of that is that phone does not enter sleep at all and battery drain is much faster than without Force Doze.

The phone is not rooted, authorization via ADB has been granted. Log says that screen is on even while screen is off, that may be the problem. May it be related to the fact that I never lock my phone, I only turn the screen off. Or to fact that Yotaphone has secondary EPD screen. After uninstalling Force Doze the phone correctly enters sleep seconds after turning the screen off.
[Android Apps and Games] jmqm:
Does ForceDoze quickly jump into deep doze or light doze? And how does it prevent motion sensing - changing parameters or blocking the sensors? I'm trying to see how both ForceDoze and Naptime handle Doze, as all I want is my device to stay in Deep Doze, have only whitelisted applications give me notifications unless I turn on my phone.
[Android Apps and Games] ssrij:
Yeah I'll soon be updating the logging system which should fix this issue once and for all.
[Android Apps and Games] ssrij:
That's probably due to a Play Services or an OS bug. ForceDoze doesn't create an wake lock unless you use the Doze delay feature and if you do it only lasts for the length of the delay (obviously). On non-rooted devices, it simply changes few doze tuneables to make the device enter Doze, it doesn't touch anything related to wakelocks.

Yeah, EPD could be the issue.
[Android Apps and Games] ssrij:
On rooted devices, it jumps to deep doze immediately but you can customise the gap (delay). On non-rooted devices, it jumps to light doze, stays there for 5 mins, then jumps to deep doze. Once again, you can customise the gap (delay).

It prevents motion sensing by disabling sensors, but there's also an option to avoid doing that, but it's

experimental

, so it may or my not work.
[Android Apps and Games] jmqm:
If I were to change some of the Doze settings and turn on ForceDoze, does ForceDoze obey those rules or use defaults? Because I was thinking disabling motion sensing by giving it 0ms would be another option.
[Android Apps and Games] darkwolf_99:
V67 cannot be downloaded correctly. I've tried in my smartphone and PC. 0bit is only what I got. V62 is ok.

Would you please check it? Or just server issues?
[Android Apps and Games] DB126:
Same. Quebec mirror (#4).
[Android Apps and Games] ssrij:
Use another mirror then. And verify if the hashes match. The MD5 is d41d8cd98f00b204e9800998ecf8427e
[Android Apps and Games] DB126:
Not that simple. Tried a couple other mirrors (Europe, USA) with same result. Something may be farkled with AFH and/or the CDNs for the North American region.
[Android Apps and Games] darkwolf_99:
I've tried all mirrors again. Still 0bit. I'll try again later.
[Android Apps and Games] darkwolf_99:
Can't download right apk as well, still 0bit.

I think you'd better upload again. [MENTION=5427507]ssrij[/MENTION]
[Android Apps and Games] jaybee01:
Thanks. So if I understand correctly, from the time I turn off the display until Force Doze initiates the Doze, the phone does not enter sleep state? If I set timeout after screen off for 15 minutes then the phone waits for 15 minutes without deep sleep right? I think without Force Doze, the phone can actually wait in deep sleep for those 30 minutes until Doze kicks in.
[Android Apps and Games] PixelatedVision:
Anyone have issues with forcedoze and magisk?

Using magisk 11.1/with magiskSU/stock Nexus 6p

Can't add or remove anything from the whitelist
[Android Apps and Games] Licaon_Kter:
All mirrors 0 bytes here too. :(
[Android Apps and Games] B3311:
All good here. Same Magisk/SU, S7 Edge, Superman ROM.
[Android Apps and Games] sanderg:
Timeout

On my non-rooted S6 with Android 6.0.1, ForceDoze complains that my display timeout is 25 minutes and that is too high.

It offers to open Security settings.

However the timeout is set to 1 minute and this is set in Display, not Security settings.

Am I missing something or is this an internal check in ForceDoze that could be improved?
[Android Apps and Games] Devoct:
i'm glad i found this thread/app.

my device isn't on Android 6 officially, Doze is disabled in custom ROMs, even Greenify can't active Doze mode.

but with this app, my device finally dozes, and what makes it better, you don't need to tinker with bunch of variables, just turn it on and forget.

kudos to dev.
[Android Apps and Games] akama1:
How is doze even disabled in custom roms? I literally just saw greenify logging all my doze timings.
[Android Apps and Games] Devoct:
i don't know, it's a Xiaomi, Mi4i to be exact, not a popular device in XDA, custom ROM(non-MIUI) development is pretty lacking.

have tried Greenify, with Xposed, Naptime Aggresive Doze, etc. checked with Gsam 0% Doze, Greenify doze notification never pops.

Check Doze support app tells me that "Doze Config Flag" isn't enabled, but Sensor and Google Play Services support are supported.

with this app, "Enable Doze on unsupported device", rebooted, and voila, got doze notification from Greenify for the first time. :good::good:
[Android Apps and Games] Arstoien:
Could you fix the share function of the debug logs? Right now it always shows "error importing data". Also could you tweak the scrolling in the log? At the moment when I scroll, when I lift my finger, it immediatelly stops, i.e. there's no inertia.

Cheers!

Sent from my Nexus 5
[Android Apps and Games] optimummind:
[MENTION=5427507]ssrij[/MENTION] For the first time while using ForceDoze (version 1.2.3), I encountered the error whereby Doze started when the screen was turned on. I knew that b/c I have Greenify reporting the Doze intervals on the Notification panel (I'm not using Greenify's Aggressive Doze).

Normally when everything is working fine and I turn on my screen, the screen is initially a bit dim and becomes brighter as, I guess, the autobrightness sensor is reactivated.

And while I'm staring at the lockscreen, I see the Greenify Doze counter ticking forward for a couple seconds before the counter stops, indicating ForceDoze has been turned off after it detected the screen has been turned on.

But for several times today, things have become reversed.

Here is a screen shot to show you what I mean (even as I type this, the phone is still in Doze mode). The Doze time counter continues to run.

And now it's been in Doze for 9 mins.

In addition to the Doze counter continuing to run, when this reverse error occurs, my autibrightness gets messed up. Retoggling autobrightness doesn't reactivate autobrightness.

Toggling the ForceDoze service on and off inside the app doesn't fix the issue either. I'm guessing I would have to reboot the phone.

How could ForceDoze be improved so it can more accurately detect whether the screen is on or off?
[Android Apps and Games] Arstoien:
I'm finding the entering Doze somewhat unreliable. I think it may be related to me connecting bluetooth headphones with smartlock. My setup is Nexus 5, latest stock rom, App delay time 0s (haven't changed), Automatically lock 5min, Smart Lock on my BT headphones.

After about half an hour of screen off, the device hadn't been in Doze and the log shows:

8:57 ForceDozeService: Screen OFF received

8:57 ForceDozeService: Waiting for 300000ms and then entering Doze,

9:21 ForceDozeService: Doze delay: 0ms

9:21 ForceDozeService: Screen ON received

9:21 ForceDozeService: Cancelling enterDoze() because user turned on screen and 300000ms has not passed or disableWhenCharging=true

And yeah, I'm not charging.
[Android Apps and Games] piku 123:
Auto brightness is not working with latest 1.2.3 in moto e condor.
[Android Apps and Games] m4soN:
Hey guys, please don't blame me for that question.

What about Apps like Wunderlist (ToDo App), Evernote, Instagram, Calendar? Are these usually apps they always "ignore" the doze mode? And how can i figure out which app isn't ignoring that mode so i should whitelist it if needed?

Thanks for your help
[Android Apps and Games] rcherif38:
Is the bug that cause that i cannot wake up the phone after being in doze for a while solved in last version or still there ??

Using lg g3
[Android Apps and Games] colonel_lp:
I'm getting similar behaviour to you, most things are turned off on my phone included auto sync, I will get no doze for hours with the same screen on in the log but I haven't touched the phone for hours.

xperia Z3 d6603 | RSXW mm
[Android Apps and Games] restNow:
I have the same problem like Arstoien and you, as posted a few pages earlier. When all timeouts are set to 0 everything works fine. M phone is entering Doze when screen is turned off.

But when i have a timeout set (either in ForceDoze or in lockscreen settings in Android) it doesnt enter doze mode. My log looks like the one from [MENTION=4928198]Arstoien[/MENTION]. See my post on page 12.
[Android Apps and Games] ssrij:
It's just a text file that is being shared, any apps capable of sharing a text file (Pushbullet, GMail, etc) will be able to share it. I am not sure why that error happens, it's definitely not thrown by the app (I checked my code). Can you provide a screenshot?

The reason for that is because everything is loaded into a text box, and the only way to prevent people from accidentally deleting text or pasting anything is to remove the focus from it, which causes that issue. I'll see if there's a way to improve it
[Android Apps and Games] ssrij:
That's really weird. The app checks for screen on/off before entering Doze, and it's using standard Android APIs to do, so I am not sure if there's a better way to detect it. Have you checked the logcat? You can check what happens after the service receives a SCREEN_ON broadcast, if the device is dozing, it will exit Doze, otherwise it won't (obvious).
[Android Apps and Games] ssrij:
Can you send me the full logcat? I just want to check if the system did not suspend the ForceDoze service or denied it from entering Doze
[Android Apps and Games] ssrij:
I think the OS cancels a long running task, so having a long delay (10, 15, 30 mins) don't work. I know a more reliable way to handle it, I'll be pushing an update later today
[Android Apps and Games] ssrij:
It's unfixable on LG phones, the only way around it is by turning on "Enable motion sensor access for all apps" in app's Settings
[Android Apps and Games] ssrij:
No, by default, only some system apps are exempted from Doze mode. If you want to exempt another app from some of the Doze's restrictions (you cannot whitelist apps from Doze completely), you can add it to the app's whitelist and it will add it to Doze's whitelist.