Killing apps: best practices on non-root (stock android rom) phones

1,507 views
Skip to first unread message

Matevz Leskovsek

unread,
Jan 28, 2020, 11:24:49 AM1/28/20
to Tasker
Hi all, as I understand root is required for kill apps (or can it be done with secure permission written via adb?). Anyhow, currently I am testing some 3rd party apps (task killer, killapps close apps -> all available on gplay) that kill apps quite reliably, and of course they can be started from tasker. I havent found one that would be able to start killing on the boot, so some usual autoinput acrobatics is required to press the right buttons when the killing app starts. Maybe that could be better solved by sending an intent? Is 3rd party app really required to stop activities and apps?

Logan Fury

unread,
Jan 29, 2020, 5:38:05 AM1/29/20
to Tasker
Hello Matevz,

If you have enabled ADB WiFi then try the following:

For focused app

Kill Focus App (138)
A1: Status Bar [ Set:Collapsed ]
A2: App Info [ Package/App Name: Ignore Packages: Ignore Unlaunchable Apps:Off Get All Details:Off ]
A3: ADB Wifi [ Command:am force-stop %app_package Host: Port: Timeout (Seconds):1 Enable Debugging (Check Help):Off ]

On my Samsung I have to use a slightly different command:

For specific app (QuickPic in this case)

ADB KILL QuickPic (128)
A1: Status Bar [ Set:Collapsed ]
A2: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A3: App Info [ Package/App Name:com.alensw.PicFolder Ignore Packages: Ignore Unlaunchable Apps:Off Get All Details:Off ]
A4: [X] ADB Wifi [ Command:am force-stop %app_package Host: Port: Timeout (Seconds):1 Enable Debugging (Check Help):Off ]
A5: ADB Wifi [ Command:pm disable-user %app_package Host: Port: Timeout (Seconds):1 Enable Debugging (Check Help):Off ]
A6: ADB Wifi [ Command:pm enable %app_package Host: Port: Timeout (Seconds):1 Enable Debugging (Check Help):Off ]

I hope this helps :)

Logan

Matevz Leskovsek

unread,
Jan 30, 2020, 11:58:29 AM1/30/20
to tas...@googlegroups.com
Thanks. So you can actually run ADB commands from the device now? So
you can run ADB commands from tasker running on the same android
device?
> --
> You received this message because you are subscribed to the Google Groups "Tasker" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/tasker/b7b4792f-fee7-4b5e-a976-97d2eabb9d46%40googlegroups.com.

Logan Fury

unread,
Jan 30, 2020, 1:28:00 PM1/30/20
to tas...@googlegroups.com
Thanks to Joao's hard work the latest beta does indeed have a full range of ADB commands. It's necessary to grant Tasker access permissions thru ADB So you need a desktop or laptop with Oracle JDK, and ADB platform tools. 

You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/vN0KyGQU07c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tasker/CAEsQPf5vpomOor-AgyyV-dw0jLyPLTobzVnQQHsWCO3EuGEQzg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages