Andronix on Android 12 and beyond
Android 12 has added the mechanism to monitor forked child processes started by apps and kills them if more than the default 32 are found running. In simpler words Android now monitors the number of child process which are spawned by a particular app and if in any case it exceeds the number of permitted processes, it just kills them.
This has lead to a lot of power apps like Termux, Tasker, Andronix, Debian NoRoot, being broken on Android 12 and 12L devices. There is nothing that can be done from our side since it's pushed in the Android's code.
Issue on Termux's Repository: Android 12 Phantom Processes Killed (Process completed (signal 9) - press Enter)
Please follow the instructions given below for your respective Android versions.
Fix for Android 12L and beyond
Please follow the steps mentioned below to turn off the Phantom process killer-
We will first enable the Developer Options from the settings. To enable the same, please navigate to Settings> About Phone and find the Build Number.
Now tap it repeatedly until you see a toast notification along the lines of You are now x steps away from being a developer.
You might be asked to authenticate yourself, please do the same and then proceed.
Now, navigate to Settings>System>Developer Options. Enable the Developer Options on the next screen.
Find the section named Feature Flags, enter via clicking it.
Find the switch to turn off settings_enable_monitor_phantom_procs.
You are now all set! ✅
Fix for Android 12
If you cannot upgrade to Android 12L or 13. Please try the following fix for Android 12-
- Make sure you have the Android Debug Bridge (ADB) installed on your other device. You can follow this guide on XDA developers to install ADB on Windows, macOS, or Linux.
- After the installation, confirm if you have your device connected via ADB
- You should see your device listed in the output of the above command. Now run the following command in the ADB shell
adb shell /system/bin/device_config put activity_manager max_phantom_processes 2147483647
- You should be all set! ✅˚
Credits for the discovery of the issue and the solution-