分为两个版本,普通版和音频焦点版,根据自己需求选一个
搭配NoANR2.3(点击下载)
Thanox3.9.9(点击下载)
普通版
[
{
"name": "NoActive",
"description": "应用进入后台冻结进程",
"priority": -1,
"condition": "frontPkgChanged",
"actions": [
"if(thanos.getActivityManager().isPkgSmartStandByEnabled(to)){su.exe(\"kill -CONT `pgrep -f \"+ to + \"`\");su.exe(\"appops set \" +to + \" WAKE_LOCK default\")}",
"if(!thanos.getActivityManager().isPkgSmartStandByEnabled(from)){break}",
"foreach (rule : thanos.getActivityManager().getAllStandbyRules()){if(rule.startsWith(\"KEEP\") && rule.contains(from + \"/\")){break}}",
"su.exe(\"appops set \" + from + \" WAKE_LOCK ignore\");",
"Thread.sleep(2000);",
"if(activity.getFrontAppPackage()!=from && !thanos.windowManager.hasVisibleWindows(from)){su.exe(\"kill -STOP `pgrep -f \"+ from +\"`\")};"
]
}
]
音频焦点版
[
{
"name": "NoActive",
"description": "应用进入后台冻结进程",
"priority": -1,
"condition": "frontPkgChanged",
"actions": [
"if(thanos.getActivityManager().isPkgSmartStandByEnabled(to)){su.exe(\"kill -CONT `pgrep -f \"+ to + \"`\");su.exe(\"appops set \" +to + \" WAKE_LOCK default\")}",
"if(!thanos.getActivityManager().isPkgSmartStandByEnabled(from)){break}",
"foreach (rule : thanos.getActivityManager().getAllStandbyRules()){if(rule.startsWith(\"KEEP\") && rule.contains(from + \"/\")){break}}",
"if(su.exe(\"dumpsys audio|grep client:|grep -v died|cut -d ' ' -f 6\").out.contains(from)){break}",
"su.exe(\"appops set \" + from + \" WAKE_LOCK ignore\");",
"Thread.sleep(2000);",
"if(activity.getFrontAppPackage()!=from && !thanos.windowManager.hasVisibleWindows(from)){su.exe(\"kill -STOP `pgrep -f \"+ from +\"`\")};"
]
}
]
[
{
"name": "NoActive(Plus)",
"description": "应用通知移除冻结进程",
"priority": 1,
"condition": "notificationRemoved && thanos.getActivityManager().isPkgSmartStandByEnabled(pkgName)",
"actions": [
"foreach (rule : thanos.getActivityManager().getAllStandbyRules()){if(rule.startsWith(\"KEEP\") && rule.contains(pkgName + \"/\")){break}}",
"su.exe(\"appops set \" + pkgName + \" WAKE_LOCK ignore\");",
"if(activity.getFrontAppPackage()!=from && !thanos.windowManager.hasVisibleWindows(pkgName)){su.exe(\"kill -STOP `pgrep -f \"+ pkgName +\"`\")};"
]
}
]
合并是把冻结跟解冻合并成一个模式吗?
请问:
我手机上 “kill -STOP pid”好像完全没反应。似乎kill没有-STOP这个option
这个-STOP是通用的吗?