#!/bin/sh

if [ ! -e /dev/ipa ]; then
    exit 0
fi
while ! mountpoint -q -- /android/vendor
do
    sleep 1
done
if [ -f /vendor/firmware/ipa_fws.mdt ]; then
    echo 1 > /dev/ipa
fi

# While the time_daemon binary has been overlayed by a non-executable, Android
# init will continue trying to restart that service. Stop the cycle by
# explicitly tell it to stop.
setprop ctl.stop time_daemon

# Set schedtune boost
echo 20 > /sys/fs/cgroup/schedtune/schedtune.boost
echo 1 > /sys/fs/cgroup/schedtune/schedtune.prefer_idle
