/etc/init/zram-touch.conf is in lxc-android-config 0.230+16.04.20160328-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | start on started lxc-android-config
task
script
# if zram is enabled *and* already configured by the android side,
# we assume we want to use it
if [ -b /dev/zram0 ] && [ "$(cat /sys/block/zram0/disksize)" -gt 0 ]; then
if ! grep -q zram0 /proc/swaps; then
mkswap /dev/zram0 || true
swapon /dev/zram0 || true
fi
# if we use zram anyway lets drop the slow on disk swap file
if grep -q /userdata/SWAP.img /proc/swaps && grep -q zram0 /proc/swaps; then
swapoff /userdata/SWAP.img
fi
fi
end script
|