The Swapspace module enables users to create a persistent, systemless swap file on Android devices via a terminal interface. It provides an efficient command-line tool to manage memory allocation parameters without altering the core system partition.
Technical Details
This package deploys a CLI binary called magiskswap directly into your root environment, allowing the configuration of on-disk swap space systemlessly. Users can define custom swap file sizes in gigabytes, toggle memory status, and adjust Linux anonymous memory swappiness values. It reliably maintains these custom kernel tunables across device reboots while mitigating KernelSU OverlayFS storage limitations.
Core Features of Swapspace
- Persistent Configuration: Commands and custom memory tunables remain active across device reboots.
- Terminal Management: Control the swap file via the
magiskswapcommand using a preferred terminal with root access. - Swappiness Control: Adjust exactly how aggressively the Linux kernel swaps anonymous memory from 0 to 200.
- Preservation Options: Temporarily disable the swap file using the preserve flag without deleting the allocated disk space.
Support & Requirements
Compatible with modern Android environments requiring Magisk 27.0 or newer and KernelSU v0.9.4 or higher.
How to Install Swapspace
- Download the magiskswapspace.zip archive directly to your internal storage.
- Open your Magisk or KernelSU application and access the Modules menu.
- Select install from storage, pick the downloaded file, and flash it.
- Reboot the device and run the
magiskswapcommand in a root terminal.
Disclaimer: Using on-disk swap on flash memory chips is not recommended and could result in a highly reduced lifespan.