ZRAM Resizer for Android is a Magisk/KernelSU module designed to automatically resize ZRAM after the boot process completes. This module is intended for Android users who want to adjust their ZRAM configuration to improve memory management efficiency, especially on devices with limited RAM.
- Automatically adjusts ZRAM size after boot completes
- Compatible with Magisk and KernelSU
- Android device running Android 8.0 (Oreo) or higher
- Root access via Magisk or KernelSU
- Magisk app or KernelSU Manager
- Download the module
.zipfile from the releases page or build it manually from this repository. - Flash the module through the Magisk app or KernelSU Manager.
- Reboot your device to apply the changes.
- (Optional) Edit the configuration via a terminal or file editor.
After flashing, the module will be stored at:
/data/adb/modules/ZRAM-Resizer-for-AndroidYou can also edit the module manually to set your desired ZRAM size (in bytes). Example:
ZRAM_SIZE_BYTES=4294967296If you're confused by byte-based configuration, visit this link: GiB size in Byte
To remove the module:
-
Open the Magisk app or KernelSU Manager.
-
Remove the ZRAM Resizer module.
-
Reboot.
If you experience a bootloop, can't boot, get stuck in Fastboot, or run into similar problems:
-
Boot into custom recovery
-
Go to the path /data/adb/modules
-
Find the ZRAM-Resizer-for-Android folder
-
Delete that folder
-
Then boot your device
If ZRAM is not active or does not appear as /dev/block/zram0, follow the steps below:
- Make sure the kernel supports ZRAM
Run the following command in a terminal:
zcat /proc/config.gz | grep ZRAMMake sure this line is present:
CONFIG_ZRAM=y- Check whether zram0 is available
ls /sys/block/ | grep zramIf zram0 does not appear, your kernel is not loading the ZRAM module properly.
- Check the ZRAM major:minor numbers
cat /sys/class/block/zram0/devExample output:
253:0- Create the ZRAM device node manually (if /dev/block/zram0 is unavailable)
su
mknod /dev/block/zram0 b 253 0
chmod 660 /dev/block/zram0Replace the numbers 253 and 0 with the values from the previous step.
- Check the swap status
cat /proc/swapsExample output:
/dev/block/zram0 partition 4194300 0 -2-
Using this module together with other ZRAM management modules is not recommended.
-
This module does not modify the kernel; it only changes ZRAM settings in a systemless manner.
-
Make sure to reboot after every configuration change.
If you find a bug, please report it to the developer. You can do so through the Issues feature.