[App] ForceDoze - Force Doze mode after screen off, disable motion sensors, etc - Android Apps and Games

Hi all,
ForceDoze allows you to forcefully enable Doze right after you turn off your screen, and on top of that, it also disables motion sensors so Doze stays active even if your device is not stationary while screen off. Doze will only deactivate periodically to execute maintenance jobs (like getting notifications, etc), otherwise it will remain fully active as long as your screen is off. This brings a lot more battery savings than standard Doze functionality, because even with screen off and Doze enabled, Doze is still periodically checking for movement, and disabling motion sensing improves battery life further.
Features:
Force enable Doze right after screen off
Disable motion sensors so Doze doesn't periodically poll the sensors to check if the device is stationary or not. This provides an additional boost to battery life
Whitelist apps so they don't get suspended or disabled when Doze mode is active
Doze battery stats: Shows you all the times your device has entered/exited Doze mode, and how much battery was available during those times. It will only work when ForceDoze service is turned on
Tasker support so you can now send com.suyashsrijan.forcedoze.DISABLE_FORCEDOZE broadcast intent to disable the ForceDoze service, or com.suyashsrijan.forcedoze.ENABLE_FORCEDOZE to enable the ForceDoze service
Tasker support for adding/removing apps from the Doze whitelist, so you can send com.suyashsrijan.forcedoze.ADD_WHITELIST broadcast intent along with packageName as the key and the package name you want to add as the value, in Extras. To remove the app from the whitelist, send the com.suyashsrijan.forcedoze.REMOVE_WHITELIST broadcast intent along with packageName as the key and the package name you want to remove as the value, in Extras. So for example, in Tasker, you can set Action as one of the intents above, and in Extras, add packageName:com.your.packagename and then save the task
Enable Doze mode on your device if your device OEM has disabled it (experimental)
No-root mode so you can use this app without root privileges (Requires you to execute an ADB command from your PC to grant it the android.permission.DUMP permission, instructions inside app and app description on Play Store)
Force Doze is a free & open-source app, so you can grab the app and the source code from:
Play Store: https://play.google.com/store/apps/details?id=com.suyashsrijan.forcedoze
Play Store Beta testing: https://play.google.com/apps/testing/com.suyashsrijan.forcedoze
Latest APK (v1.4.0 rev68): https://www.androidfilehost.com/?fid=457095661767144607
Latest Beta APK: Not available right now #
Github: https://github.com/theblixguy/ForceDoze
Frequently asked questions:
Auto-rotate/brightness doesn't work after turning on the device
Please turn on Auto-rotate/brightness fix in settings and restart the ForceDoze service. If that doesn't work, turn on "Don't disable sensors on screen off" in app Settings instead
I have trouble getting push notifications from apps (ex: GMail)
Only high-priority push notifications are delivered to the app while the device is in Doze mode, normal-priority notifications (ex: from Gmail) are delivered during the Doze maintenance window or when you wake up the device. This is an OS restriction and there's nothing that can be done about it
My device doesn't turn on and I have to restart my device to fix
This is most probably being caused by disabling motion sensors, pretty common on LG devices. To fix, turn on "Don't disable sensors on screen off" in app Settings and restart the ForceDoze service
The app doesn't work properly for some reason
If you're rooted, then make sure SU requests made by the app aren't getting denied by the SU app on your phone. Your SU app will occasionally prompt you to grant or deny SU access to ForceDoze and if you deny or ignore the dialog, then the app will not work properly and will fail to do certain things, like re-enabling sensors after exiting Doze or turning off Doze properly after screen on
Please let me know if you spot any bugs or unwanted behavior, or would like me to add more features to the app!

Gotta try this!
I suppose you have already tested it before?
What are the results?

ceftriaxone said:
Gotta try this!
I suppose you have already tested it before?
What are the results?
Click to expand...
Click to collapse
I am presently running it on my Galaxy S7 Edge and I don't face any issues!

