Killed in the background
The symptom is consistent: a few minutes after locking the screen or switching apps, the proxy dies and the notification icon is gone. The client did not crash — Android reclaimed its foreground service.
Killed, or just disconnected
These need different fixes. Tell them apart in a minute:
- The notification is gone → the service was killed. Read the vendor settings below.
- The icon stays but counters freeze → the service lives; the node or network dropped. See nothing connects.
- Icon and logs alive, pages fail → exit or DNS. See connected, no internet.
Four general steps, first
-
01
Allow notifications
Settings → Apps → CMFA → Notifications, make sure it is on. The foreground service depends on that notification; without it, Android treats the process as expendable.
-
02
Set battery usage to unrestricted
Settings → Apps → CMFA → Battery → Unrestricted or Not optimised. On stock Android, Pixel and Samsung this is usually enough.
-
03
Allow autostart and background activity
Most Chinese ROMs have a separate autostart manager. Allow autostart, background activity and associated startup for CMFA.
-
04
Lock the card in Recents
Open Recents, long-press the CMFA card (or pull it down) and lock it, so "clear all" does not take it out.
Where the switches are, by vendor
| Brand | Path | What to set |
|---|---|---|
| Xiaomi / Redmi (MIUI, HyperOS) | Settings → Apps → Manage apps → CMFA → Battery saver | No restrictions, plus autostart |
| Huawei / Honor (EMUI, MagicOS) | Settings → Battery → App launch → CMFA | Turn off auto-management, tick all three |
| OPPO / OnePlus (ColorOS) | Settings → Battery → More → App battery management | Allow background activity and autostart |
| vivo (OriginOS) | Settings → Battery → Background power management | Allow high background power use |
| Samsung (One UI) | Settings → Battery → Background usage limits | Add CMFA to "Never sleeping apps" |
| Stock Android / Pixel | Settings → Apps → CMFA → Battery | Unrestricted |
Scroll the table sideways
Paths change between versions. Searching settings for "autostart", "battery optimisation" or "background" is faster than memorising them.
Battery saver overrides all of it
With Battery saver or Ultra power saving on, the system ignores your per-app allowlist and throttles everything. Either turn it off, or accept that proxying is unstable while it is on.