Skip to content

Commit

Permalink
修复Bug,调整参数
Browse files Browse the repository at this point in the history
  • Loading branch information
HChenX committed Dec 16, 2023
1 parent 13582c7 commit a26148d
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@

### 🌹Acknowledgments List:

- Newbing
- Chatgpt
- NewBing
- ChatGpt

## 🎉Conclusion:

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@

##### 对模块提供帮助的名单,排名不分前后

- Newbing
- Chatgpt
- NewBing
- ChatGpt

## 🎉结语:

Expand Down
16 changes: 6 additions & 10 deletions Update.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions memory.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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用于优化内存外碎片化
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=MiniHChen
name=内存参数调整
version=2023.11.14
versionCode=2023111400
version=2023.12.16
versionCode=2023121600
author=焕晨HChen
description=内存参数调整,以实现更佳的内存使用效率。
4 changes: 4 additions & 0 deletions system.prop
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a26148d

Please sign in to comment.