Enable toggle once at Android Settings -> System -> Developer options -> Disable child process restrictions to disable killing of extra phantom processes > 32 and processes using excessive cpu. You will need to enable Developer options first on your device for it to show in System settings page, and it can usually be done by tapping Android Settings -> About -> Build number field 7 times.
-
root:su -c "setprop persist.sys.fflag.override.settings_enable_monitor_phantom_procs false" -
If you disable
Developer optionsagain, thenDisable child process restrictionstoggle will be disabled again automatically and killing of phantom processes will be enabled again. To enabled at all times and can setupadb/root, then follow the instructions in Commands for Android 12L, 13 and higher section instead.
Run commands once to disable killing of extra phantom processes > 32 and processes using excessive cpu.
root:su -c "settings put global settings_enable_monitor_phantom_procs false"adb:adb shell "settings put global settings_enable_monitor_phantom_procs false"root:su -c "setprop persist.sys.fflag.override.settings_enable_monitor_phantom_procs false"(Not recommended as it will revert to its default valuetrueifDeveloper optionsare disabled on Android>= 14)
Just set max_phantom_processes to 2147483647 to permanently disable killing of extra phantom processes > 32.
root:su -c "/system/bin/device_config put activity_manager max_phantom_processes 2147483647"adb:adb shell "/system/bin/device_config put activity_manager max_phantom_processes 2147483647"
- This blog is taken from agnostic-apollo/Android-Docs