app kill on froyo via termainal

30 views
Skip to first unread message

Michael

unread,
Nov 5, 2010, 1:30:53 PM11/5/10
to Tasker
I am trying to kill an app in froyo, but tasker wont do it. I
downloaded the terminal plugin and am trying to set it up to kill
"sipdroid".

Can anyone tell me what the correct commands would be (using su)?

fubaya

unread,
Nov 5, 2010, 4:45:39 PM11/5/10
to Tasker
Hmm, if you dont find out in the next few hours I'll see if I can come
up with something. I've never tried it with Android and am kinda
curious if the system might try to respawn apps killed this way.
Anyway, the "pkill" command is probably easiest to try if you want to
toy around in a terminal and see if it works.

baudi

unread,
Nov 5, 2010, 5:04:42 PM11/5/10
to Tasker
Great question and great answer! pkill works. If you want to kill
pandora, for example, you just

pkill pandora

This works with the locale execute plugin just fine if you have root.
Just use

@! pkill pandora

This is going to be a big help. Thank you.

baudi

unread,
Nov 5, 2010, 5:10:26 PM11/5/10
to Tasker
Hmmm. Well, maybe it doesn't work so well with Pandora after all. It
leaves a notification in the task bar, and when you click the
notification, Pandora starts again. Then if you Quit pandora, it
starts again. And that happens several times until it finally stops.

Probably works OK for some programs though.

Ozgreg

unread,
Nov 5, 2010, 7:30:19 PM11/5/10
to Tasker
You all understand and it been done to death on this board, and on
many others, Froyo ability to "kill" tasks has been basically stripped
out by google thanks to the very disruptive task killers.
Executing a kill commend via root is not going to change as support
for the kill @ the OS level has been fundamentally changed..

If you seriously want to kill the app you are running.. ask the app
developer to implement a intent that will exit the program and use
tasker to send that intent..
Message has been deleted

baudi

unread,
Nov 5, 2010, 7:35:30 PM11/5/10
to Tasker
Yes, it has been removed from Android, but it is alive and well in
rooted Linux. Try it if you don't believe it.

fubaya

unread,
Nov 5, 2010, 10:32:31 PM11/5/10
to Tasker
I played around a little and it works better than I thought, but there
are some things to remember. First, as baudi found out, it doesn't
seem to affect statusbar icons. I only have one app with a statusbar
icon and it kills the app but leaves the icon, so I assume it's the
same for all. That makes sense because the I suppose apps don't own
the statusbar, they just tell the system to put stuff there.

More importantly, apps probably aren't meant to be killed this way and
they may lose unsaved data. I tested with a notepad app by opening an
existing note, adding some text, then killing it. Sometimes the new
data was saved and sometimes it was lost, but mostly it was lost.

Anyway, if anyone isn't familiar with this and wants to explore, you
do so at your own risk...

...but I'm no party pooper so here's the newbie guide to killin' stuff
with pkill. If you open a terminal and type "ps", it gives you a list
of processes. The column on the far right is the name to look for, for
example "com.android.browser" is the stock web browser.

pkill kills anything that matches the string you give it, so "pkill
bro" will kill the browser and anything else with "bro" in its name.
That's a bad idea.

Probably the safest way to do it is find a string you want to kill
then type "ps | grep yourstring". That will show everything that
matches the string so you can make sure it only matches the one you
want before testing the kill.

baudi

unread,
Nov 5, 2010, 10:47:53 PM11/5/10
to Tasker
Do you have any idea whether killing an app this way leaves ugly stuff
around, like unreleased memory? Or does linux take care of that?

fubaya

unread,
Nov 6, 2010, 3:43:11 AM11/6/10
to Tasker
On Nov 5, 10:47 pm, baudi <dch...@gmail.com> wrote:
> Do you have any idea whether killing an app this way leaves ugly stuff
> around, like unreleased memory? Or does linux take care of that?

I don't think it leaves any junk. This is a little over my head, and
I've learned more about it in the past few minutes than in 10 years of
using Linux. I can't find anything that really addresses that but if I
understand it correctly and if the little checks I just did were done
right, I think it is clean. It's actually the way to finish off things
that didn't die cleanly.

baudi

unread,
Nov 6, 2010, 3:51:44 PM11/6/10
to Tasker
Thanks for figuring this out. One more tool in our belt...

jakel...@gmail.com

unread,
Nov 22, 2010, 2:11:58 AM11/22/10
to Tasker
It seems though, that OP's attempt to kill sipdroid will be
thwarted,as it self restarts immediately ( with
a new PID). Still, sipdroid is open source, so the Locale plugin API
could be added to it :-)

Also, if anyone else is using Tasker with the otherwise excellent
Execute plugin, to save your script you need to press Menu, and then
the third (rightmost) of the inexplicably blank buttons. The middle is
cancel, and the leftmost I believe is help, although that doesn't
seem to work. see http://elmicha.de/app/LocaleExecute/plugin-help.html
for help.
Reply all
Reply to author
Forward
0 new messages