service thermal-engine /vendor/bin/thermal-engine
    class main
    user root
    group root
    socket thermal-send-client stream 0660 system oem_2907
    socket thermal-recv-client stream 0660 system oem_2907
    socket thermal-recv-passive-client stream 0660 system oem_2907
    socket thermal-send-rule stream 0660 system oem_2907
    disabled

service vendor.nfc_hal_service /vendor/bin/hw/android.hardware.nfc@1.2-service
    override
    class hal
    user nfc
    group nfc
    disabled

on boot && property:ro.product.vendor.device=*
    mount none /vendor/etc/thermal-engine-map-${ro.product.vendor.device}.conf /vendor/etc/thermal-engine-map.conf bind
    start thermal-engine

on init && property:ro.boot.hwname=joyeuse
    setprop ro.boot.product.hardware.sku joyeuse
    start vendor.nfc_hal_service

on property:persist.sys.device_provisioned=1
    setprop dalvik.vm.dex2oat-cpu-set 0,1,2,3,4,5,7
    setprop dalvik.vm.dex2oat-threads 6

# perf tuning
on property:vendor.post_boot.parsed=1
    # Setup runtime cpusets
    write /dev/cpuset/top-app/cpus 0-7
    write /dev/cpuset/foreground/cpus 0-5,7
    write /dev/cpuset/background/cpus 4-5
    write /dev/cpuset/system-background/cpus 2-5
    write /dev/cpuset/restricted/cpus 2-5

    # Setup default schedTune value for foreground/top-app
    write /dev/stune/foreground/schedtune.prefer_idle 1
    write /dev/stune/top-app/schedtune.boost 5
    write /dev/stune/top-app/schedtune.prefer_idle 1

    # Setup dynamic stune boost
    write /sys/module/cpu_boost/parameters/dynamic_stune_boost 15
    write /sys/module/cpu_boost/parameters/dynamic_stune_boost_ms 1000
    write /dev/stune/top-app/schedtune.sched_boost 15

    # Setup schedutil ratelimits
    write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us 500
    write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us 20000
    write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us 500
    write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us 20000

    # Enable schedutil predicted-load boosting
    write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/pl 1
    write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/pl 1

    # Reinit lmkd to reconfigure lmkd properties
    setprop lmkd.reinit 1
