Samsung
After 3 days any unused app will not be able to start from background (e.g. alarms will not work anymore). Imagine, you won't use your alarm clock for a the weekend +1 day and bang! no alarms any more and you miss work! We strongly suggest to turn off Adaptive battery and Put apps to sleep options per instructions below.
Important: The latest feedback suggests even when those options get disabled, Samsung may re-enable than later after a firmware update!
Yes, Samsung - a dominant vendor in the Android market - is now using one of the nastiest battery saving techniques in the industry. They kill background processes and render alarm clocks and other apps which rely on background processing useless. See below for workarounds.
What optimization apps does Samsung have?
- Android Pie and higher: Device care
- Android Oreo or Nougat: Device maintenance
- Android Marshmallow or below: Smart manager
Galaxy S10
Battery optimization is turned on by default. At some unclear moments (maybe on app update, OS update?), the settings also do revert back to the defaults, forcing you to turn them off again and again.
Sleeping apps
Sleeping apps menu is the sniper’s nest for Samsung’s app killing policies. Make sure to follow the instructions very carefully to prevent the apps from being killed.
Checklist:
- Disable Put unused apps to sleep
- Disable Auto-disable unused apps
- Remove your app from the list of sleeping apps
- Disable background restrictions for your app

from phone settings



(except Notifications)


using the trashcan icon
Galaxy S9
Battery optimizations are turned on by default. It is possible the disabled restrictions might get revert after OS update or reboot.
Checklist:
- Disable Put unused apps to sleep
- Remove your app from the list of Sleeping apps - list of apps not allowed to run on the background
- Remove your app from the list of Deep sleeping apps - list of apps that can only work when you open them
- Add your app to the list of Apps that won’t be put to sleep
- Disable Auto-optimization

from phone settings.



Put unused apps to Sleep .

the lists in Sleeping apps
and Deep sleeping apps.

in Apps that won't be put to sleep.

and tap the 3-dot menu.


Galaxy S8 (j6ltedx) and later
With the introduction of their flagship Galaxy S8 (and with some earlier experiments), Samsung has introduced a flawed attempt at prolonging battery life called App power monitor.
For your apps to work correctly, please whitelist them in App power monitor.
How to do it:
Open the Settings > Device maintenance > Battery and at the bottom you’ll see a list of your most frequently used apps. You can manage apps individually or in a group by selecting them then tapping the big Save power button. Apps that are sleeping will appear in the Sleeping apps list at the bottom (tap it to expand the list). Scrolling further — all the way to the very bottom — and you’ll find Unmonitored apps. These are apps that you specifically want to exclude (whitelist) from App power monitor evil reach.
When inside the Unmonitored apps menu, you can tap the 3-dot menu to add or delete apps from the list. Rather than bothering with any of that, you can just turn off the App power monitor feature completely as it has little-to-no impact on battery life and only serves to handicap the normal functioning of your Galaxy device.
It’s excessive and in some cases downright misleading, using scare tactics to keep you reliant on Samsung’s software when other Android devices get by just fine without it.
On other Samsung phones, the path may look like this:
Phone settings > Applications > select three dot menu (top right corner) > Special Access > Optimize Battery usage > Find your app on the list and make sure that it is not selected.
Note: If you enable “Edge Lighting” for your app, the app will not be able to wake up your screen. To allow your app to wake up your screen, please remove it from the Edge Lighting applications list.
OnePlus
OnePlus and their OxygenOS Android modification is known for maximizing the stock Android experience. This may be true on the UX front but the exact opposite is valid for background process limits.
When releasing their 1+5 and 1+6 phones, OnePlus introduced one of the most severe background limits on the market to date, dwarfing even those performed by Xiaomi or Huawei. Not only did users need to enable extra settings to make their apps work properly, but those settings even got reset with firmware updates. So apps break again and users are required to re-enable those settings on a regular basis.
Battery optimization
-
Turn off System Settings > Apps > Gear Icon > Special Access > Battery Optimization.
WARNING: Recently OnePlus phones started reverting this setting randomly for random apps. So if you set it to be not optimized, the next day it may be back to optimized.
To avoid the system to automatically revert the not optimized setting, you must also lock the app into the ‘Recent App’ list. (solution described here)
Start the app you want to protect. Go to Recent apps (App switcher). Toggle the Lock button on the upper right corner of the app (in newer versions you might have to long press on the app which will open a menu with the lock option).
This will avoid the app to be killed in background and the Battery optimisation setting to be reverted.
This is however not 100%. You may have to check system settings every once in a while. See a bug report filed to OnePlus. -
Turn off System settings > Battery > Battery optimization, switch to ‘All apps’ in top right menu > Your app > Don’t optimize
NOTE: Some of our users indicated that you need to disable Doze mode in Developer options in 1+3 and earlier.
App Auto-Launch
App Auto-Launch (on some OnePlus phones) essentially prevents apps from working in the background. Please disable it for your app.

