Disable: Zram Magisk
: Some kernels recreate ZRAM on-the-fly. If it reappears, you’ll need a persistent method (Method 3).
adb shell mount /data rm -rf /data/adb/modules/[module_name]
Samsung's OneUI (and other heavy skins like MIUI, ColorOS, and EMUI) have aggressive memory management that may fight back against manual zRAM changes. If ADB commands or modules don't stick after a reboot, you may need to use a tasker script or init.d script that reapplies the changes on every boot with a slight delay. disable zram magisk
: Connect to a PC and run adb shell magisk --remove-modules to strip all modules and reboot.
Long-press the disable_zram.sh file, open its Properties or Permissions menu, and change its permissions to 755 ( rwxr-xr-x ). This grants execution permissions to the script. Reboot your device. How to Verify That zRAM is Disabled : Some kernels recreate ZRAM on-the-fly
id=disable_zram name=Disable zRAM version=v1.0 versionCode=1 author=YourName description=Forces the system to disable zRAM on boot. Use code with caution. Copied to clipboard Step 3: Create the Boot Script
If the kernel keeps reinitializing ZRAM, you may need to suppress the swapon system call. This is advanced and device-specific. A safer route is using a custom kernel without ZRAM support compiled in. If ADB commands or modules don't stick after
There are two primary ways to disable zRAM systemlessly using Magisk:
#MAGISK
Disabling using Magisk is a common optimization for power users who find that the default memory compression on Android causes micro-stutters or unnecessary CPU overhead, especially on devices with high physical RAM (8GB+) . By removing this compressed swap space, you force the system to rely entirely on its faster physical RAM. 1. Identify Your Need
Note: Some custom kernels or older devices use /dev/zram0 instead. If the above fails, change the path to /dev/zram0 . Step 4: Zip and Flash