r/termux • • 2d ago

General Android needs per-app control over Phantom Process Limits, not just a global on/off switch.

https://issuetracker.google.com/issues/562778579

I sent a feature request to the Android team about Phantom Process Limits, and I want to know what other Termux and UserLAnd users think about it.

The problem

By default, Android allows only 32 phantom processes for all apps combined. This can be a problem for apps like Termux, especially when you run many processes, scripts, or background tasks.

I want to raise this limit only for Termux, without changing the rules for every app on my device.

For example:

AppProcess limit
Termux350
UserLAnd128
Other appsShare the default limit of 32

These numbers are only examples. Users should be able to choose the right limit for each app.

What about the current workaround?

Android 14+ already has "Disable child process restrictions" in Developer Options. But it's a global switch: you keep the restrictions on, or you turn them off completely.

My proposal

Add a setting in the Android Settings app that lets users:

  • Change the global phantom process limit
  • Set a different limit for specific apps
  • Keep the current default if they don't want to change anything
  • See a clear warning before raising any limit

Why number limits, in normal Settings?

1. More room, with a safety net I can give Termux more processes without removing the limit completely. If a buggy script or a fork bomb goes out of control, there is still a limit to stop it.

2. A clear warning for the risks Android can show a warning about battery and RAM use before you change anything, like it already does for sideloading apps or accessibility services.

3. No need to keep Developer Options on Some banking and finance apps refuse to run when Developer Options is on. A normal setting avoids this problem.

This also gives users more control without using ADB, Shizuku, or root.

I'd like to hear from you

  • Have you had this problem in Termux or other apps?
  • Would a per-app limit be useful to you?
  • Should this be built into Android Settings?

👉 If you find this useful, please:

  1. Upvote this post ⬆️ so more people can see it
  2. Star ⭐ the issue to show Google that you want this feature
  3. Share your experience in the comments on the issue

An upvote here doesn't count as a star there. Open the link, sign in with your Google account, and tap the ☆ next to the issue title.

⭐ Star the issue here

14 Upvotes

3 comments sorted by

2

u/UlyssesZhan 2d ago

It's a good call. I gave my +1.

2

u/sylirre Termux Core Team 2d ago edited 2d ago

The problem with forked (phantom) processes is that Android framework has no records of them, disrupting resource and process accounting. If you ever launched servers (e.g. sshd) in Termux, you probably observed situation where the process continue to run when app was stopped. This was abused by certain software (through Bytedance keepalive module, MarsDaemon framework) to keep their processes alive.

Technically even 32 processes system-wide limit doesn't prevent abuse, but you asking to relax it even more giving 32 process limit on PER APP basis by default...

***

More realistic is to just add a toggle to exempt app from kill set. This is efficient and should be way easier to implement as it won't require individual process tracking for each app.

Example: System Settings -> Applications -> Termux or other app -> Disable child process restrictions

Or maybe it still better to keep this under developer settings too, so aggressive apps won't send users to appinfo page and ask "click this to keep us running".

That's a natural further step after Android 14 got a system-wide toggle in developers settings.

2

u/Omar_Gamo 2d ago

You make a fair point regarding implementation complexity for the Android team. However, from a power user's UX perspective, having granular numerical limits is much better. Sometimes I want to give Termux more headroom without completely removing the safety net—just in case a buggy script or a fork bomb goes rogue inside Termux and spirals out of control.

​As for the risk of exposing it in standard Settings, a clear, explicit warning dialog explaining the battery and RAM risks (similar to what Android already does for sideloading APKs or accessibility services) would handle that well.

​Also, keeping it strictly locked behind Developer Options creates another issue: on many devices, banking and financial apps refuse to run if Developer Options is enabled. Having this accessible in regular Settings solves that headache completely.