Enhanced / Advanced optimization
- OnePlus 6 and further:
System settings > Battery > Battery optimization > (three dots) > Advanced optimization.
You’ll see two options there. Both are enabled by default:- Deep optimization or Adaptive Battery
This is the main app killer. If you need any apps to run in background, disable it. - Sleep standby optimization
OnePlus tries to learn when you are usually asleep, and in those times it will then disable the phone’s network connections. This setting will prevent push notifications from being delivered.
- Deep optimization or Adaptive Battery
- OnePlus below 6:
Turn off System settings > Battery > Battery optimization > (three dots) > Enhanced optimization.
NOTE: This should help with the problem where you lose Bluetooth connection to your smartwatch / fitness tracker (e.g. for sleep tracking).

Recent apps clearing behaviour
Normally when you swipe an app away, it won’t close. Android handles that well on its own. On OnePlus this may however work in a different way. Recent app clear behaviour manager might be set up in a way that swiping the app to close will kill it.


Huawei
We have mixed reviews on Huawei - the PowerGenie app is present on some EMUI 9+ systems, while on others it isn't.
Traditionally Huawei and their Android customization called EMUI belongs to the most troubled on the market with respect to non-standard background process limitations. There are no APIs and no documentation for those extensions. On default settings, background processing simply does not work right and apps working in background will break.
In some of the EMUI versions (we know about EMUI 4 at and we have some reports about EMUI 5 and now the latest EMUI 9) no user accessible settings can prevent the system to break background processing longer than 60 minutes. This is done by an evil custom service called HwPFWService (and in EMUI 9 this is called PowerGenie) developed and bundled with EMUI by Huawei.
App Launch on some EMUI 8, 9 and 10 devices (Huawei P20, Huawei P20 Lite, Huawei Mate 10…)
- Phone settings > Battery > App launch and then set your app to “Manage manually” and make sure everything is turned on.



