Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

情景模式延迟生效 #1157

Open
kaipol opened this issue Jan 30, 2025 · 1 comment
Open

情景模式延迟生效 #1157

kaipol opened this issue Jan 30, 2025 · 1 comment

Comments

@kaipol
Copy link

kaipol commented Jan 30, 2025

Image
如图,经常一直不执行,一执行就执行很多次

微信开启了后台启动,后台运行和乖巧模式,情景模式代码如下

[
{
"name": "微信杀死后台并重启",
"description": "保留通知进程",
"priority": -1,
"condition": "taskRemoved == true && pkgName == \"com.tencent.mm\" || frontPkgChanged == true && from == \"com.tencent.mm\"",
"delay": 7000,
"actions": [
"thanos.activityManager.killProcessByName(\"com.tencent.mm\")",
"su.exe(\"ps -ef|grep com.tencent.mm:|grep -v :push|grep -v grep|awk '{print $2}'|xargs kill -9\")",
"su.exe(\"am startservice -n com.tencent.mm/com.tencent.mm.service.ProcessService$MMProcessService\")",
"su.exe(\"am startservice -n com.tencent.mm/com.tencent.mm.ipcinvoker.wx_extension.service.MainProcessIPCService\")",
"su.exe(\"am startservice -n com.tencent.mm/com.tencent.mm.plugin.fcm.WCFirebaseMessagingService\")",
"su.exe(\"am startservice -n com.tencent.mm/com.tencent.mm.plugin.webview.stub.WebViewStubService\")",
"ui.showShortToast(\"kill微信\")"
]
}
]

QQ也开了后台启动,后台运行和乖巧模式,情景模式代码如下

[
    {
    "name": "QQ进程优化",
    "description": "优化保留双进程和通话",
    "priority": -4,
    "condition": "taskRemoved == true && pkgName == \"com.tencent.mobileqq\" || frontPkgChanged == true && from == \"com.tencent.mobileqq\"",
"delay": 7000,
    "actions": [
    "su.exe(\"ps -ef|grep com.tencent.mobileqq:|grep -v :MSF|grep -v :video|grep -v grep|awk '{print $2}'|xargs kill -9\")",
"thanos.activityManager.killProcessByName(\"com.tencent.mobileqq\")",
"activity.launchProcessForPackage(\"com.tencent.mobileqq\")",
"activity.launchProcessForPackage(\"com.tencent.mobileqq\")",
    "ui.showShortToast(\"已清理QQ\")"
    ]
    }
]

参考了其他issue,但是还是延迟生效

@kaipol
Copy link
Author

kaipol commented Jan 30, 2025

重启以后一段时间能正常执行,但是过段时间就延迟生效了

@kaipol kaipol closed this as completed Jan 30, 2025
@kaipol kaipol reopened this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant