#!/system/bin/sh

# boost-boot (arter97) - 1
echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "1704000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "512" > /sys/block/mmcblk0/bdi/read_ahead_kb
echo "row" > /sys/block/mmcblk0/queue/scheduler
sync

# Wait until we see some android processes to consider boot is more or less complete (credits to AndiP71)
while ! /sbin/pgrep com.android ; do
  sleep 1
done

# Wait until bootanimation ends (arter97)

sleep 5

while /sbin/pgrep bootanimation ; do
  sleep 1
done

# Wait just more . . .
sleep 10

# boost-boot (arter97) - 2
sync
