diff --git a/README-en.md b/README-en.md index da23b7d..038a624 100644 --- a/README-en.md +++ b/README-en.md @@ -50,8 +50,8 @@ ### 🌹Acknowledgments List: -- Newbing -- Chatgpt +- NewBing +- ChatGpt ## 🎉Conclusion: diff --git a/README.md b/README.md index 9c79772..4548215 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,8 @@ ##### 对模块提供帮助的名单,排名不分前后 -- Newbing -- Chatgpt +- NewBing +- ChatGpt ## 🎉结语: diff --git a/Update.md b/Update.md index 17159db..80a106f 100644 --- a/Update.md +++ b/Update.md @@ -1,20 +1,16 @@ ## 更新日志: -### 版本号:内存参数调整 2023-11-14 +### 版本号:内存参数调整 2023-12-16 -- 修复模块Bug,优化代码 -- 适配更多内存大小,调整模块参数 +- 修复模块Bug。 +- 调整模块参数。 - #Author by @焕晨HChen -## 更新时间:2023-11-14 22:12 - ## Update: -### Version: MiniHChen v.2023.11.14 +### Version: MiniHChen v.2023.12.16 -- Fix module bugs and optimize code -- Adapt more memory size and adjust module parameters +- Fix module bugs. +- Adjust the module parameters. - #Author by @焕晨HChen - -## Update Date: 2023-11-14 22:12 \ No newline at end of file diff --git a/customize.sh b/customize.sh index 405fd73..3087ef1 100644 --- a/customize.sh +++ b/customize.sh @@ -62,11 +62,11 @@ Delete_cheat() { Output "- [i]:处理冲突文件完成!" } AppRetention() { - Output "- [i]:AppRetention模块,版本4.0" + Output "- [i]:AppRetention模块,版本4.1" Output "- [i]:模块作用:通过Hook系统kill逻辑实现后台保活" Output "- [i]:模块作者:焕晨HChen" version=$(dumpsys package Com.HChen.Hook | grep versionName | cut -f2 -d '=') - { [[ "$(echo "$version >= 4.0" | bc -l)" -eq 1 ]] && { + { [[ "$(echo "$version >= 4.1" | bc -l)" -eq 1 ]] && { Output "- [i]:AppRetention模块已经安装且最新" rm -rf /data/local/tmp/AppRetention.apk rm -rf "$MODPATH"/AppRetention.apk diff --git a/memory.sh b/memory.sh index c4eeb88..90eea7e 100644 --- a/memory.sh +++ b/memory.sh @@ -129,7 +129,7 @@ setVm() { setValue 0 /proc/sys/vm/panic_on_oom # 此参数决定了内核在后台应该压缩内存的力度。参数取 [0, 100] 范围内的值 # 默认20,待测试 - setValue 30 /proc/sys/vm/compaction_proactiveness + setValue 35 /proc/sys/vm/compaction_proactiveness # 压缩内存节省空间(会导致kswap0异常) # setValue 1 /proc/sys/vm/compact_memory # watermark_boost_factor用于优化内存外碎片化 @@ -164,11 +164,11 @@ echo "手机品牌:$(getprop ro.product.brand)" >"$HChen"/log.txt } echo "---------------------------------------------------------------------------" # 更改selinux规则 - magiskpolicy --live "allow system_server * * *" - device_config set_sync_disabled_for_tests persistent - settings put global settings_enable_monitor_phantom_procs false - device_config put activity_manager max_cached_processes 2147483647 - device_config put activity_manager max_phantom_processes 2147483647 + # magiskpolicy --live "allow system_server * * *" + # device_config set_sync_disabled_for_tests persistent + # settings put global settings_enable_monitor_phantom_procs false + # device_config put activity_manager max_cached_processes 2147483647 + # device_config put activity_manager max_phantom_processes 2147483647 resetprop sys.lmk.minfree_levels 1:1001,2:1001,3:1001,4:1001,5:1001,6:1001 setZram setVm diff --git a/module.prop b/module.prop index d23360a..e395ce2 100644 --- a/module.prop +++ b/module.prop @@ -1,6 +1,6 @@ id=MiniHChen name=内存参数调整 -version=2023.11.14 -versionCode=2023111400 +version=2023.12.16 +versionCode=2023121600 author=焕晨HChen description=内存参数调整,以实现更佳的内存使用效率。 \ No newline at end of file diff --git a/system.prop b/system.prop index 01aabae..12ac55a 100644 --- a/system.prop +++ b/system.prop @@ -2,6 +2,10 @@ ro.lmk.low=1001 ro.lmk.medium=1001 ro.lmk.critical=1001 ro.lmk.swap_util_max=100 +ro.lmk.thrashing_limit=100 +ro.lmk.thrashing_limit_decay=10 +ro.lmk.psi_partial_stall_ms=300 +ro.lmk.psi_complete_stall_ms=800 ro.lmk.swap_free_low_percentage=1 ro.lmk.kill_heaviest_task=false ro.lmk.swap_is_low_kill_enable=0 \ No newline at end of file