Skip to content

About

ZRAM resizer KSU/Magisk module for rooted Android device.

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Latest commit

 

History

43 Commits

Folders and files

Repository files navigation

🚀 ZRAM-Resizer-for-Android (Magisk/KernelSU Module)

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.

🛠️ Features

  • Automatically adjusts ZRAM size after boot completes
  • Compatible with Magisk and KernelSU

📝 Requirements

  • Android device running Android 8.0 (Oreo) or higher
  • Root access via Magisk or KernelSU
  • Magisk app or KernelSU Manager

🔑 Installation

  1. Download the module .zip file from the releases page or build it manually from this repository.
  2. Flash the module through the Magisk app or KernelSU Manager.
  3. Reboot your device to apply the changes.
  4. (Optional) Edit the configuration via a terminal or file editor.

🔧 Configuration

After flashing, the module will be stored at:

/data/adb/modules/ZRAM-Resizer-for-Android

You can also edit the module manually to set your desired ZRAM size (in bytes). Example:

ZRAM_SIZE_BYTES=4294967296

If you're confused by byte-based configuration, visit this link: GiB size in Byte

🗑️ Removal

To remove the module:

  1. Open the Magisk app or KernelSU Manager.

  2. Remove the ZRAM Resizer module.

  3. Reboot.

If you experience a bootloop, can't boot, get stuck in Fastboot, or run into similar problems:

  1. Boot into custom recovery

  2. Go to the path /data/adb/modules

  3. Find the ZRAM-Resizer-for-Android folder

  4. Delete that folder

  5. Then boot your device

⚙️ Troubleshooting

If ZRAM is not active or does not appear as /dev/block/zram0, follow the steps below:

  1. Make sure the kernel supports ZRAM

Run the following command in a terminal:

zcat /proc/config.gz | grep ZRAM

Make sure this line is present:

CONFIG_ZRAM=y
  1. Check whether zram0 is available
ls /sys/block/ | grep zram

If zram0 does not appear, your kernel is not loading the ZRAM module properly.

  1. Check the ZRAM major:minor numbers
cat /sys/class/block/zram0/dev

Example output:

253:0
  1. Create the ZRAM device node manually (if /dev/block/zram0 is unavailable)
su
mknod /dev/block/zram0 b 253 0
chmod 660 /dev/block/zram0

Replace the numbers 253 and 0 with the values from the previous step.

  1. Check the swap status
cat /proc/swaps

Example output:

/dev/block/zram0  partition  4194300  0  -2

✉️ Additional Notes

  • 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.

🐞 Bug Reporting

If you find a bug, please report it to the developer. You can do so through the Issues feature.

About

ZRAM resizer KSU/Magisk module for rooted Android device.

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages