Disable Zram Magisk =link= Instant

Filename Type Size Used Priority /dev/block/zram0 partition 2097152 102400 100

Alternatively, you can check free memory using the command free -m or cat /proc/meminfo and look for the "Swap" line; it should show 0 total.

There are three reliable ways to disable ZRAM using Magisk. Choose the one that best fits your technical comfort level.

zramctl

Look at the row in the output matrix. If zRAM is successfully disabled, the values for Total , Used , and Free swap space will all display as 0 . disable zram magisk

echo 20 > /proc/sys/vm/swappiness

Create module folder structure on device or PC:

Open a terminal (ADB or terminal emulator) and run:

Ensure the script is executable ( chmod +x /data/adb/service.d/disable-zram/service.sh ). Method 3: Temporarily Disable ZRAM (Without Reboot) zramctl Look at the row in the output matrix

The easiest way to disable zRAM is to use a pre-compiled Magisk module. Open-source modules like Swap-Disabler on GitHub automate the execution of startup commands to turn off virtual memory swap cleanly. Step-by-Step Installation:

Your device must be rooted with Magisk installed.

If free -m still shows active swap space after a reboot, increase the sleep timer in your script from sleep 30 to sleep 60 . Some device kernels aggressively re-enable swap late in the boot cycle, requiring a longer delay before turning it off. If you want to fine-tune your device further, let me know:

This method creates a service script that runs at boot, disabling ZRAM before Android uses it. Method 3: Temporarily Disable ZRAM (Without Reboot) The

If you prefer not to install third-party zip files, you can create your own custom startup script directly within Magisk's service directory. Magisk executes scripts placed in this directory automatically during the boot sequence. Step 1: Create the Script File

Verification:

Without virtual swap space, Android's Low Memory Killer (LMK) will immediately terminate older background tasks if you run out of physical memory. If you notice apps refreshing frequently when switching between them, your phone lacks the physical RAM capacity to run without zRAM.

If your device has 8GB, 12GB, or 16GB of RAM, you likely do not need ZRAM.

Disabling zRAM is highly recommended only for devices with 6GB of physical RAM or higher . Disabling it on a 3GB or 4GB RAM device may cause frequent app crashes and system UI reboots. Method 1: Using a Magisk Module (Recommended)