Android

Luonnatar努昂诺塔

On ROMs like OriginOS and HyperOS, background apps get frozen — and your push notifications and VPN go with them. Luonnatar runs a guardian outside any app that notices and undoes it.在 OriginOS、HyperOS 这类系统上,后台应用会被冻结,推送和 VPN 也跟着断掉。Luonnatar 在应用之外运行一个守护进程,发现被冻就恢复。

Android 8+shell UID 2000GMS · WhatsApp · Tailscale · Proton VPN
Luonnatar main screen: keep-alive switches, guardian service, VPN provider, Tailscale and session health.
The main screen.主界面。
Why outside the app为什么放在应用之外

A keep-alive app can't help much once it's frozen too.保活应用自己也被冻住时,就什么都做不了。

Wake locks, foreground services and network checks all run inside an ordinary app, and aggressive ROMs freeze that whole app. So in Luonnatar the app is just the control panel. The work happens in an engine started through app_process as the shell user (UID 2000), which can read freeze state and act on other apps.唤醒锁、前台服务、网络检测,都跑在普通应用里,而激进的系统会把整个应用冻住。所以 Luonnatar 的应用只负责控制面板,真正干活的是通过 app_process 以 shell 用户(UID 2000)启动的引擎,它能读取冻结状态,也能操作其他应用。

01App应用settings · status · manual actions设置 · 状态 · 手动操作
02Guardian engine守护引擎shell UID 2000
03System state系统状态process · cgroup freezer · AppOps · Doze
04What it protects保护对象GMS · WhatsApp · Tailscale · Proton VPN
The guardian守护引擎

Notice, unfreeze, repair — and only then escalate.先发现、解冻、修复,不行再升级。

  1. Watch监视

    Scans processes and cgroup freeze state every 15 seconds, and immediately on a freeze event.每 15 秒扫描一次进程和 cgroup 冻结状态,收到冻结事件时立刻再扫一次。

  2. Unfreeze解冻

    Thaws the target and re-applies protection whenever a new PID shows up.解冻目标;一旦出现新的 PID,重新施加保护。

  3. Repair policy修复策略

    Every 15 minutes, re-applies Doze, standby-bucket and AppOps exemptions the system may have reset.每 15 分钟重新设置一遍 Doze、待机分组和 AppOps 豁免,防止被系统改回去。

  4. Recover GMS恢复 GMS

    A thawed GMS isn't necessarily connected. Luonnatar watches the FCM connection itself, nudges it to reconnect, and only resets GMS when that keeps failing — at most one soft and one hard reset per outage, and no more than six force-stops a day.GMS 解冻了不代表推送已经连上。Luonnatar 直接看 FCM 连接,先尝试让它重连,一直不行才重置 GMS:每次断线最多一次软重置、一次硬重置,每天强制停止不超过六次。

Luonnatar engine controls: guard cycle and GMS deep recovery.
Engine controls. Slow recovery runs in the background instead of blocking the app.引擎操作。耗时的恢复在后台进行,不会卡住应用。
Switches开关

Separate switches, so you can test one thing at a time.每项单独开关,方便一次只测一个变量。

CPU

CPU Guard

Keeps the CPU awake while the screen is off; lets go when it turns on.熄屏时保持 CPU 唤醒,亮屏后释放。

WI-FI

Wi-Fi lockWi-Fi 锁

High-performance Wi-Fi lock for phones where CPU alone isn't enough.高性能 Wi-Fi 锁,给只靠 CPU 唤醒不够的手机用。

NET

DNS + HTTPS 204DNS + HTTPS 204

Regular probes catch a dead connection even when every process looks fine.定期探测,进程看起来都正常时也能发现连接已经断了。

GMS

Binder Anchor

Holds a Binder connection to GMS, with reconnect and pulse tests.与 GMS 保持一条 Binder 连接,带重连和脉冲测试。

Luonnatar switches: CPU Guard, Wi-Fi lock, network probes, Binder Anchor.
Status状态

“Running” isn't the same as “connected”.“在运行”不等于“连得上”。

The status page shows the guardian, the VPN provider, Tailscale and session health separately. A session number changes when the VPN reconnects, even if no app visibly crashed.状态页把守护进程、VPN 提供方、Tailscale 和会话状态分开显示。VPN 重连时会话编号会变,哪怕没有任何应用崩溃。

It also keeps its own way back in: its SSH port, wireless ADB and Termux SSH are brought back up after adbd restarts.它也给自己留了后路:adbd 重启后,自带的 SSH、无线 ADB 和 Termux SSH 都会被重新拉起。

Testing测试

One changes things. The other watches.一个动手,一个记录。