找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 589|回复: 0

android 12以上改变应用最大32进程限制方法

[复制链接]

2万

主题

137

回帖

13万

积分

管理员

积分
139372
发表于 2022-9-22 10:06:44 | 显示全部楼层 |阅读模式 IP:山东省 移动/数据上网公共出口

登录后更精彩...O(∩_∩)O...

您需要 登录 才可以下载或查看,没有账号?立即注册

×
android 12以上改变应用最大32进程限制方法
Mac版本:
[Bash shell] 纯文本查看 复制代码
#查看当前系统最大进程数
adb shell dumpsys activity settings | grep max_phantom_processes
如果没改变则为32,只有Android12有效果
 
 
#停用
adb shell device_config set_sync_disabled_for_tests persistent 
#设定最大数是65536
adb shell device_config put activity_manager max_phantom_processes 65536
 
#这时再调用下面的,就变为65536了
adb shell dumpsys activity settings | grep max_phantom_processes

Windows版本:
[Bash shell] 纯文本查看 复制代码
#查看当前系统最大进程数
adb shell dumpsys activity settings | findstr max_phantom_processes
如果没改变则为32,只有Android12有效果
> max_phantom_processes=32

#停用
adb shell device_config set_sync_disabled_for_tests persistent
#设定最大数是65536
adb shell device_config put activity_manager max_phantom_processes 65536

#这时再调用下面的,就变为65536了
adb shell dumpsys activity settings | grep max_phantom_processes


adb shell dumpsys activity settings默认设置:
[Bash shell] 纯文本查看 复制代码
adb shell dumpsys activity settings
ACTIVITY MANAGER SETTINGS (dumpsys activity settings) activity_manager_constants:
  max_cached_processes=32
  background_settle_time=60000
  fgservice_min_shown_time=2000
  fgservice_min_report_time=3000
  fgservice_screen_on_before_time=1000
  fgservice_screen_on_after_time=5000
  content_provider_retain_time=20000
  gc_timeout=5000
  gc_min_interval=60000
  force_bg_check_on_restricted=true
  full_pss_min_interval=1200000
  full_pss_lowered_interval=300000
  power_check_interval=300000
  power_check_max_cpu_1=25.0
  power_check_max_cpu_2=25.0
  power_check_max_cpu_3=10.0
  power_check_max_cpu_4=2.0
  service_usage_interaction_time=1800000
  service_usage_interaction_time_post_s=60000
  usage_stats_interaction_interval=7200000
  usage_stats_interaction_interval_post_s=600000
  service_restart_duration=1000
  service_reset_run_duration=60000
  service_restart_duration_factor=4
  service_min_restart_time_between=10000
  service_max_inactivity=1800000
  service_bg_start_timeout=15000
  service_bg_activity_start_timeout=10000
  service_crash_restart_duration=1800000
  service_crash_max_retry=16
  process_start_async=true
  memory_info_throttle_time=300000
  top_to_fgs_grace_duration=15000
  min_crash_interval=120000
  process_crash_count_reset_interval=43200000
  process_crash_count_limit=12
  imperceptible_kill_exempt_proc_states=[0, 1, 2, 4, 12]
  imperceptible_kill_exempt_packages=[]
  min_assoc_log_duration=300000
  binder_heavy_hitter_watcher_enabled=false
  binder_heavy_hitter_watcher_batchsize=2000
  binder_heavy_hitter_watcher_threshold=0.333
  binder_heavy_hitter_auto_sampler_enabled=false
  binder_heavy_hitter_auto_sampler_batchsize=400
  binder_heavy_hitter_auto_sampler_threshold=0.333
  max_phantom_processes=32
  boot_time_temp_allowlist_duration=20000
  fg_to_bg_fgs_grace_duration=5000
  fgs_start_foreground_timeout=10000
  default_background_activity_starts_enabled=false
  default_background_fgs_starts_restriction_enabled=true
  default_fgs_starts_restriction_enabled=true
  default_fgs_starts_restriction_notification_enabled=false
  default_fgs_starts_restriction_check_caller_target_sdk=true
  fgs_atom_sample_rate=1.0
  fgs_start_allowed_log_sample_rate=0.25
  fgs_start_denied_log_sample_rate=1.0
  push_messaging_over_quota_behavior=1
  fgs_allow_opt_out=false

  mOverrideMaxCachedProcesses=128
  mCustomizedMaxCachedProcesses=32
  CUR_MAX_CACHED_PROCESSES=128
  CUR_MAX_EMPTY_PROCESSES=64
  CUR_TRIM_EMPTY_PROCESSES=8
  CUR_TRIM_CACHED_PROCESSES=5
  OOMADJ_UPDATE_QUICK=true
CachedAppOptimizer settings
  use_compaction=false
  compact_action_1=file
  compact_action_2=all
  compact_throttle_1=5000
  compact_throttle_2=10000
  compact_throttle_3=500
  compact_throttle_4=10000
  compact_throttle_5=600000
  compact_throttle_6=600000
  compact_throttle_min_oom_adj=900
  compact_throttle_max_oom_adj=999
  compact_statsd_sample_rate=0.1
  compact_full_rss_throttle_kb=12000
  compact_full_delta_rss_throttle_kb=8000
  compact_proc_state_throttle=[11]
  0 some, 0 full, 0 persistent, 0 BFGS compactions.
  Tracking last compaction stats for 0 processes.
  use_freezer=false
  freeze_statsd_sample_rate=0.1
  freeze_debounce_timeout=600000
CacheOomRanker settings
  use_oom_re_ranking=false
  oom_re_ranking_number_to_re_rank=8
  oom_re_ranking_lru_weight=0.35
  oom_re_ranking_uses_weight=0.5
  oom_re_ranking_rss_weight=0.15





回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|时间戳|加密|CTF WiKi|CTF平台汇总|CTF show|ctfhub|棱角安全|rutracker|攻防世界|php手册|peiqi文库|CyberChef|猫捉鱼铃|手机版|小黑屋|cn-sec|IOTsec-Zone|在线工具|分享屋 ( 鲁ICP备2021028754号 )

GMT+8, 2024-9-19 10:12

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表