Expected output if disabled:
The rationale behind this module is straightforward: swap usage (especially with zRAM) increases CPU usage due to constant compression and decompression. On modern devices with generous physical RAM, this overhead is rarely beneficial.
#!/system/bin/sh # Wait for the system to fully boot sleep 30 # Disable the zram device swapoff /dev/block/zram0 # Reset the zram disksize to 0 to free up the allocated memory echo 1 > /sys/block/zram0/reset Use code with caution. Copied to clipboard
: A widely used module that disables swap and zRAM at startup to extend flash memory lifespan and potentially improve performance on devices with high physical RAM.
If you change your mind, re-enabling ZRAM is straightforward.
#!/system/bin/sh # Wait for the system to fully boot sleep 30 # Turn off swap/zRAM swapoff /dev/block/zram0 # Reset the zRAM disk size to 0 echo 1 > /sys/block/zram0/reset echo 0 > /sys/block/zram0/disksize Use code with caution. Step 3: Set Permissions