Tested Versions : Android 7 - 14
- Download the ZIP file for this module
- Flash the ZIP file in Magisk v24 or above
- During the installation, it will ask you to press the volume key for an interactive install
- As soon as it prompts to press the volume key, do so
- If the volume key is detected, you can choose between a 4GB or 8GB SWAP size
- If the volume key is not detected, the module will use a 4GB SWAP size by default
- If the volume key is detected, you can choose between the Highest or auto SWAP Priority
- If the volume key is not detected, the module will use auto SWAP Priority by default
This module does not require init.d support for its operation.
The creation process for the SWAP may take a minute or two to complete.
Once the installation is complete, reboot your device for the changes to take effect.
To verify if the SWAP is enabled, follow these steps:
- Download a terminal app
- Switch to SU (Super User) mode
- Type "htop" in the terminal app
- If you see a value above 4GB, then the SWAP is successfully enabled
this module unlike others, does not touch the devices ZRAM config, rather runs along side.
if you run cat /proc/swaps
, you will see 2.
For optimal results, open a few apps and keep them running for a few hours. The performance improvement is highly conditional.
The biggest difference i noticed in my case was battery life and less lag.
This module has been tested on Lineage 20 with a device having 4GB RAM. With an additional 8GB SWAP, the device was capable of running more apps and it felt like having more than 4GB RAM. Additionally, improved battery performance was observed. The average memory usage dropped from 89% to 65% with over 30 apps in the recent apps list and using a bulky Gapps package with all the future flags set to true.
To uninstall the module, simply deactivate the module in Magisk and then reboot your device.
If you find this module useful, please consider starring the repository on GitHub: https://github.com/janithcooray/lin_os_swap_mod
Fork this repository, create a new branch (example - dev/feature-name) and commit your changes, test and verify if they are functional. Once you confirm, please open a pull request from your forked branch to the source branch and assign @janithcooray to review. I'll be testing them manually before merging it.
If you encounter any issues, please open an issue from GitHub at https://github.com/janithcooray/lin_os_swap_mod/issues/new i will try to patch them asap.
2024-03-10
(Pending) - Version 2.0
- Adding App to manage Config and separate Prebuilt Configs on install + Bug fixes
2023-10-15
- Version 1.3
- Increased Swappiness to fix usage issues
2023-07-25
- Version 1.2
- Added Option to choose RAM Priority over ZRAM
2023-07-22
- Version 1.1
- Updated SWAP Priority to auto and less then ZRAM