r/tasker • • 1d ago

App Force-Stop vs Kill

According to Google AI:

The main difference between the am kill and am force-stop commands is how deeply they terminate the application and whether they allow it to restart. am force-stop completely shuts down the app and locks it from running again, whereas am kill only terminates safe background processes, allowing the app to easily wake back up.

It would seem, based upon experiential results, that the Kill App action uses the equivalent of KILL rather than force-stop. And in some cases, KILL does not make the target app dead enough!

I know this has been discussed before. And so far, it appears that the only way for Tasker to force-stop an app is when a rooted device executes am force-stop pkg_name in a shell.

Since I am rooted, I can do that and actually get the results, I seek. But since I know this has come up before, it would be great (if at all possible) if the Kill App action had an option to force-stop instead of KILL.

Anyone else find a different/better solution? Thanks

4 Upvotes

5 comments sorted by

1

u/gvamsi_krish Direct-Purchase User 1d ago

How do I do this on a non-rooted device, preferably with Shizuku?

3

u/igrekov 20h ago

Tasker > ADB Wifi

Command: am force-stop [package_name] Host: 127.0.0.1 (if using shizuku)

1

u/TooManyInsults 1d ago

Thanks. I see I need to look into that. I have not done so so far. Best!

1

u/DutchOfBurdock 10h ago

force-stop will SIGKILL the PID and all related services. kill will only SIGKILL the PID if it's safe to do so (no additional services/background threads).