When Android 12 and above users use Termux, sometimes it will be displayed [Process completed (signal 9) - press Enter]
. This is because the PhantomProcesskiller of Android 12 limits the sub-processes of the application, and the maximum number of sub-processes allowed for the application is 32.
Here we take ColorOS 12.1 as an example (other system operations are slightly different)
Enable developer mode
- open settings
- Open "About phone"
- Open "Version Settings"
- Click "Version Number" 5 times in a row
- Enter your password (if you have one) to enable developer mode.
Open Termux
- Open Termux
Don't have Termux? Click here to install
- Install Android Tools
pkg install android-tools
- Floating window Termux
takes advantage of the Android 12 feature to make Termux in a floating window state.
Configure wireless debugging
- Go to Settings --> System Settings --> Developer Settings
- Turn on wireless debugging
- Remember the displayed IP address and port, and enter it in Termux under the floating window
For example my IP address is 192.168.0.103:45367
then I should enter
adb pair 192.168.0.103:45367
When displayed Enter pairing code:
, enter the pairing code link.
- Link to adb
and copy the IP address for future use.
For example my IP address is 192.168.0.103:41249
, I should enter
adb connect 192.168.0.103:41249
when the output
* daemon not running; starting now at tcp:5037
* daemon started successfully
connected to 192.168.0.103:41249
, it means the connection has been successful.
- Set max child processes to be
65536
adb shell device_config set_sync_disabled_for_tests persistent
adb shell device_config put activity_manager max_phantom_processes 65536