Disable Zram Magisk ((top)) -

Open the newly created disable_zram.sh file with a text editor and paste the following commands:

Create module folder structure on device or PC:

If zRAM is disabled, this will output 0 .

Then he rebooted.

Place this in /data/adb/modules/disable_zram/post-fs-data.sh and set chmod 755 .

You need a file manager with root capabilities (such as MiXplorer or Solid Explorer) or a text editor text app to create a script.

Create a new file inside this folder and name it something recognizable, such as disable_zram.sh . Step 2: Write the Command Code disable zram magisk

If you're using a custom kernel with baked-in zRAM settings that override Magisk scripts, you may need to disable zRAM through the kernel manager app that came with your kernel. Look for a "zRAM size" or "Swap" toggle and set it to 0.

Once the installation finishes, reboot your device to apply the changes. The module will intercept system boot scripts and prevent any swap or zRAM partitions from starting. Method 2: Custom Magisk init.d or service.d Script

#!/system/bin/sh # Wait for the boot to finish while [ "$(getprop sys.boot_completed)" != "1" ]; do sleep 5 done # Disable ZRAM swapoff /dev/block/zram0 echo 1 > /sys/block/zram0/reset Use code with caution. Zip the disable_zram folder. Install: Flash this zip in the Magisk App. How to Verify ZRAM is Disabled After rebooting, you should verify that the change worked. Open a terminal app (like Termux) or use ADB shell. Run the command: cat /proc/swaps Open the newly created disable_zram

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

Your device must be successfully rooted with Magisk (version 24.0 or newer recommended).

Kai stared at the terminal output, his thumb hovering over the button. His aging Pixel 3a was gasping for air again. The launcher redrew. The keyboard lagged. Yet, the About Phone section cheerfully reported: 2.7 GB / 4 GB RAM used. You need a file manager with root capabilities

Using Magisk to disable zRAM is the safest and most efficient method available. Because Magisk operates systemlessly, you can modify low-level kernel parameters without altering your core system partition, ensuring your device continues to pass integrity checks and receives official updates easily. Why Disable zRAM?

Hi!

Have a Question? Chat with a live Product Specialist!

Have a Question?

We can provide more information about our products or arrange for a price quotation.


email-icon Send an Email
contactus-icon Send an Email callus-icon Call Us
×

Send us an Email