Also for reliable background processes you may need to uninstall PowerGenie as described below.
EMUI 9+ devices
Classic battery optimization
Open Settings, and search for and access Battery optimization. Touch the little inverted triangle next to Don’t allow, touch All apps, locate and touch your app, and select Don’t allow.
PowerGenie
Huawei is extremely inventive in breaking apps on their devices. In addition to all the non-standard power management measures described below, they introduced a new task killer app build right into EMUI 9 on Android Pie.
It is called PowerGenie and it kills all apps that are not on its whitelist. You cannot add custom apps on their pre-defined whitelist. This means there is no other way to fix proper app functionality on Huawei than uninstalling PowerGenie.
Unfortunately this is a system app and can only be fully uninstalled using ADB (Android Debug Bridge) Source: XDA.
You need to:
-
install ADB on your computer
-
Connect your phone with a data cable
-
Enable Developer options
-
Enable USB debugging within Developer options on your device
-
Run the following commands on your computer:
adb shell pm uninstall -k --user 0 com.huawei.powergenie
adb shell pm uninstall -k --user 0 com.huawei.android.hwaps
If apps keep getting killed try runningadb shell pm stopservice hwPfwService
. We did not yet have this confirmed but it is possible you can alternatively just disable PowerGenie in Phone settings > Apps. This setting would need to be re-applied every time you reboot your device.
Also, you may not have PowerGenie on your device, but your apps may still get killed by another mechanism.
EMUI 5.X and 8.X
Classic battery optimization
Open Settings, and search for and access Ignore battery optimization. Touch the little inverted triangle next to Allow, touch All apps, locate and touch the app, and select Allow.
EMUI 6+ devices (and some EMUI 5 devices)
- Phone settings > Advanced Settings > Battery manager > Power plan set to Performance
- Phone Settings > Advanced Settings > Battery Manager > Protected apps – set your app as Protected
- Phone Settings > Apps > Your app > Battery > Power-intensive prompt [uncheck] and Keep running after screen off [check]
- Phone settings > Apps > Advanced (At the bottom) > Ignore optimisations > Press Allowed > All apps > Find your app on the list and set to Allow
Huawei P9 Plus
- Phone settings > Apps > Settings > Special access > Ignore battery optimisation > select allow for your app.
Huawei Honor 9 Lite, Huawei Mate 9 Pro
- Phone settings > Battery > Launch and then set your app to “Manage manually” and make sure everything is turned on. On EMUI 4 there is no way out, sorry, but you can ask developers of your apps to implement the workaround described in Developer section
Xiaomi
Traditionally, Xiaomi and their Android customization called MIUI belongs in the most troubled group on the market with respect to non-standard background process limitations and non-standard permissions. There are no APIs and no documentation for those extensions. In default settings, background processing simply does not work right and apps using them will break.
Note: Android One devices by Xiaomi work much better than MIUI-based devices. So, if you like Xiaomi, we definitely recommend looking for their Android One offering.
MIUI 12
To let your app run in the background, make sure settings for your app look like the following:



MIUI 11
To let your app run in the background, make sure settings for your app look like the following:


MIUI 10
To let your app run in the background, make sure your settings look like the following (here for example is Sleep as Android):



