blob: 48abe65eb13b208cfa7bd8eaedba4f05db87981e [file] [log] [blame]
# Cheetah/Panther specific init.rc
on init
# NFC streset tool name
setprop persist.vendor.nfc.streset libstreset21
setprop persist.vendor.se.streset libstreset21
on init && property:ro.vendor.factory=1
import /vendor/etc/init/hw/init.factory.rc
on early-boot
# Wait for insmod_sh to finish all common modules
wait_for_prop vendor.common.modules.ready 1
start insmod_sh_pantah
service insmod_sh_pantah /vendor/bin/init.insmod.sh /vendor/etc/init.insmod.${ro.hardware}.cfg
class main
user root
group root system
disabled
oneshot
on property:vendor.mfgapi.touchpanel.permission=1
chmod 0600 /sys/devices/virtual/sec/tsp/cmd
chown system system /sys/devices/virtual/sec/tsp/cmd
# Fingerprint
on post-fs-data
chown system system /dev/goodix_fp
exec_background - system shell -- /vendor/bin/trusty_apploader /vendor/firmware/g7.app
# Overrides fingerprint antispoof if following persist sysprops are set
on boot && property:ro.build.type=userdebug && \
property:persist.vendor.fingerprint.disable.fake.override=0
setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override}
on boot && property:ro.build.type=userdebug && \
property:persist.vendor.fingerprint.disable.fake.override=1
setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override}
on boot && property:ro.build.type=userdebug && \
property:persist.vendor.fingerprint.disable.fake.override=100
setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override}
# WiFi
on post-fs-data
setprop wifi.direct.interface p2p-dev-wlan0
setprop wifi.aware.interface aware_nmi0
# Speaker amp permission
chmod 644 /mnt/vendor/persist/audio/speaker.cal
# Allow secure_element group to read / write ST33 SPI state
chown secure_element secure_element /sys/class/st33spi/st33spi/st33spi_state
chmod 0660 /sys/class/st33spi/st33spi/st33spi_state
# Persist
on post-fs-data
chmod 770 /mnt/vendor/persist/display/hdr_cal_v1
chmod 770 /mnt/vendor/persist/display/hdr_cal_v2
chmod 770 /mnt/vendor/persist/display/sdr_cal_v1
chmod 770 /mnt/vendor/persist/display/sdr_cal_v2
chown system system /mnt/vendor/persist/sensors/registry/vd6282_spectral_fac_cal.reg
chmod 600 /mnt/vendor/persist/sensors/registry/vd6282_spectral_fac_cal.reg
# NFC
on property:ro.boot.hardware.revision=PROTO1.0
setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf
on property:ro.boot.hardware.revision=PROTO1.1
setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf
# Bluetooth
on post-fs-data
chown bluetooth system /proc/bluetooth/timesync
# SecureElement eSE2 cts mode
on property:persist.vendor.se.ese2.mode=ctsmode
write /sys/class/st33spi/st33spi/st33spi_state 33
on init && property:ro.boot.hw.soc.rev=0
setprop vendor.powerhal.config powerhint-a0.json
on property:ro.boot.hardware.revision=PROTO1.0
setprop vendor.thermal.config "thermal_info_config_proto.json"
on property:ro.boot.hardware.revision=PROTO1.1
setprop vendor.thermal.config "thermal_info_config_proto.json"
# Touch
on property:vendor.device.modules.ready=1
chown system system /proc/focaltech_touch/Channel_Num
chown system system /proc/focaltech_touch/FW_Version
chown system system /proc/focaltech_touch/INT_PIN
chown system system /proc/focaltech_touch/force_active
chown system system /proc/focaltech_touch/Reset_Pin
chown system system /proc/focaltech_touch/fw_grip
chown system system /proc/focaltech_touch/fw_palm
chown system system /proc/focaltech_touch/heatmap_onoff
chown system system /proc/focaltech_touch/mf_mode
chown system system /proc/focaltech_touch/selftest/Baseline
chown system system /proc/focaltech_touch/selftest/Noise
chown system system /proc/focaltech_touch/selftest/Panel_Differ
chown system system /proc/focaltech_touch/selftest/Rawdata
chown system system /proc/focaltech_touch/selftest/Rawdata_Uniformity
chown system system /proc/focaltech_touch/selftest/Scap_CB
chown system system /proc/focaltech_touch/selftest/Scap_Rawdata
chown system system /proc/focaltech_touch/selftest/Short
chown system system /proc/focaltech_touch/selftest/Strength
# Override SF and RE uclamps to 0 on boot after being set elsewhere, for adpf cpu hints
on property:sys.boot_completed=1
trigger override-sf-uclamp
on override-sf-uclamp
write /proc/vendor_sched/rt_uclamp_min 0
write /proc/vendor_sched/sf_uclamp_min 0