Solve the Android 12 limit of 32 threads

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

  1. open settings

  1. Open "About phone"

  1. Open "Version Settings"

  1. Click "Version Number" 5 times in a row

  1. Enter your password (if you have one) to enable developer mode.

Open Termux

  1. Open Termux

Don't have Termux? Click here to install

  1. Install Android Tools
pkg install android-tools

  1. Floating window Termux
    takes advantage of the Android 12 feature to make Termux in a floating window state.


Configure wireless debugging

  1. Go to Settings --> System Settings --> Developer Settings

  1. Turn on wireless debugging

  1. 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:45367then I should enter

adb pair 192.168.0.103:45367

When displayed Enter pairing code:, enter the pairing code link.

  1. 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.

  1. Set max child processes to be65536
adb shell device_config set_sync_disabled_for_tests persistent 
adb shell device_config put activity_manager max_phantom_processes 65536

Guess you like

Origin blog.csdn.net/a18845594188/article/details/131296936