Power management
Please enable:
- Settings > Advanced Settings > Battery manager > Power plan is set to Performance
- Device Settings > Advanced Settings > Battery Manager > Protected apps – your app needs to be Protected
- Device Settings > Apps > your app > Battery > Power-intensive prompt and Keep running after screen off
- Settings > Additional Settings > Battery & Performance > Manage apps’ battery usage and here:
- Switch Power Saving Modes to Off
- Choose the next options: Saving Power in The Background > Choose apps > select your app > Background Settings > No restrictions
App battery saver
Security > Battery > App Battery Saver > your app > No restriction
Autostart
(according to Xiaomi:
Open Security app > Permissions > Auto-start
Enable "Autostart" for desired apps.



App pinning
When you open the recent apps tray, drag your app downwards (it will be locked). So, even if you clear recent apps, it will not clear them from the background. Drag downwards again to clear your app from the background.
Meizu
Meizu is probably on par with Huawei and Xiaomi in their approach to background process limitations, but they get a better rank probably just because those devices are not that common on the market, and thus do not cause such pain to the developers as the aforementioned.
Adjust your settings:
- Device Settings > Advanced Settings > Battery manager > Power plan set to Performance
- Device Settings > Advanced Settings > Battery Manager > Protected apps – check your app as Protected
- Enable Device Settings > Apps > your app > Battery > Power-intensive prompt and Keep running after screen off
Asus
On Asus devices there is an optimization app called Power Master pre-installed with some modifications made by default, e.g. blocking apps from starting and killing background tasks when your screen turns off.
However, if you know how, you can easily disable these.
The evil app on Asus is called Power Master - see the screenshots below. To make sure apps background processing works, set up the following:
- Uncheck Mobile Manager > PowerMaster > Settings (or Battery-saving options) > Clean up in suspend
- Uncheck Mobile Manager > PowerMaster > Settings (or Battery-saving options) > Auto-deny apps from auto starting.
See below for screenshots.





Wiko
We are still collecting feedback on Wiko devices, so the following may not be a exhaustive list of issues. Wiko devices are however definitely problematic in terms of non-standard background process optimizations and adjustments to the settings that need to be done to make apps work properly.
- Go to Phone Assistant / Manager > Battery > turn off Eco Mode.
- Go back and go to Manual mode
- Tap on the Gear icon on top right > Background apps whitelist > Now select Your app

and tap Tap Power Saver

and tap "Optimized mode"

, or make sure your app is not optimized


background process whitelist

is on the list
Alternatively:
Go to dialer and put the code *#*#86569726#*#*
and uncheck Lowram Enable And Background enable.
Note: This needs to be done again after reboot.
Vivo
System restrictions on Vivo phones have not been fully uncovered yet. If you have any additional information, please let us know.
The apps loading from the background need a special permission for Autostart.
Autostart
Based on the information by Vivo, this option should be present on all Vivo phones.
Newer OS version: Settings > More settings > Applications > Autostart to turn on/off the app switch.
For Funtouch OS 2.6 and lower version: i Manager > App manager > Autostart manager to turn on/off the app switch.
Vivo Y91
Lock the app in taskbar
Apps locked in the taskbar are safe from getting terminated when they run on the background.
1. Swipe up in your home screen while the app is open in background, and swipe the app icon down.
2. Tap the lock icon.
3. Done - now the app is locked in the taskbar.

while it is open in the background.


Allow the app to keep running even during high power consumption
1. Go to system Settings > Battery.
2. Go to High background power consumption.
3. Find your app in the list and enable the high battery consumption.



Oppo
We have currently only information for Oppo F1S, but on other models the situation may well be similar.
Oppo F1S
Background services are being killed (including accessibility services, which then need re-enabling) every time you turn the screen off. So far, a workaround for this is:
- Pin your app to the recent apps screen.
- Enable your app in the app list inside the security app’s “startup manager” and “floating app list” (com.coloros.safecenter / com.coloros.safecenter.permission.Permission).
- Turn off battery optimizations.
- Give the service a persistent notification to remain in the foreground.
All four of those need to be done before the app would function. Here are links to some other resources verifying that some of the above steps work on other Oppo devices:
Lenovo
We’re still gathering more info on battery saving features on Lenovo devices.
Lenovo P2
Lenovo P2 has a very good battery life, but at a cost.
For an app to work in the background:
- Enable the padlock icon at an app in the right top corner in the overview of running apps. It’s only then actually running as a foreground process. If you swipe it away, its background process will be killed mercilessly.
It does not matter if the battery/power optimization is “On” or “Off” in Settings -> Apps -> Your app -> Battery.
Sony
Sony gets a high bar in our listing of toxic Android vendors, as historically Sony introduced the first very effective non-standard background process optimization and opened Pandora’s box.
It is called Stamina mode, and it instantly breaks all background processes and all alarms if enabled.
Never use Stamina mode if you want your device to do something useful when not actively using it.
Try to make your app not battery optimized in Phone settings > Battery > Three dots in the top right corner > Battery optimisation > Apps > your app.
Nokia
Good news: HMD Global claims to disable Evenwell powersaving apps on all devices running Android Pie or newer.
NOT SO GOOD NEWS: DuraSpeed remains.
HMD Global/Nokia was the main reason this website came to exist. They had the most aggressive app killers preinstalled on their phones.
There were three different app killing mechanisms:
- com.evenwell.powersaving.g3 on Android Pie for most Nokia phones - this one has been disabled since 8/2019 on devices running Pie or greater
- com.evenwell.emm on Android Go (Oreo?) for Nokia 1 - probably still in the wild since HMD only disabled Evenwell apps for Pie or greater
- DuraSpeed on Android Pie (build 00WW_3_180) for the US Nokia 3.1 (TA-1049, TA-1063) and Nokia 5.1 - this one is still in the wild
Most Nokia phones (Power saver AKA com.evenwell.powersaving.g3)
The text below has been left here to preserve the detail and history of events.
Note: In Feb/March 2019, apparently on a few models distributed in Europe and US, the Evenwell Power Saver has been reworked to not kill the apps as aggressively, which largely resolves all issues for those models.
Nokia on Android O and P kills any background process including sleep tracking (or any other sport tracking) after 20 minutes if the screen is off. Also when killed all alarms are stopped which renders for example any alarm clock apps useless.
We have investigated this issue in details. We did even purchase a Nokia 6.1 to be able to reproduce the issue. The problem only occurs on Nokia devices with Android Pie. Nokia started to bundle a toxic app (package: com.evenwell.powersaving.g3 or com.evenwell.emm, name: Power saver) with their devices by some 3rd party company Evenwell. This app kills apps in the most brutal way we have seen so far among Android vendors.
Whitelisting apps from battery optimizations does not help! Evenwell kills even whitelisted apps.
What this non-standard app does is every process gets killed after 20 minutes regardless it is actually supposed to be running and doing a useful job for the user. Also alarms are not triggered. The aim is apparently to save your battery by rendering tracking apps and other apps that use background processing useless.
Moreover even third-party user visible alarms (alarm clock alarms) are not triggering properly on Nokia as foreground services cannot be started from background on Nokia. This is a serious issue unparalleled to any other vendor. We did not yet find a workaround for this :(. 3rd party alarms clock / calendars etc… won’t be realiable on Nokia.
You can read more on this issue here: https://community.phones.nokia.com/discussion/3428/background-service-killed-even-when-whitelisted
For fun investigative read about Evenwell, check out Who is Nokia?
Nokia 1 (com.evenwell.emm)
On Nokia 1 there is an alternative package that works very similar to what the com.evenwell.powersaving.g3 package is doing on the higher end models.
Nokia 3.1 and 5.1 (DuraSpeed)
On Mediatek-based devices, HMD has baked in DuraSpeed as a system service. There is no user-facing control, or whitelist; this Mediatek-developed task killer terminates all background apps without prejudice.
DuraSpeed can be disabled through the global settings store, but this is a protected area of Android that can only be manipulated through adb, or an app that has been granted the WRITE_SECURE_SETTINGS
permission (which must also be done with ADB). Additionally, the setting does not survive a reboot. Users can fix their devices themselves using an automation app (see “Solution for users”), or apps can request the WRITE_SECURE_SETTINGS
permission and then cycle the flag on startup to kill DuraSpeed. Syncthing-Fork is one app that has taken this approach.
Unfortunately, there are some reports that even this fix does not work.
Most Nokia phones (Power saver AKA com.evenwell.powersaving.g3)
To fix this issue, please do the following:
- Go to Phone settings > Apps > See all apps.
- Tap on the right top corner menu > Show system.
- Find Power saver app in the list, select it and Force close. It will remain stopped for a while, but will restart itself eventually.
From now on, background apps should work normally and use the standard Android battery optimizations.
Still 3rd party alarm clocks or any task scheduling of foreground tasks at a particular time won’t work. We do not have any solution for this at the moment UPDATE: in our preliminary tests it seems that force stopping or uninstalling the Power saver app also fixes alarms and starting of foreground services, until the Power saver restarts.
Alternative solution for tech-savvy users:
Most Nokia models
Disable the com.evenwell.powersaving.g3 package via the following adb commands:
adb shell
pm disable-user com.evenwell.powersaving.g3
Nokia 1 (Android Go)
Disable the com.evenwell.emm package via the following adb commands:
adb shell
pm disable-user com.evenwell.emm
Nokia 3.1 and 5.1
Regrettably, HMD did not include any sort of Settings switch to control DuraSpeed’s operation. And since the task killer is a system service and not an app, it cannot simply be uninstalled. Fortunately, DuraSpeed does have a hidden kill switch: It watches the setting.duraspeed.enabled
setting and will stop itself when the flag is set to any value that does not equal 1
. Once DuraSpeed stops itself, the phone is cured and all background apps will function normally. However, this workaround does not stick across reboots, so the flag has to be cycled at every boot using an automation app like MacroDroid.
First, use adb to grant MacroDroid (or your choice of automation app) the ability to write to the global settings store:
adb shell pm grant com.arlosoft.macrodroid android.permission.WRITE_SECURE_SETTINGS
Then create a task, triggered at Device Boot, that performs the following:
- System Setting: type Global, name setting.duraspeed.enabled, value 2
- System Setting: type System, name setting.duraspeed.enabled, value 2
- System Setting: type Global, name setting.duraspeed.enabled, value 0
- System Setting: type System, name setting.duraspeed.enabled, value 0
NOTE: You need both ‘Global’ and ‘System’ type settings (the screenshots below show only Global - you get the idea).


Run this task and verify there are no errors. If all is well, then DuraSpeed will be immediately disabled, and it will also be disabled on reboot.
Nokia
Good news: HMD Global claims to disable Evenwell powersaving apps on all devices running Android Pie or newer.
NOT SO GOOD NEWS: DuraSpeed remains.
HMD Global/Nokia was the main reason this website came to exist. They had the most aggressive app killers preinstalled on their phones.
There were three different app killing mechanisms:
- com.evenwell.powersaving.g3 on Android Pie for most Nokia phones - this one has been disabled since 8/2019 on devices running Pie or greater
- com.evenwell.emm on Android Go (Oreo?) for Nokia 1 - probably still in the wild since HMD only disabled Evenwell apps for Pie or greater
- DuraSpeed on Android Pie (build 00WW_3_180) for the US Nokia 3.1 (TA-1049, TA-1063) and Nokia 5.1 - this one is still in the wild
Most Nokia phones (Power saver AKA com.evenwell.powersaving.g3)
The text below has been left here to preserve the detail and history of events.
Note: In Feb/March 2019, apparently on a few models distributed in Europe and US, the Evenwell Power Saver has been reworked to not kill the apps as aggressively, which largely resolves all issues for those models.
Nokia on Android O and P kills any background process including sleep tracking (or any other sport tracking) after 20 minutes if the screen is off. Also when killed all alarms are stopped which renders for example any alarm clock apps useless.
We have investigated this issue in details. We did even purchase a Nokia 6.1 to be able to reproduce the issue. The problem only occurs on Nokia devices with Android Pie. Nokia started to bundle a toxic app (package: com.evenwell.powersaving.g3 or com.evenwell.emm, name: Power saver) with their devices by some 3rd party company Evenwell. This app kills apps in the most brutal way we have seen so far among Android vendors.
Whitelisting apps from battery optimizations does not help! Evenwell kills even whitelisted apps.
What this non-standard app does is every process gets killed after 20 minutes regardless it is actually supposed to be running and doing a useful job for the user. Also alarms are not triggered. The aim is apparently to save your battery by rendering tracking apps and other apps that use background processing useless.
Moreover even third-party user visible alarms (alarm clock alarms) are not triggering properly on Nokia as foreground services cannot be started from background on Nokia. This is a serious issue unparalleled to any other vendor. We did not yet find a workaround for this :(. 3rd party alarms clock / calendars etc… won’t be realiable on Nokia.
You can read more on this issue here: https://community.phones.nokia.com/discussion/3428/background-service-killed-even-when-whitelisted
For fun investigative read about Evenwell, check out Who is Nokia?
Nokia 1 (com.evenwell.emm)
On Nokia 1 there is an alternative package that works very similar to what the com.evenwell.powersaving.g3 package is doing on the higher end models.
Nokia 3.1 and 5.1 (DuraSpeed)
On Mediatek-based devices, HMD has baked in DuraSpeed as a system service. There is no user-facing control, or whitelist; this Mediatek-developed task killer terminates all background apps without prejudice.
DuraSpeed can be disabled through the global settings store, but this is a protected area of Android that can only be manipulated through adb, or an app that has been granted the WRITE_SECURE_SETTINGS
permission (which must also be done with ADB). Additionally, the setting does not survive a reboot. Users can fix their devices themselves using an automation app (see “Solution for users”), or apps can request the WRITE_SECURE_SETTINGS
permission and then cycle the flag on startup to kill DuraSpeed. Syncthing-Fork is one app that has taken this approach.
Unfortunately, there are some reports that even this fix does not work.
Most Nokia phones (Power saver AKA com.evenwell.powersaving.g3)
To fix this issue, please do the following:
- Go to Phone settings > Apps > See all apps.
- Tap on the right top corner menu > Show system.
- Find Power saver app in the list, select it and Force close. It will remain stopped for a while, but will restart itself eventually.
From now on, background apps should work normally and use the standard Android battery optimizations.
Still 3rd party alarm clocks or any task scheduling of foreground tasks at a particular time won’t work. We do not have any solution for this at the moment UPDATE: in our preliminary tests it seems that force stopping or uninstalling the Power saver app also fixes alarms and starting of foreground services, until the Power saver restarts.
Alternative solution for tech-savvy users:
Most Nokia models
Disable the com.evenwell.powersaving.g3 package via the following adb commands:
adb shell
pm disable-user com.evenwell.powersaving.g3
Nokia 1 (Android Go)
Disable the com.evenwell.emm package via the following adb commands:
adb shell
pm disable-user com.evenwell.emm
Nokia 3.1 and 5.1
Regrettably, HMD did not include any sort of Settings switch to control DuraSpeed’s operation. And since the task killer is a system service and not an app, it cannot simply be uninstalled. Fortunately, DuraSpeed does have a hidden kill switch: It watches the setting.duraspeed.enabled
setting and will stop itself when the flag is set to any value that does not equal 1
. Once DuraSpeed stops itself, the phone is cured and all background apps will function normally. However, this workaround does not stick across reboots, so the flag has to be cycled at every boot using an automation app like MacroDroid.
First, use adb to grant MacroDroid (or your choice of automation app) the ability to write to the global settings store:
adb shell pm grant com.arlosoft.macrodroid android.permission.WRITE_SECURE_SETTINGS
Then create a task, triggered at Device Boot, that performs the following:
- System Setting: type Global, name setting.duraspeed.enabled, value 2
- System Setting: type System, name setting.duraspeed.enabled, value 2
- System Setting: type Global, name setting.duraspeed.enabled, value 0
- System Setting: type System, name setting.duraspeed.enabled, value 0
NOTE: You need both ‘Global’ and ‘System’ type settings (the screenshots below show only Global - you get the idea).


Run this task and verify there are no errors. If all is well, then DuraSpeed will be immediately disabled, and it will also be disabled on reboot.
AOSP (Pixel, Nexus...)
On Pixels and Nexuses you have the least chance something goes wrong with background processing, but still there are several places to look at!
Some use-cases are no longer possible or paradoxically more battery consuming (e.g. gathering sensor data through sensor batching,see Solution for developers) with the introduction of Doze mode in Android 6+ and you may need to opt the app out of battery optimizations to make it work properly.
Also a serious Doze mode bug in Android 6.0 that prevented foreground services from doing their intended job (see Solution for devs for workaround), but luckily this was later fixed in 7.0.
After Android 8, users or even the system (Adaptive battery in Android 9) can decide to prevent your app’s background processes from working and you may need to check the Background restrictions (or limits) option in your phone settings.
Android P
There’s a special option in Settings > Apps > Your app > Advanced > Battery > Background restrictions. If users accidentally enable this option, it will break their apps. And users do enable that option!
Pie and pre-Pie
If you see background processing issues, overall it is a good idea to make your app not battery optimized to ensure it gets the freedom it needs to perform in the background.
For that:
- Go to Settings > Apps > Your app > Advanced > Battery > Battery optimization
- Change view to All apps
- Search for your app
- Choose Not optimized
Android O
Make sure Settings > Apps > Your app > Advanced > Battery > Background limitations is not enabled. If the app is not yet optimized for Oreo API level it will break their background processing.
If all fails
If all fails you can turn doze mode completely off in Settings > Developer options. (If you don’t know how to enable developer options, a web search-engine should help.)
HTC
When you have connections such as Wi-Fi on while the phone is in sleep mode, some apps may still continue to use the battery. Starting from Android 6.0, battery optimization is enabled for all apps by default which helps prolong battery standby time when you’re not using the phone. The phone needs to be sitting idle for an extended period of time before battery optimization takes effect.
If there are apps that you don’t want battery optimization enabled, you can turn the feature off in those apps.
- Open up Phone Settings.
- Tap Power.
- Tap Battery optimization.
- Tap Not optimized > All apps to see the complete list of apps.
- To turn off battery optimization in an app, tap the app name, and then tap Don’t optimize > Done. Repeat this process to turn off optimization in other apps. To filter the list and see which apps have battery optimization disabled, tap All apps > Not optimized.
AOSP (Pixel, Nexus...)
On Pixels and Nexuses you have the least chance something goes wrong with background processing, but still there are several places to look at!
Some use-cases are no longer possible or paradoxically more battery consuming (e.g. gathering sensor data through sensor batching,see Solution for developers) with the introduction of Doze mode in Android 6+ and you may need to opt the app out of battery optimizations to make it work properly.
Also a serious Doze mode bug in Android 6.0 that prevented foreground services from doing their intended job (see Solution for devs for workaround), but luckily this was later fixed in 7.0.
After Android 8, users or even the system (Adaptive battery in Android 9) can decide to prevent your app’s background processes from working and you may need to check the Background restrictions (or limits) option in your phone settings.
Android P
There’s a special option in Settings > Apps > Your app > Advanced > Battery > Background restrictions. If users accidentally enable this option, it will break their apps. And users do enable that option!
Pie and pre-Pie
If you see background processing issues, overall it is a good idea to make your app not battery optimized to ensure it gets the freedom it needs to perform in the background.
For that:
- Go to Settings > Apps > Your app > Advanced > Battery > Battery optimization
- Change view to All apps
- Search for your app
- Choose Not optimized
Android O
Make sure Settings > Apps > Your app > Advanced > Battery > Background limitations is not enabled. If the app is not yet optimized for Oreo API level it will break their background processing.
If all fails
If all fails you can turn doze mode completely off in Settings > Developer options. (If you don’t know how to enable developer options, a web search-engine should help.)
Other vendors
Whatever device you are using, don’t blame the developers as the first thing when something goes wrong. First check your phone settings whether some background processing is not restricted on your device.
See below for general solutions that apply for various vendors.
Android 6+
Always check the following setting Phone settings > Battery & power saving > Battery usage > Ignore optimizations > Turn on to ignore battery optimization for your app.
Android 8+
Check if Phone settings > Apps & Notifications > Your app > Background restrictions or Background limits are not enabled for the app.
If all fails you can turn Doze mode off completely.
Turn off doze on Android 6.0 and earlier
In Settings > Developer options. (If you don’t know how to enable developer options, Google should help.)
Turn off doze on Android 7+
Requires expert skills
dumpsys deviceidle disable
If all fails
Look for any vendor-specific battery saver on your device and ideally uninstall if possible, disable if possible.
If not, you are left with the option to root your device or uninstall it though adb (requires some expert skills though):
adb shell
pm uninstall --user 0 com.useless.piece.of.trash
Look through the vendor-specific phone settings and search for anything related to battery optimization or background processing. If you find it try to disable it.
Try the generic approach below as some vendors tent to hook more fuctionality into this than AOSP
Phone settings > Battery & power saving > Battery usage > Ignore optimizations > Turn on to ignore battery optimization for your app.