Disable Zram Magisk //top\\ -
Title: The Silence of the Swap
Kai stared at the terminal output, his thumb hovering over the Volume Down 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.
“Liar,” he whispered.
He knew the culprit. ZRAM. A compressed block device in RAM that acted as swap space. In theory, it was brilliant: squeeze stale data, fit more apps in memory. But on his worn-out eMMC and aging CPU, it was a death sentence. The kernel was spending more time compressing and decompressing memory pages than actually running his apps. The phone was drowning in its own cleverness.
He had root. He had Magisk. He had a plan.
He opened a root shell.
cat /proc/swaps
There it was. /dev/block/zram0. Type: partition. Size: 1.5GB. Used: 1.2GB. Priority: 100.
“Goodbye,” he muttered.
First, he turned it off:
swapoff /dev/block/zram0
The terminal hung for a second. Then, a cascade of log messages. The memory manager panicked briefly, redistributing the compressed data into real RAM. The phone stuttered for three seconds. Then, silence. The CPU temperature dropped by four degrees.
He checked: free -h. Total RAM: 3.7GB. Used: 2.9GB. No swap.
His heart raced. This is dangerous. Without swap, if memory filled, the Out-Of-Memory killer would start executing apps—not gracefully pausing them. But Kai didn't care. He wanted speed, not multitasking.
Now, to make it permanent.
Magisk was perfect for this. Not for hiding root, but for boot-time surgery. He created a custom module directory:
/data/adb/modules/disable_zram/
Inside, a simple post-fs-data.sh script:
#!/system/bin/sh
swapoff /dev/block/zram0
echo 1 > /sys/block/zram0/reset
echo "ZRAM: Disabled and forgotten." > /dev/kmsg
He set permissions (0755) and added an empty module.prop:
id=disable_zram
name=Disable ZRAM
version=1.0
versionCode=1
author=Kai
description=Completely disables compressed swap at boot.
Then he rebooted.
The boot animation played—a little faster than usual, he thought. The home screen appeared. He opened Twitter, Spotify, and Chrome simultaneously.
No redraw. No stutter.
Keyboard: instant.
He opened a terminal again. cat /proc/swaps returned absolutely nothing.
Kai leaned back, smiling. His phone wasn't a server. It didn't need sophisticated memory compression. It needed to respond. disable zram magisk
He had freed it from the tyranny of ZRAM. And Magisk had made the silence permanent.
Step 1: Create the module directory structure
Using a file explorer with root access (e.g., Mixplorer), create the following folder tree:
/data/adb/modules/disable_zram/
├── META-INF/
│ └── com/
│ └── google/
│ └── android/
│ ├── update-binary
│ └── updater-script
├── service.sh
├── module.prop
└── system/
└── (empty)
Step-by-Step:
-
Download a Disable ZRAM Module
Search for "Disable ZRAM" in Magisk’s module repository or trusted forums like XDA. One popular option is the ZRAM Disabler module (available on GitHub). -
Install via Magisk
- Open Magisk app → Modules → Install from storage.
- Select the downloaded
.zipfile. - Reboot your phone.
-
How It Works
These modules typically place a script in/data/adb/service.d/that runsswapoff /dev/block/zram0at boot.
3. Checking if ZRAM is Active
Before disabling, verify ZRAM status:
# Terminal (as root)
cat /proc/swaps
If you see /dev/block/zram0 (or similar) with a size >0, ZRAM is enabled.
Or check via:
zramctl
