搭配NoANR2.2
[
{
"name": "冻结进程",
"description": "当应用进入后台时冻结进程",
"priority": 1,
"condition": "frontPkgChanged == true && thanos.getActivityManager().isPkgSmartStandByEnabled(from) && !globalVarOf$whiteApps.contains(from)",
"actions": [
"su.exe(\"appops set \" +from + \" WAKE_LOCK ignore\");",
"do{Thread.sleep(1000)}until(activity.getFrontAppPackage()!=\"android\");",
"actor.delayed(1000,\"if(activity.getFrontAppPackage()!=from){su.exe(\\\"kill -STOP `pgrep -f \\\"+ from+ \\\"`\\\")}\");"
]
}
]
[
{
"name": "解冻进程",
"description": "当应用进入前台时解冻进程",
"priority": 1,
"condition": "frontPkgChanged == true && thanos.getActivityManager().isPkgSmartStandByEnabled(to) && !globalVarOf$whiteApps.contains(to)",
"actions": [
"su.exe(\"kill -CONT `pgrep -f \"+ to + \"`\");",
"su.exe(\"appops set \" +to + \" WAKE_LOCK default\");"
]
}
]
多谢分享
你的墓碑模式真的让很多人喜欢,谢谢,大佬!