Disable — Zram Magisk
Download a terminal emulator app (like Termux) or connect your phone to a computer via ADB. Type su and grant root access when prompted by Magisk. Run the following command: cat /proc/swaps Use code with caution. :
The simplest way to remove zRAM is by using dedicated systemless scripts. Modules such as Swap-Disabler on GitHub disable all active compressed swap spaces during early boot.
zRAM creates a compressed block device directly within your device’s physical RAM. Instead of swapping inactive app data to slow flash storage (traditional swap), the Android kernel compresses those memory pages and stores them inside this designated zRAM partition. The Benefits of zRAM
As a final tip, if you're looking for an all-in-one performance solution, consider using a module like that bundles this adjustment with other performance enhancements. disable zram magisk
#!/system/bin/sh # Wait for the system boot to completely finish sleep 30 # Turn off the active zRAM swap block device if [ -e /dev/block/zram0 ]; then swapoff /dev/block/zram0 fi Use code with caution.
If you prefer not to write scripts manually, you can use Magisk modules built by the developer community to handle memory optimization. Step 1: Find a Memory Optimization Module
However, many power users prefer to disable ZRAM to reduce CPU overhead, prevent micro-stutters caused by compression/decompression processes, or because they have devices with ample physical RAM (8GB+). Download a terminal emulator app (like Termux) or
To make it permanent without a module, add the commands to /data/adb/service.d/ (create the folder if missing). Magisk automatically executes any script in service.d with .sh extension.
If you prefer not to use a pre-made module, you can create a custom script that runs on boot to disable ZRAM.
: Most Android devices will disable Magisk modules if you boot into Safe Mode (usually by holding Volume Down during the boot animation). How can I disable zram and enable and configure zswap - ARM : The simplest way to remove zRAM is
If your device only has 2GB–4GB of RAM, disabling ZRAM might cause apps to close frequently in the background, as the system will have less "virtual" memory available.
Since Magisk works by "systemless" modification, you can use specialized modules or a custom boot script to disable zRAM.
Intense gaming or heavy multitasking can trigger aggressive zRAM cycles, leading to noticeable frame drops.
