How to enable or disable phantom process of android using adb command


Android Phantom Process is a background process that is no longer actively needed by the system but hasn’t been fully removed from memory yet.


In simple words:

It’s like a “ghost” app process —

The app is not visible on screen.

It’s not actively doing anything important.

But its process still exists in the background.


Why does it happen?

Android keeps some processes in memory to:

Open apps faster next time

Save system resources

Improve performance


Sometimes, after an app finishes its work (like a service or child process), a leftover process remains — this is called a phantom process.


Important Update (Android 12+)

In Android 12 and above, Google added Phantom Process Killer:

It limits the number of background child processes an app can create.

If an app creates too many hidden background processes, Android kills them automatically.

This improves battery life and system stability.


How to Disable phantom process using Termux 

1. Open Termux and enter the command


pkg install android-tools



2.Connect to adb server





3. Then enter the following commands step by step

adb shell /system/bin/device_config set_sync_disabled_for_tests persistent


adb shell /system/bin/device_config put activity_manager max_phantom_processes 2147483647 


How to Enable phantom process 

Enable device config sync:


 adb shell /system/bin/device_config set_sync_disabled_for_tests none


Set process limit back to 32: 


adb shell /system/bin/device_config put activity_manager max_phantom_processes 32


Post a Comment

0 Comments