if u want to translate the app, i can help with Pt-Br <3 downloading now

I experience rotation issues after installing your app on nexus 7v2. Excited to test this
Sent from my Nexus 7 using Tapatalk

sensor re enabling
I have posted this on Reddit page..(if you didn't see the issues posted there)
app doesn't ask for su
works even without su or adb(greenify notifies me)
even after sometime screen turned on rotation and auto brightness don't work
enabling sensor service option in app , disables doze on motion
thank you
sorry for my English

Is this the same like Greenify Aggressive Doze?

xk0niR said:
Is this the same like Greenify Aggressive Doze?
Click to expand...
Click to collapse
If I'm correctly interpreting the OP, it isn't. Greenify does use the sensors, while this app isn't.
Installed it 5 minutes ago, will report back after a while of testing.
Edit: I have problems too with brightness not responding anymore, until I uncheck and turn autobrightness back on...
Sent from the Matrix

I've been using this for the past 2 days & it's been great. Reduced my idle drain rate from 3 to 4% per hr to 1.5 to 2% per hr.
Sent from my SM-G935P using Tapatalk

Can we please have a whitelist option. Would love to use this , but still get notifications from Twitter and Snapchat. Thanks!

@ssrij I'm on 1.0.7 and I cant access the Google app store. I keep getting the "check your connection" error. What do I need to whitelist? Something is not waking back up properly. Don't have this issue with Greenify aggressive Doze.
Sent from my SM-G935P using Tapatalk

Donnie Sins said:
If I'm correctly interpreting the OP, it isn't. Greenify does use the sensors, while this app isn't.
Installed it 5 minutes ago, will report back after a while of testing.
Edit: I have problems too with brightness not responding anymore, until I uncheck and turn autobrightness back on...
Sent from the Matrix
Click to expand...
Click to collapse
First, kudos for a great app. Was looking for alternative to greenify since i consider it too aggressive for me. Just wanted to inform i have the same adaptive brightness bug. Must be ticked off and on for it to work.
Sent from my D6603 using XDA-Developers mobile app

JoeFCaputo113 said:
Can we please have a whitelist option. Would love to use this , but still get notifications from Twitter and Snapchat. Thanks!
Click to expand...
Click to collapse
There is. Lol
Sent from my A0001 using Tapatalk

PINki92 said:
I experience rotation issues after installing your app on nexus 7v2. Excited to test this
Sent from my Nexus 7 using Tapatalk
Click to expand...
Click to collapse
Please download the latest APK from the main post, reset ForceDoze from app settings, go to app settings again, turn on Enable Auto-rotate/brightness fix, turn on ForceDoze service and see if it fixes the issue
ajeesh vijayan said:
I have posted this on Reddit page..(if you didn't see the issues posted there)
app doesn't ask for su
works even without su or adb(greenify notifies me)
even after sometime screen turned on rotation and auto brightness don't work
enabling sensor service option in app , disables doze on motion
thank you
sorry for my English
Click to expand...
Click to collapse
Please download the latest APK from the main post, reset ForceDoze from app settings, go to app settings again, turn on Enable Auto-rotate/brightness fix, turn on ForceDoze service and see if it fixes the issue
xk0niR said:
Is this the same like Greenify Aggressive Doze?
Click to expand...
Click to collapse
Donnie Sins said:
If I'm correctly interpreting the OP, it isn't. Greenify does use the sensors, while this app isn't.
Installed it 5 minutes ago, will report back after a while of testing.
Edit: I have problems too with brightness not responding anymore, until I uncheck and turn autobrightness back on...
Sent from the Matrix
Click to expand...
Click to collapse
Please download the latest APK from the main post, reset ForceDoze from app settings, go to app settings again, turn on Enable Auto-rotate/brightness fix, turn on ForceDoze service and see if it fixes the issue
JoeFCaputo113 said:
Can we please have a whitelist option. Would love to use this , but still get notifications from Twitter and Snapchat. Thanks!
Click to expand...
Click to collapse
It's there, go to Menu > Settings > Whitelist apps

YYvo said:
First, kudos for a great app. Was looking for alternative to greenify since i consider it too aggressive for me. Just wanted to inform i have the same adaptive brightness bug. Must be ticked off and on for it to work.
Sent from my D6603 using XDA-Developers mobile app
Click to expand...
Click to collapse
Please download the latest APK from the main post, reset ForceDoze from app settings, go to app settings again, turn on Enable Auto-rotate/brightness fix, turn on ForceDoze service and see if it fixes the issue

optimummind said:
@ssrij I'm on 1.0.7 and I cant access the Google app store. I keep getting the "check your connection" error. What do I need to whitelist? Something is not waking back up properly. Don't have this issue with Greenify aggressive Doze.
Sent from my SM-G935P using Tapatalk
Click to expand...
Click to collapse
I don't think whitelisting Play Store will work, but you can try adding com.android.vending to the app whitelist. I don't know why that happens, try clearing Play Store cache or force stopping it, and make sure your internet connection is active and working, that could also be a reason why

@ssrij I downloaded & installed the 1.0.8 apk. When I open the app, it says 1.0.7.
Do you know when a scrolling list of whitelist apps will be available?
Sent from my SM-G925P using Tapatalk

optimummind said:
@ssrij I downloaded & installed the 1.0.8 apk. When I open the app, it says 1.0.7.
Do you know when a scrolling list of whitelist apps will be available?
Sent from my SM-G925P using Tapatalk
Click to expand...
Click to collapse
I have updated the link, try again now and follow the same steps.
It will be available in next version (1.0.9)

everything fine now .. but
latest build works great..
but still I don't understand.. app didn't request su (fresh installed latest build), I didn't grant dump
but still everything works...

ssrij said:
Please let me know if you spot any bugs or unwanted behavior, or would like me to add more features to the app!
Click to expand...
Click to collapse
Great idea !
But you should take some time to answer those questions about Greenify (difference, are they complementary or we should keep only one..), because we are used to it...

Related

[Q] can tasker be automated to turn off location completely?

is it possible to get tasker to automatically turn on GPS when when screen is on, and turn off GPS when the screen is off(or the device is locked)
i tried for about 2 hours yesterday and ended up giving up the most i could get it to do is just toggle the location settings
are you trying to duck NSA surveillance or increase battery life? because getting that working would accomplish neither.
Enddo said:
is it possible to get tasker to automatically turn on GPS when when screen is on, and turn off GPS when the screen is off(or the device is locked)
i tried for about 2 hours yesterday and ended up giving up
Click to expand...
Click to collapse
You will need secure settings plugin to do that, but yes, it should be possible.
I have a profile that enables GPS (active) only when I launch maps, and disables GPS (switch to battery saving mode in 4.4) when I exit maps.
In my case, disabling active GPS (i.e.. keep it in battery saving mode) helped random wakelocks from location reporting etc, Maps (navigation) is the only app that I use that needs active GPS. I don't have any other app that absolutely needs to have GPS coordinates for me.
Please use thread titles.
-----------------------
Sent via tapatalk.
I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit
xBeerdroiDx said:
are you trying to duck NSA surveillance or increase battery life? because getting that working would accomplish neither.
Click to expand...
Click to collapse
im trying to decrease wakelocks at night while sleeping. location + google now keeps my phone up almost all night. i just want to automate this instead of having to do it manually
jj14 said:
You will need secure settings plugin to do that, but yes, it should be possible.
I have a profile that enables GPS (active) only when I launch maps, and disables GPS (switch to battery saving mode in 4.4) when I exit maps.
In my case, disabling active GPS (i.e.. keep it in battery saving mode) helped random wakelocks from location reporting etc, Maps (navigation) is the only app that I use that needs active GPS. I don't have any other app that absolutely needs to have GPS coordinates for me.
Click to expand...
Click to collapse
battery saver mode + google now keeps my phone up all night with location pings. i need to disable location completely
Enddo said:
battery saver mode + google now keeps my phone up all night with location pings. i need to disable location completely
Click to expand...
Click to collapse
If location is set to Battery saver mode, that should not cause battery life degradation. But if it is, then 'disabling GPS' is not what you want to do - you want to see how to disable location reporting entirely (exactly as what your updated title indicates).
I don't think secure settings has been updated to support that feature in 4.4 - but hopefully other forum members will have suggestions.
jj14 said:
If location is set to Battery saver mode, that should not cause battery life degradation. But if it is, then 'disabling GPS' is not what you want to do - you want to see how to disable location reporting entirely (exactly as what your updated title indicates).
I don't think secure settings has been updated to support that feature in 4.4 - but hopefully other forum members will have suggestions.
Click to expand...
Click to collapse
i dont know what to tell you then. http://forum.xda-developers.com/showthread.php?t=2551846 shows tons of people with this issue
it doesn't drain battery while my phone is on and active. but when i lock the screen at night to sleep, my phone gets hardly any deep sleep mode. i took a shower yesterday and these two services woke my device up 96 and 44 times within a 20 minute span
i have already tried disabling location reporting and location history. this did not fix anything while my device was locked. it still had hundreds of wakeups at night
and i believe you're right. i dont think secure settings works with 4.4 either this is the issue i've been running into, i believe
Enddo said:
... believe you're right. i dont think secure settings works with 4.4...
Click to expand...
Click to collapse
It does work, but you first have to install the alternative helper in settings. Then Location Services will be enabled and you can turn it on and off when you want.
Sent from my Nexus 5
PhilipTD said:
It does work, but you first have to install the alternative helper in settings. Then Location Services will be enabled and you can turn it on and off when you want.
Sent from my Nexus 5
Click to expand...
Click to collapse
im pretty sure i installed that. well, first i installed the helper, and then i installed it as a service(option at hte bottom) since i had root
Enddo said:
im pretty sure i installed that. well, first i installed the helper, and then i installed it as a service(option at hte bottom) since i had root
Click to expand...
Click to collapse
Just make sure it's the alternative one.
Sent from my Nexus 5

Automate for Android...working on Huawei?

Hi guys. I am trying to use Automate for Android to do some simple tasks based on location. I have set the Automate app to stay open when screen lock and to be excluded from the battery optimization via the Special Access setting. However, Automate stops working if I leave my phone for a while. I assume its because of the Android Doze feature.
Has anyone got Automate to work?
tboooe said:
Hi guys. I am trying to use Automate for Android to do some simple tasks based on location. I have set the Automate app to stay open when screen lock and to be excluded from the battery optimization via the Special Access setting. However, Automate stops working if I leave my phone for a while. I assume its because of the Android Doze feature.
Has anyone got Automate to work?
Click to expand...
Click to collapse
have you tried turning off Settings - Battery - Settings icon top right - Close excessively power-intensive apps?
It shouldn't really be power intensive... but it's huawei so you never know...
There was a bug in C432B193 (?), and firmware released at the same time for other custs, which closed apps you were using in the foreground too, turning that option off fixed it so you could just test.
ante0 said:
have you tried turning off Settings - Battery - Settings icon top right - Close excessively power-intensive apps?
Click to expand...
Click to collapse
Thank you for the reply. I've tried that as well. Seems like Automate cant be made to work reliably with Huawei. I am going to go back to Tasker to see if I have better luck.
Trigger works fine for me. Always in memory.
Sent from my MHA-L29 using XDA Labs

Running apps being killed

As the title suggests, I keep finding apps that I'm using being killed, things like Google Music, tTorrent, and Sleep as Android all being closed while in use. I have selected "Don't Optimise" in the battery settings and "Advanced Optimization" is off.
Any ideas how I can stop this from happening?
Sent from my ONEPLUS A6003 using Tapatalk
steslatt said:
As the title suggests, I keep finding apps that I'm using being killed, things like Google Music, tTorrent, and Sleep as Android all being closed while in use. I have selected "Don't Optimise" in the battery settings and "Advanced Optimization" is off.
Any ideas how I can stop this from happening?
Click to expand...
Click to collapse
I had the very similar problem with tasker, it used to turn off because of something that I didn't knew, later after selecting don't optimise in the battery settings the Tasker remain in the background and it worked as it should be working.
Did you turned on anything in developer settings that limits the background activity?
mjp93 said:
I had the very similar problem with tasker, it used to turn off because of something that I didn't knew, later after selecting don't optimise in the battery settings the Tasker remain in the background and it worked as it should be working.
Did you turned on anything in developer settings that limits the background activity?
Click to expand...
Click to collapse
No I've not touched developer settings. I've noticed that the "don't optimize" setting keeps flipping back to optimise, that's probably why it's being killed all the time.
Another thing I've noticed, Google play music doesn't show in the list of apps under battery optimization so I can't even switch that off.
Sent from my ONEPLUS A6003 using Tapatalk
steslatt said:
No I've not touched developer settings. I've noticed that the "don't optimize" setting keeps flipping back to optimise, that's probably why it's being killed all the time.
Another thing I've noticed, Google play music doesn't show in the list of apps under battery optimization so I can't even switch that off.
Click to expand...
Click to collapse
Weird settings should not revert on its own. I just checked mine and they are staying on what I had selected.
I am out of answers, I hope other members will help you out.
Same Thing here my Ring doorbell keep shutting itself off in deep sleep and won't give notifications

How can I stop apps from being killed by doze?

Hello,
I have a GPS mock location app that keeps getting killed by doze and I want it to run until I stop it myself. I have excluded it from restrictions and battery optimization in settings but it keeps getting killed after a few minutes the screen goes off. I also have NapTime installed but I don’t know how to whitelist it there. If I can whitelist it there does anybody know how to?
Is Naptime causing it to be killed or that’s just oxygen OS ? In my nougat Samsung the app kept running until I stopped it myself.
Just remove them from being optimized.... Battery>battery optimization>then show all apps and tap on what you don't want killed and tap do not optimized
jamesfitzes said:
Hello,
I have a GPS mock location app that keeps getting killed by doze and I want it to run until I stop it myself. I have excluded it from restrictions and battery optimization in settings but it keeps getting killed after a few minutes the screen goes off. I also have NapTime installed but I don’t know how to whitelist it there. If I can whitelist it there does anybody know how to?
Is Naptime causing it to be killed or that’s just oxygen OS ? In my nougat Samsung the app kept running until I stopped it myself.
Click to expand...
Click to collapse
Open the app then go multitasking. Press the 3 dot on top and lock the app so it will always stay open. I Attached a pic so u can see
eduardmc said:
Open the app then go multitasking. Press the 3 dot on top and lock the app so it will always stay open. I Attached a pic so u can see
Click to expand...
Click to collapse
This works, thanks for the tip.
jamesfitzes said:
This works, thanks for the tip.
Click to expand...
Click to collapse
Np. Thats why we are here for
BTW do you know any battery efficient app for this? I am using Hola Fake GPS but it's killing my battery real hard

Issue with Battery Optimization - Please Help

Battery Optimization always turn off my MicroG and Volume Style
Detail:
I Use MicroG for Vanced, and Volume Style for swipe volume. (I like these two apps very much for several years) Then need to turn off battery optimization. I choose to not optimize. Then it will always back to optimize. Every day, every time I should find these two apps, and set to not optimize.
Open app setting and turn off battery saver too, still the same.
Is it because of MIUI Optimization ? is it okay to turn it off? Or I just have to give up using those two apps anymore :crying:?
you can turn off MIUI optimization. try enable microG in autostart. and disable Miui battery saver in microG. recomend use MIUI eu for this youtube vanced for better experience.
Pepiii said:
I Use MicroG for Vanced, and Volume Style for swipe volume. (I like these two apps very much for several years) Then need to turn off battery optimization. I choose to not optimize. Then it will always back to optimize.
Click to expand...
Click to collapse
Can confirm, I'm seeing the same here (Vanced on stock EU v12.0.3.0).
same here, especially if you reboot the optimisation comes back...very frustrating.
Alvian_P said:
you can turn off MIUI optimization. try enable microG in autostart. and disable Miui battery saver in microG. recomend use MIUI eu for this youtube vanced for better experience.
Click to expand...
Click to collapse
So, is it better to turn MIUI Optimization off or not ?
Pepiii said:
So, is it better to turn MIUI Optimization off or not ?
Click to expand...
Click to collapse
You don't need to turn off MIUI optimization. What's basically happening is that Microg doesn't request the proper app permissions for it to run on background smoothly. Even if you manually grant it the required permission i.e. Allow_in_power_save, it won't work, since it doesn't use it and MIUI requires it to be set to specify what to do. In short if you are worried about functionality then don't be. And if the notification bothers you, you can turn it off like in screenshots below.
Slim K said:
You don't need to turn off MIUI optimization. What's basically happening is that Microg doesn't request the proper app permissions for it to run on background smoothly. Even if you manually grant it the required permission i.e. Allow_in_power_save, it won't work, since it doesn't use it and MIUI requires it to be set to specify what to do. In short if you are worried about functionality then don't be. And if the notification bothers you, you can turn it off like in screenshots below.
Click to expand...
Click to collapse
I get it, so it means MicroG will still function well even though the notification appeared.
And what about function in Volume Style that always turn off because it back to optimize even I've already make it not optimize. Is there any suggestions what I have to do ?
seems MIUI battery settings seem to revert back after a while for "important apps" - such as Nova launcher for example.
i have optimisation off in developer settings, but no matter how many times i set specific apps to "no restriction" , MIUI 12 just reverts back after a little while.
nickmax1 said:
seems MIUI battery settings seem to revert back after a while for "important apps" - such as Nova launcher for example.
i have optimisation off in developer settings, but no matter how many times i set specific apps to "no restriction" , MIUI 12 just reverts back after a little while.
Click to expand...
Click to collapse
Developer options>standby mode
Try setting all buckets to active*; if they're not already locked to active, power management is active.
Find the app causing this and deal with it directly.
Power management... destroyer of worlds
*this may work but the power management app may simple reset the bucket state latter.
blackhawk said:
Developer options>standby mode
Try setting all buckets to active*; if they're not already locked to active, power management is active.
Find the app causing this and deal with it directly.
Power management... destroyer of worlds
*this may work but the power management app may simple reset the bucket state latter.
Click to expand...
Click to collapse
I have no setting in Developer Options called "Standby mode"
nickmax1 said:
I have no setting in Developer Options called "Standby mode"
Click to expand...
Click to collapse
I don't know then...
anyone found a solution for this? will using venced in root mode be any better?? what if one keeps the battery optimizations on for microG will venced still work as expected??
blzbh said:
anyone found a solution for this? will using venced in root mode be any better?? what if one keeps the battery optimizations on for microG will venced still work as expected??
Click to expand...
Click to collapse
For those wondering (this thread is a top match via Google), the solution is to simply enable the app icon in microG settings. You can get to settings via YouTube Vanced. Then MIUI will treat it like a standard app, allowing you to disable battery optimisation and it will persist across reboots.
nickmax1 said:
I have no setting in Developer Options called "Standby mode"
Click to expand...
Click to collapse
Standby apps...
This is how it should appear if global power management is disabled. Although the bucket shows all buckets as active, many are not and not using battery or any resources like ApkExport or Autostarts which weren't in the memory cache at the time this screen shot was taken.

Categories

Resources