id=disable_zram name=Universal zRAM Disabler version=v1.0 versionCode=1 author=YourName description=Completely disables zRAM and clears swap allocations at boot. Use code with caution. Step C: Create service.sh
Create a text file named module.prop and insert the following parameters:
Type free -m or top to verify that both total and used swap memory are listed as 0 MB . ⚠️ Common Troubleshooting disable zram magisk
Download a terminal emulator from the Play Store (e.g., Termux) or use adb shell . Grant root access by typing: su Use code with caution. Run the following command to check active swap allocations: cat /proc/swaps Use code with caution.
This script runs automatically during the late stages of device startup. Create a file named service.sh and insert the following code: id=disable_zram name=Universal zRAM Disabler version=v1
If you have 4GB or less of RAM , disabling zRAM leaves very little room for background processes. Without zRAM compression, the Android Low Memory Killer (LMKD) will aggressively terminate cached apps. If you experience this, uninstall the Magisk module to restore default multitasking.
Using Magisk is the safest and most efficient method to turn off zRAM. It modifies the system systemlessly without touching the /vendor or /system partitions directly. 🛠️ Methods to Disable zRAM via Magisk 1. Flash a Ready-Made Magisk Module This script runs automatically during the late stages
disable_zram/ ├── META-INF/ │ └── com/ │ └── google/ │ └── android/ │ ├── update-binary │ └── updater-script ├── module.prop └── service.sh Use code with caution. Step B: Create module.prop
For high-end devices with , zRAM is often unnecessary. Disabling it frees up CPU cycles and uses raw, uncompressed physical RAM for optimum performance.
#!/system/bin/sh # Wait for the system boot to fully complete sleep 30 # Turn off the active zRAM swap device if [ -e /dev/block/zram0 ]; then swapoff /dev/block/zram0 # Reset disksize to release the memory allocated to zRAM echo 1 > /sys/block/zram0/reset fi # Apply to secondary zRAM partitions if present for i in 1 2 3; do if [ -e /dev/block/zram$i ]; then swapoff /dev/block/zram$i echo 1 > /sys/block/zram$i/reset fi done # Set swappiness to 0 to instruct the kernel not to swap echo 0 > /proc/sys/vm/swappiness Use code with caution. Step D: Zip and Flash