02 Privileged Android keep-alive

Luonnatar

Android does not fail in one way. Luonnatar keeps watching, repairing and recovering.

Luonnatar began as a set of Android reliability experiments. The 2.x line moved the important work outside the app UID: a privileged guardian can keep observing, unfreeze targets, repair background policy and submit deeper recovery without depending on Luonnatar's own UI process staying alive.

Privileged Guardian 2.4.1 Native Android minSdk 26 by YubeGreen
Luonnatar Privileged Guardian 2.6.1 showing the keepalive controls, guardian service, VPN provider, Tailscale state and VPN session health.
Current guardian state — service PID, VPN path, Tailscale and session health are visible instead of hidden behind a single green light.
01

Why it exists

A keep-alive app cannot save much if the system freezes the app that is doing the saving.

Wake locks, foreground services and network checks are useful, but they all live inside an ordinary application UID. On aggressive Android builds, that entire UID can be frozen or deprived of the conditions a long-lived connection depends on.

That is the architectural break in Luonnatar 2.x: the UI becomes a control surface; the guardian work can run as a privileged shell-side engine. The project is no longer trying to make one process immortal. It is trying to make failure observable, recoverable and repeatable.

APP UID

Control surface

Configuration, state, evidence and explicit recovery controls stay in the Android app.

SHELL UID 2000

Privileged Guardian

Embedded app_process / UserService execution keeps working outside the ordinary app UID and can act on frozen targets.

01App / control planeconfiguration · state · evidence
02Privileged GuardianSHELL UID 2000
03Android system stateprocess · cgroup · AppOps
04Protected dependenciesGMS · WhatsApp · Tailscale · Proton VPN
02

Privileged Guardian

The guardian is built to keep moving after the ordinary process stops being trustworthy.

The engine combines periodic inspection with event-driven recovery. It scans process and cgroup freeze state, listens for freeze events, and re-applies protection when a new PID appears or a target is frozen again.

15 s

baseline process / freeze scan

EVENT

freeze evidence triggers an immediate extra pass

15 min

periodic repair of background policy and exemptions

Luonnatar embedded privileged engine advanced controls, including reboot-banner settings, guard cycle execution and asynchronous GMS deep recovery.
The built-in engine exposes advanced actions explicitly. Slow recovery work is submitted asynchronously instead of blocking the control channel.
Typical protected chain
GMSWhatsAppTailscaleProton VPN
03

Keep-alive stack

Luonnatar reliability controls for screen-off CPU Guard, high-performance Wi-Fi Lock, VPN DNS and HTTPS 204 checks, and GMS Binder Anchor.

There is no single magic keep-alive switch.

Luonnatar keeps the mechanisms separate because they solve different failure modes—and because separating them makes A/B testing possible.

CPU

Screen-off CPU Guard

Keeps the CPU awake while guardian mode is active and the screen is off; releases it when the screen comes back.

Wi-Fi

High-performance Wi-Fi Lock

A separate network-liveness variable for devices where CPU activity alone is not enough.

NET

DNS + HTTPS 204 probes

Periodic checks make a silent network failure visible without pretending that a running PID means the connection is healthy.

GMS

Binder Anchor

An experimental process-dependency path with reconnect and pulse tests kept separate from the baseline guardian.

04

Recovery

Recover in layers. Escalate only when ordinary recovery keeps failing.

The normal path is deliberately boring: detect the frozen target, unfreeze it, then repair the background policy that should have kept it usable. A new PID, another freeze event, or enough elapsed time causes the protection to be asserted again.

GMS is different because a process can still exist while its push path is effectively dead. Luonnatar therefore has a deeper recovery path, but it is evidence-gated, rate-limited and asynchronous rather than firing on the first suspicious event.

01Observeprocess · cgroup · events
02Unfreezesticky → normal → PID
03Repair policyDoze · standby · AppOps
04Deep recoveryonly after repeated evidence
01Running
02Restricted
03Frozen / degraded
04Recovery
05Verify / running
05

State & evidence

“Running” is not the same as “reachable.”

That distinction shaped the interface. The guardian PID is shown separately from the active VPN provider, Tailscale state and session health. A generation number and fingerprint can tell you that the network session changed even when the app itself never visibly crashed.

Luonnatar is meant to expose enough state that a failure can be reproduced instead of hand-waved away as “Android killed it.”

Luonnatar guardian status on the dark interface, showing the guardian service, VPN provider, Tailscale activity and session health.
06

Interface

The glass is not the product. It is the layer that makes a very technical product pleasant to live with.

Luonnatar spends most of its effort on survival and recovery, but the interface is not an afterthought: shared-scene rendering, optical response, synchronized coordinates, dynamic contrast, touch feedback, theme transitions and a full appearance sheet all sit on top of the same native Android app.

07

Verification

Built to be tested, not merely believed.

CPU Guard, Wi-Fi Lock, Binder Anchor and network probes remain independent so one variable can be changed at a time. The matching diagnostic project, Unraveller, records the evidence while Luonnatar changes the conditions.

Open Unraveller

Download / 02

Available on GitHub.

Open the project archive for the current source and release path.

Open download archive