-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: What is the mechanism of killing processes in Termux #2015
Comments
Usually the activity and services running in app's main process should be all or nothing. Check here and here. But empty processes that are not linked to a component may get killed too, as per this. A related issue to yours is posted in termux/termux-boot#5 and the solution is to use |
Thanks @agnostic-apollo, I've tried |
Welcome. From a "quick look" the min interval of 15mins is a limitation of android |
Some follow up: I found it is one specific service who killed
Seems I need to fill up a bug-report for the phone vendor or find a way to disable this "Athena" service. |
Disabling system services itself would likely require root. You could try a less aggressive custom ROM if you are willing to root. Or try adding termux to exemptions in your phone's killer app. Check https://dontkillmyapp.com/oneplus |
@agnostic-apollo Do you know the differences between the shell process (e.g. bash) and the background job (e.g. sshd, crond) in Termux? I mean why |
Exempting termux from app killer would reduce chances of
The difference is as per below. The
Without daemon
|
This detailed info make a lot of sense to me. And the |
You are welcome a megaton! |
@mitnk btw you can run Setup job with |
Got it. Thanks @agnostic-apollo! |
Welcome! |
I had the same issue regarding Athena service killing some background processes. apparently it can be disabled using adb:
this should atleast disable athena service and it wouldn't kill background processes in any way |
Yeah, that's the usual route if an app is being used to kill other apps instead of the android framework. Hopefully, nothing else breaks because of it, some other system app might be relying on it and may cause battery drain. Check |
Thanks @wmcb-tech, I uninstalled it, and the background jobs are now quite stable. adb rocks :) Update after ~6 days: |
GOOD JOB. It just can't stop phone os from killing services by setting battery mode. |
I was running
crond
with Termux in another phone work very well. I recently switched to a new phone, the battery optimizer may have issues, and causing thecrond
process killed randomly.Note that the
crond
is killed, but the shell process (pid 2717) is not.I want to understand how these things happen in the background. Where could I find more clues on how this
crond
is killed. I've locked this app, and acquired the wake lock. I've set the OS NOT to do any battery optimization on appTermux
andTermux-API
.I've tried v0.108, same issue in this phone. I know the main issue must be due to this phone. But I want to know if there is anything we can do in termux side. (e.g. Does the OS have the ability of killing only one of processes in Termux? etc)
The text was updated successfully, but these errors were encountered: