UPDATE: On some phones with EMUI 9+ (Android P+) Huawei introduced a new task killer app called PowerGenie which kills everything not whitelisted by Huawei and does not give users any configuration options. See below how to uninstall it.
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.
Solution for users
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.
1. *Phone settings > Battery > App launch*. This feature may or may not be available for all devices or labeled differently.
2. Turn off “Manage all automatically"
3. Make sure to ENABLE! all toggles.
Also for reliable background processes you may need to uninstall PowerGenie as described below.
Startup manager seems to be a new kid on the block, preventing apps run automatically after the phone starts up.
- Go to Settings > All > Startup manager.
1. *Phone settings > All > Startup manager* and allow the app.
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.
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 running adb 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.
Please still follow the steps below – Huawei phones usually have multiple powersaving mechanisms.
Also, you may not have PowerGenie on your device, but your apps may still get killed by another mechanism.
EMUI 5.X y 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.
Stop your Huawei smartphone from closing apps when you lock the screen
Huawei smartphones are popular and used by millions of people all over the world. Unfortunately, all of them have one annoying feature: they aggressively close apps when you lock the screen, to save battery power, including apps that you may need to run in the background. This means that your Huawei smartphone may deactivate the antivirus that you installed for protection, the parental controls that you installed for your child, your fitness or your GPS navigation apps. Here is how to stop your Huawei smartphone from closing apps that you want to run in the background, even when you close the screen:
Why Huawei force closes apps when you lock the screen?
In short, to save battery power. Huawei’s EMUI Android version has always had aggressive battery saving algorithms. The thinking is that, when you close the screen, you do not need most apps to run in the background, and your Huawei smartphone closes them, so that they do not consume energy. This means that Huawei smartphones tend to have great battery life, but this comes at the cost of annoyances for users.
To help users, on their Android 7-based smartphones (Android Nougat), Huawei had a feature called “Protected Apps” which allowed users and app developers to set certain apps as “protected” so that they can keep running in the background even when the screen is closed. Unfortunately, starting with Android 8 Oreo and EMUI 8, this feature was renamed to “App launch” and people who knew about “Protected Apps” no longer know where to look.
What kinds of apps are negatively affected by Huawei algorithms?
Not all apps are affected by this problem. Huawei maintains a list of popular apps that are not closed from doing their thing in the background. Also, some app developers have integrated their Android apps well with Huawei smartphones, and do not have problems.
But, there is also a long list of apps that are negatively affected. First of all, antivirus apps like AVG Antivirus, Avast antivirus, Kaspersky Mobile Antivirus, ESET Mobile Security & Antivirus, Bitdefender Mobile Security, and more. Another important category of affected apps is parental controls like ESET Parental Control, Kaspersky Parental Control, Kids Place, and others. The big issue with this category of apps is that Huawei completely disables them, making them useless. Therefore, goodbye parental controls and your child remains unprotected.
Other apps that have big issues are fitness trackers of all kinds: Fitbit, Garmin, Endomondo, Strava, Under Armour Record, and more. Let’s say that you go out running, or you train for a sport. After you close the screen, it is likely that your Huawei smartphone force closes your tracking app, and at the end, nothing was tracked because the app was stopped from doing that.
Navigation apps are also negatively impacted by Huawei’s approach. Let’s assume that you go on vacation and you use HERE WeGo to get directions for a place that you want to visit. You set the destination, close the screen on your Huawei smartphone, place it in your pocket, and start listening to the instructions you get, in your headset. Huawei’s algorithms might close the navigation app to save battery because you closed the screen.
Other types of apps that are negatively impacted are VPN apps, voice recorders, chat apps, news apps, location-based apps, all kinds of tracking apps, etc. To solve this problem for all types of apps, follow the next steps in this tutorial:
Step 1. Open your Huawei smartphone’s battery settings
Unlock your Huawei smartphone, and go to its Settings app. Then, tap the Battery category of settings.
Step 2. Manually manage the apps that you do not want Huawei to close
On the App launch screen, you see a list with all the apps that are installed on your Huawei device. With a few exceptions controlled by Huawei, all of them should be set to “Manage automatically,” like in the screenshot below.
This means that your Huawei smartphone is free to force-close any of your apps, as it sees fit, according to its algorithms, each time you lock the screen. Find the first app that you want to configure, and turn off its switch to “Manage manually.” You immediately see a prompt where you are asked what kind of activities you want to allow the app to perform:
- “Auto-launch” – you allow the app to start itself automatically when you turn on the smartphone, or when it needs to run in the background.
- “Secondary launch” – you allow the app to be launched by other apps that need it.
- “Run in background” – you allow the app to keep running in the background for as long as it needs, whenever it needs to do that.
To eliminate all issues, it is a good idea to allow the app to perform all three types of activities, and tap OK. Find all the apps which you want to run in the background, and repeat the same settings. As you do this, notice that they have their switches turned off, and beneath their name, you see the text “Manage manually.” This is good, as it means that Huawei stops killing them each time you lock the screen on your smartphone.
BONUS: How to disable Huawei’s closing of apps, for all apps
If you are frustrated with how Huawei closes background apps when you lock the screen, you can disable this “feature” completely, for ALL your apps. To do that, in the “App launch”screen, tap the switch “Manage all automatically” and set it to disabled.
This disables the automatic handling of background apps, and lets all apps do what they want when they want. This might seem like a great idea, but do keep in mind that this setting is going to reduce your smartphone’s battery life. It might be best to set apps individually.
After you disable this feature for one app or more, a new link becomes available in the App launch screen: “Manage batch manually.” Tap on it.
You see all the apps for which the force-closure was disabled, and you can set individually, what kind of permissions you want to give to each app, for all three types of tasks: “Auto-launch,” “Secondary launch,” and “Run in background.”