level 1
shell("am force-stop com.tencent.mm", true); //强制退出微信
shell("am force-stop com.eg.android.AlipayGphone", true); //强制退出支付宝
填对应包名就能强退 要ROOT 目前没发现不用ROOT的
2019年09月08日 06点09分
2
level 13
利用engines模块可识别脚本的唯一性标识id
如 let current_e_id = engines.myEngine().id;
在所有正在运行的脚本中筛选出指定id的脚本
如 let to_terminate_e = engines.all().filter(e => current_e_id === e.id)[0];
强制结束指定的脚本
如 to_terminate_e.forceStop();
也可以同时进行筛选与强制停止操作
如 engines.all().filter((e) => {
if (current_e_id === e.id) e.forceStop();
});
* 如若考虑性能或资源节约 可用for()替代forEach()
2019年09月10日 08点09分
3
吧主大佬,那如何判断其中某个脚本是否在运行呢?
2019年11月28日 06点11分
@zz章天泽 engines.all()可返回当前所有运行的脚本引擎对象
2019年11月28日 11点11分