Swappiness Fix applies a predefined memory-cgroup profile after boot, giving system and application groups different swap preferences on compatible rooted Android devices.
A Fixed Memory-Cgroup Profile
Designed for ROMs that expose the legacy /dev/memcg control hierarchy used by the module.
Per-Group Values
Writes separate swappiness values for the root memory group, Android system processes, and user applications.
Boot-Time Application
Waits 60 seconds after service startup before applying its profile, allowing Android services to initialize first.
ROM-Dependent
The installer refuses unsupported devices when the expected system memory-cgroup swappiness node is absent.
Values Applied by the Module
| Control | Value | Role |
|---|---|---|
/dev/memcg/memory.swappiness | 100 | Root memory-cgroup setting. |
/dev/memcg/system/memory.swappiness | 40 | Lower swap preference for processes assigned to the system group. |
/dev/memcg/apps/memory.swappiness | 50 | Separate preference for user-application processes. |
The service also attempts to place system_server, SurfaceFlinger, and supported graphics-composer services in the system cgroup. The effective result depends on the ROM's process names and cgroup implementation.
What to Expect
Swappiness is a preference, not a fixed promise about which application remains in memory. Android's low-memory killer, zRAM capacity, working-set pressure, and vendor memory policies continue to influence process retention. A profile that feels responsive on one device may increase reclaim work or provide no visible benefit on another.
Because the values are hard-coded, this package is best treated as a specific preset rather than a general memory tuner. Record baseline behavior before installation and compare app reloads, system responsiveness, and memory pressure under the same workload.
/dev/memcg/system/memory.swappiness are outside the module's documented design. Do not create replacement nodes manually; remove the module if memory behavior becomes unstable.