Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6625487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:46:51+00:00 2026-05-25T21:46:51+00:00

The usefullness of task killer apps is debated, but I’m wondering: how do they

  • 0

The usefullness of task killer apps is debated, but I’m wondering: how do they actually work? How is it possible to kill particular process?

Is there an API for this, and if so what does it actually do?

EDIT

Worth adding: I saw task killer apps kill processes on not rooted devices. So, I wonder how is it possible to kill process, which you don’t own in Android?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:46:51+00:00Added an answer on May 25, 2026 at 9:46 pm

    In a nutshell, Automatic Task Killers work by polling the OS for a list of currently running processes and the memory they are consuming. Then either with an intelligent algorithm or with user input the Task Killers issue a call to the system telling the system to kill the process. There are two apis you can do this.

    They are

    • Process.killProcess(int pid)
    • ActivityManager.killBackgroundProcesses(String packageName)

    This first works by invoking Process.killProcess(int pid) where pid is the unique identifier for a specific process. Android kills processes in the same way that linux does; however, a user may only kill processes that they own. In Android each app is run with a unique UID (UserID). Apps using this API an App can only kill their own processes, hence the following explanation in the docs for Process.killProcess(int pid):

    Kill the process with the given PID. Note that, though this API allows
    us to request to kill any process based on its PID, the kernel will
    still impose standard restrictions on which PIDs you are actually able
    to kill. Typically this means only the process running the caller’s
    packages/application and any additional processes created by that app;
    packages sharing a common UID will also be able to kill each other’s
    processes.

    When this method is called the signal is generated by the OS and sent to the process. Whenever a process receives a signal from the OS it must either handle that signal or immediately die. Signals such as SIG_KILL cannot be handled and result in the immediate death of the recipient process. If you want to kill processes that you don’t have privileges to kill, i.e. its not your process, then you must switch users or escalate your privileges (on android this requires root privileges on the device).

    The second API works by telling the built in ActivityManager that you wan to kill processes associated with a specific Package. This API gets around the need for your UID to match the UID of the process because it requires the user to accept the KILL_BACKGROUND_PROCESSES permission. This permission signals to the OS that an app has been approved by the user as a task killer. When a task killer wants to kill an app, it tells the OS to kill the process allowing an app to get around the problem of only being able to kill processes that it owns.

    In the Android Docs it says that this API actually uses the first Process.killProcess API

    Have the system immediately kill all background processes associated
    with the given package. This is the same as the kernel killing those
    processes to reclaim memory; the system will take care of restarting
    these processes in the future as needed.

    If you want to know more I suggest you read about the Posix Signals and The Linux kill command

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to do some process injection using C++ but I would prefer to
I love/hate the regex because of usefulness/hardness. (I don't why but I can't construct
I've been recommended the Click framework from Apache. But I can't find any forums
I have written a long script that does exactly what I need, but now
I'm asked to write some unit tests for some functionality, but quite frankly I'm
Is it possible to change the resolution time calculation to start not with the
Make's implicit rules are supposedly there to make writing Makefiles easier but, if my
I'm impressed at the brevity and usefulness of Cucumber's Scenarios, they're a great way
I despise out's and ref's as parameters on methods. IMHO, they make code less
I am persuaded of usefulness of unit tests but I really don't understand rules

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.