I've managed to setup ZRam on my poor Xperia XZ2 Compact! Unfortunately it doesn't seem like the LineageOS build supports ZSTD, but I'm not sure if the phone could handle it anyway.
I'm currently using the following Magisk package to manage the ZRam part. It's got a few bugs which need to be fixed - adding in a ’wait 1’ statement in the .sh file responsible for running the command with the -r parameter, because otherwise a race condition will happen.
https://github.com/VR-25/zram-swap-manager
There's another prominent module that shows up on Google called "STRP X ZRAM", but I wouldn't use it. The public GitHub repo is outdated and ends up killing the stock swap partition without creating a ZRam. There is an updated version that you have to use Telegram to download, it contains a binary blob, and running the Magisk package install shell script tries to *send out telemetry data*. Kinda fucked up.
The install and functions.sh files seem rather familiar to the zram-swap-manager repo, so it might also be a case of copycatism.
I'm also thankful that TrackerControl (from F-droid) is blocking too many things, because it prevented that script from getting downloaded. Oh, right. I forgot to mention that it's a *remote telemetry shell script* that it tries to download.
#androidrooting #xperia #xz2c #android13 #lineageos #zram