diff --git a/rootdir/etc/fstab.flo b/rootdir/etc/fstab.flo index bfd982d..c43c1ef 100644 --- a/rootdir/etc/fstab.flo +++ b/rootdir/etc/fstab.flo @@ -24,3 +24,4 @@ /dev/block/platform/msm_sdcc.1/by-name/rpmb /rpmb emmc defaults defaults /dev/block/platform/msm_sdcc.1/by-name/abootb /abootb emmc defaults defaults /devices/platform/msm_hsusb_host/usb* auto auto defaults voldmanaged=usb:auto +/dev/block/zram0 none swap defaults zramsize=536870912,notrim diff --git a/rootdir/etc/init.flo.rc b/rootdir/etc/init.flo.rc index e8f8072..007415f 100644 --- a/rootdir/etc/init.flo.rc +++ b/rootdir/etc/init.flo.rc @@ -149,6 +149,13 @@ on boot on property:sys.boot_completed=1 setprop sys.io.scheduler bfq write /sys/block/mmcblk0/bdi/read_ahead_kb 256 + write /sys/block/zram0/comp_algorithm lz4 + write /sys/block/zram0/max_comp_streams 4 + write /sys/block/zram0/disksize 536870912 + write /proc/sys/vm/page-cluster 0 + write /proc/sys/vm/swappiness 60 + # Enable ZRAM on boot_complete + swapon_all ./fstab.flo on post-fs # Start devices by sysfs trigger