Inside, a simple post-fs-data.sh script:
After applying any of the above methods, you must verify that zRAM has been successfully turned off. A terminal emulator app or ADB shell is the best tool for this.
Make the script executable:
While beneficial for older or low-RAM devices, disabling zRAM can be appealing to others for several reasons: disable zram magisk
Run:
This is why budget phones with 2-3 GB of RAM rely heavily on ZRAM. But on flagships with 8-12 GB of RAM, the benefits diminish.
If you want to test the effects of disabling zRAM without making it permanent, you can use an ADB command. This method is not reboot-proof. Inside, a simple post-fs-data
#!/system/bin/sh # Wait for boot to finish to ensure Android doesn't restart it sleep 60 # Turn off swap on the zRAM block device swapoff /dev/block/zram0 # Reset the zRAM device size to 0 to reclaim physical memory echo 1 > /sys/block/zram0/reset Use code with caution. Copied to clipboard
Remember to verify the change after every reboot, and always keep a backup plan (Safe Mode or custom recovery) in case of instability.
If you have a device with 6GB of RAM or less , it is generally recommended to keep ZRAM enabled. If you have 8GB or more , disabling ZRAM can lead to a smoother user experience. But on flagships with 8-12 GB of RAM, the benefits diminish
Alternatively, you can run the free -m command in the terminal. The line labeled should display 0 across total, used, and free columns. Troubleshooting & How to Re-enable zRAM Fixing Bootloops or Instability
As the name suggests, this module disables zRAM and uses a traditional swapfile on storage instead. The developer emphasizes that it is "not generalized"—meaning it may require customization for your specific device.
echo "id=disable_zram" > /data/adb/modules/disable_zram/module.prop echo "name=Disable zRAM" >> /data/adb/modules/disable_zram/module.prop echo "version=1.0" >> /data/adb/modules/disable_zram/module.prop echo "versionCode=1" >> /data/adb/modules/disable_zram/module.prop echo "author=You" >> /data/adb/modules/disable_zram/module.prop echo "description=Disables zRAM on boot" >> /data/adb/modules/disable_zram/module.prop