Android 12+ 使用指南

当前版本的两仪不需要 ADB,也不需要执行下面的命令。本页只适用于旧版本。

适用于两仪 Android 旧版本 · English below: Android 12+ guide

Android 12 起,系统的 phantom process 机制会限制一个 App 的子进程数量,超出就杀掉,两仪会因此无法开机或突然退出。用 ADB(或 ROOT 权限)执行下面的命令可以解除限制。

Android 13 及以上(推荐)

adb shell settings put global settings_enable_monitor_phantom_procs false

恢复:

adb shell settings put global settings_enable_monitor_phantom_procs true

Android 12 / 12L

adb shell "/system/bin/device_config set_sync_disabled_for_tests persistent; /system/bin/device_config put activity_manager max_phantom_processes 2147483647"

恢复:

adb shell "/system/bin/device_config set_sync_disabled_for_tests none; /system/bin/device_config put activity_manager max_phantom_processes 32"

Android 13 及以上两组命令都有效,推荐第一组。

说明


Android 12+ guide

The current version of Twoyi needs no ADB and none of the commands below. This page is for older versions only.

For older versions of Twoyi on Android

Since Android 12, the system's phantom process mechanism limits how many child processes an app may have and kills the rest, so Twoyi fails to boot or quits suddenly. Run the commands below with ADB (or as root) to lift the limit.

Android 13 and later (recommended)

adb shell settings put global settings_enable_monitor_phantom_procs false

To restore:

adb shell settings put global settings_enable_monitor_phantom_procs true

Android 12 / 12L

adb shell "/system/bin/device_config set_sync_disabled_for_tests persistent; /system/bin/device_config put activity_manager max_phantom_processes 2147483647"

To restore:

adb shell "/system/bin/device_config set_sync_disabled_for_tests none; /system/bin/device_config put activity_manager max_phantom_processes 32"

On Android 13 and later both sets work; the first is recommended.

Notes