“Thanox Profile”的版本间差异

来自Silica Library | 間奏時光
跳到导航 跳到搜索
 
(未显示同一用户的16个中间版本)
第2行: 第2行:
[https://play.google.com/store/apps/details?id=github.tornaco.android.thanos.pro Thanox Pro] 情景模式
[https://play.google.com/store/apps/details?id=github.tornaco.android.thanos.pro Thanox Pro] 情景模式


== 开机自启动 (启 应用进程) ==
==  总集篇 ( 开机自启动 + 被杀后台自 重新运行 + 开关屏幕运行) ==
  变量名:<code>Background</code>
<pre>
<pre>
[{
[
"name": "System Boot Ready Background Running",
   {
"description": "Global Variant: Background",
     "name": "KeepAlive",
"priority": 1,
     "description": "Global Variant: keepAlive",
"condition": "systemReady == true",
     "priority": -1,
"actions": ["foreach (el : globalVarOf$Background) {activity.launchProcessForPackage(el);}"]
     "condition": "systemReady == true || screenOff == true || screenOn == true || pkgKilled == true",
}]
     "delay": 10000,
     "actions": [
       "foreach (app: globalVarOf$keepAlive) {activity.launchProcessForPackage(app); Thread.sleep(3000);}"
     ]
   }
]
</pre>
</pre>


== 开机自启动 (打开应用主界面) ==
== 开机自启动 ==
   变量名:<code>Foreground</code><br>
   变量名:<code>Foreground</code> 与 <code>Background</code><br>
   主要用在一些仅启动进程不足以正常运行的 APP,如 <code>小米健康运动</code> (只开进程手表无法收到任何通知)。
    一般情况下请使用 <code>Background</code>,<code>Foreground</code>  主要用在一些仅启动进程不足以正常运行的 APP,如 <code>小米健康运动</code> (只开进程手表无法收到任何通知) 。另不建议移除 <code>Thread.sleep(3000);</code>。密集地执行 <code>activity.launchProcessForPackage</code> 会导致需要启动多个应用的时候部分不成功
<pre>
<pre>
[{
[
"name": "System Boot Ready Foreground Running",
   {
"description": "Global Variant: Foreground",
     "name": "System Boot Ready Running",
"priority": 1,
     "description": "Global Variant: Foreground, Background",
"condition": "systemReady == true",
     "priority": 1,
"actions": ["foreach (el : globalVarOf$Foreground) {activity.launchMainActivityForPackage(el);}"]
     "condition": "systemReady == true",
}]
     "delay": 10000,
     "actions": [
       "foreach (back: globalVarOf$Background) {activity.launchProcessForPackage(back); Thread.sleep(3000);}",
       "foreach (fore: globalVarOf$Foreground) {activity.launchMainActivityForPackage(fore); Thread.sleep(3000);}"
     ]
   }
]
</pre>
</pre>


第30行: 第40行:
   变量名:<code>Background</code>
   变量名:<code>Background</code>
<pre>
<pre>
[{
[
"name": "Keep Background Running",
   {
"description": "Global Variant: Background",
     "name": "Keep Background Running",
"priority": 1,
     "description": "Global Variant: Background",
"condition": "pkgKilled == true && globalVarOf$Background.contains(pkgName)",
     "priority": 1,
"actions": ["activity.launchProcessForPackage(pkgName)"]
     "condition": "pkgKilled == true && globalVarOf$Background.contains(pkgName)",
}]
     "actions": [
       "activity.launchProcessForPackage(pkgName)"
     ]
   }
]
</pre>
</pre>


第43行: 第57行:
   主要用在一些仅启动进程不足以正常运行的 APP,如 <code>小米健康运动</code> (只开进程手表无法收到任何通知)。
   主要用在一些仅启动进程不足以正常运行的 APP,如 <code>小米健康运动</code> (只开进程手表无法收到任何通知)。
<pre>
<pre>
[{
[
"name": "Keep Foreground Running",
   {
"description": "Global Variant: Foreground",
     "name": "Keep Foreground Running",
"priority": 1,
     "description": "Global Variant: Foreground",
"condition": "pkgKilled == true && globalVarOf$Foreground.contains(pkgName)",
     "priority": 1,
"actions": ["activity.launchMainActivityForPackage(pkgName)"]
     "condition": "pkgKilled == true && globalVarOf$Foreground.contains(pkgName)",
}]
     "actions": [
</pre>
       "activity.launchMainActivityForPackage(pkgName)"
 
     ]
== 后台墓碑 ==
   }
  变量名:<code>Standby</code><br>
]
<pre>
[{
"name": "Auto Standby",
"description": "Global Variant: Standby",
"priority": 2,
"condition": "frontPkgChanged == true && globalVarOf$Standby.contains(from)",
"actions": [
  "activity.setInactive(from);",
  "su.exe(\"am set-standby-bucket \" +from +\" restricted\");",
  "su.exe(\"name=$(pgrep -f \" +from +\")\");","su.exe(\"kill -19 $name\");"
  ]
}]
</pre>
</pre>


==  解除 台墓碑 ==
== NFC 被关闭 自动打开 ==
    变量名:<code>Standby</code><br>
    避免任何情况下 NFC 被关闭后不会自动打开 (如无线充电)。
<pre>
<pre>
[{
[
"name": "Auto Cancel Standby",
   {
"description": "Global Variant: Standby",
     "name": "NFC Always On",
"priority": 1,
     "description": "NFC Always On",
"condition": "frontPkgChanged == true && globalVarOf$Standby.contains(to)",
     "priority": 1,
"actions": [
     "condition": "hw.isNfcEnabled() == false",
  "su.exe(\"name=$(pgrep -f \" +to +\")\");","su.exe(\"kill -18 $name\");",
     "actions": [
  "su.exe(\"am set-standby-bucket \" +to +\" rare\");"
       "hw.enableNfc()"
]
     ]
}]
   }
]
</pre>
</pre>

2024年5月11日 (六) 03:07的最新版本

Thanox Pro 情景模式

总集篇 (开机自启动 + 被杀后台自动重新运行 + 开关屏幕运行)

[
    {
        "name": "KeepAlive",
        "description": "Global Variant: keepAlive",
        "priority": -1,
        "condition": "systemReady == true || screenOff == true || screenOn == true || pkgKilled == true",
        "delay": 10000,
        "actions": [
            "foreach (app: globalVarOf$keepAlive) {activity.launchProcessForPackage(app); Thread.sleep(3000);}"
        ]
    }
]

开机自启动

  变量名:ForegroundBackground
  一般情况下请使用 BackgroundForeground 主要用在一些仅启动进程不足以正常运行的 APP,如 小米健康运动 (只开进程手表无法收到任何通知)。另不建议移除 Thread.sleep(3000);。密集地执行 activity.launchProcessForPackage 会导致需要启动多个应用的时候部分不成功。

[
    {
        "name": "System Boot Ready Running",
        "description": "Global Variant: Foreground, Background",
        "priority": 1,
        "condition": "systemReady == true",
        "delay": 10000,
        "actions": [
            "foreach (back: globalVarOf$Background) {activity.launchProcessForPackage(back); Thread.sleep(3000);}",
            "foreach (fore: globalVarOf$Foreground) {activity.launchMainActivityForPackage(fore); Thread.sleep(3000);}"
        ]
    }
]

进程守护 (启动应用进程)

  变量名:Background

[
    {
        "name": "Keep Background Running",
        "description": "Global Variant: Background",
        "priority": 1,
        "condition": "pkgKilled == true && globalVarOf$Background.contains(pkgName)",
        "actions": [
            "activity.launchProcessForPackage(pkgName)"
        ]
    }
]

进程守护 (打开应用主界面)

  变量名:Foreground
  主要用在一些仅启动进程不足以正常运行的 APP,如 小米健康运动 (只开进程手表无法收到任何通知)。

[
    {
        "name": "Keep Foreground Running",
        "description": "Global Variant: Foreground",
        "priority": 1,
        "condition": "pkgKilled == true && globalVarOf$Foreground.contains(pkgName)",
        "actions": [
            "activity.launchMainActivityForPackage(pkgName)"
        ]
    }
]

NFC 被关闭后自动打开

  避免任何情况下 NFC 被关闭后不会自动打开 (如无线充电)。

[
    {
        "name": "NFC Always On",
        "description": "NFC Always On",
        "priority": 1,
        "condition": "hw.isNfcEnabled() == false",
        "actions": [
            "hw.enableNfc()"
        ]
    }
]