- 3C All-in-One Toolbox
- Other Apps
Kill / force-stop
Ability to kill / force-stop depends on Android version and root.
Force-stop: This method prevents an app from running in the background until user opens its UI. This is the preferred method to prevent battery drain, however it is not available on all versions of Android. Without root, it requires the use of the accessibility service and opening an OS screen, causing some ugly flickering.
To enable force-stop on a non-rooted Android device, the app's accessibility service must be activated.
The app can do that automatically in a highly optimized way if granted WRITE_SECURE_SETTINGS. This permission can ONLY be granted from a PC using ADB (see how to install ADB here and enable USB debugging here) and running the following command:
pm grant <package_name> android.permission.WRITE_SECURE_SETTINGS
Once that command has been issued, the app will be able to force-stop other apps (with an ugly screen flicker).
Kill: While available without root on any Android versions, it won't prevent an app from restarting if it uses background services. This method will not interfere with other app's behavior, but will unlikely prevent battery drain caused by apps running in background.
Starting with non-rooted Android N, the task manager will not be able to kill apps unless the above (accessibility service or write_secure_settings permission) is enabled. On Android N, it is no longer possible to determine if an app is running or not, other than checking its stopped (force-stop) state.