1# Cheetah/Panther specific init.rc 2 3on init 4 # NFC streset tool name 5 setprop persist.vendor.nfc.streset libstreset21 6 setprop persist.vendor.se.streset libstreset21 7 8on init && property:ro.vendor.factory=1 9 import /vendor/etc/init/hw/init.factory.rc 10 11on early-boot 12 # Wait for insmod_sh to finish all common modules 13 wait_for_prop vendor.common.modules.ready 1 14 start insmod_sh_pantah 15 16service insmod_sh_pantah /vendor/bin/insmod.sh /vendor/etc/init.insmod.${ro.hardware}.cfg 17 class main 18 user root 19 group root system 20 disabled 21 oneshot 22 23on property:vendor.mfgapi.touchpanel.permission=1 24 chmod 0600 /sys/devices/virtual/sec/tsp/cmd 25 chown system system /sys/devices/virtual/sec/tsp/cmd 26 27# WiFi 28on post-fs-data 29 setprop wifi.direct.interface p2p-dev-wlan0 30 setprop wifi.aware.interface aware_nmi0 31 32 # Speaker amp permission 33 chmod 644 /mnt/vendor/persist/audio/speaker.cal 34 35 # Allow secure_element group to read / write ST33 SPI state 36 chown secure_element secure_element /sys/class/st33spi/st33spi/st33spi_state 37 chmod 0660 /sys/class/st33spi/st33spi/st33spi_state 38 39# Persist 40on post-fs-data 41 chmod 770 /mnt/vendor/persist/display/hdr_cal_v1 42 chmod 770 /mnt/vendor/persist/display/hdr_cal_v2 43 chmod 770 /mnt/vendor/persist/display/sdr_cal_v1 44 chmod 770 /mnt/vendor/persist/display/sdr_cal_v2 45 chown system system /mnt/vendor/persist/sensors/registry/vd6282_spectral_fac_cal.reg 46 chmod 600 /mnt/vendor/persist/sensors/registry/vd6282_spectral_fac_cal.reg 47 48# NFC 49on property:ro.boot.hardware.revision=PROTO1.0 50 setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf 51 52on property:ro.boot.hardware.revision=PROTO1.1 53 setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf 54 55# Bluetooth 56on post-fs-data 57 chown bluetooth system /proc/bluetooth/timesync 58 mkdir /data/vendor/bluetooth 0770 bluetooth system 59 60# SecureElement eSE2 cts mode 61on property:persist.vendor.se.ese2.mode=ctsmode 62 write /sys/class/st33spi/st33spi/st33spi_state 33 63 64on init && property:ro.boot.hw.soc.rev=0 65 setprop vendor.powerhal.config powerhint-a0.json 66 67on property:ro.boot.hardware.revision=PROTO1.0 68 setprop vendor.thermal.config "thermal_info_config_proto.json" 69 70on property:ro.boot.hardware.revision=PROTO1.1 71 setprop vendor.thermal.config "thermal_info_config_proto.json" 72 73# Haptics 74on property:vendor.all.modules.ready=1 75 mkdir /mnt/vendor/persist/haptics 0770 system system 76 chmod 770 /mnt/vendor/persist/haptics 77 chmod 440 /mnt/vendor/persist/haptics/cs40l26.cal 78 chown system system /mnt/vendor/persist/haptics 79 chown system system /mnt/vendor/persist/haptics/cs40l26.cal 80 81 chown system system /sys/bus/i2c/devices/8-0043/calibration/f0_stored 82 chown system system /sys/bus/i2c/devices/8-0043/calibration/q_stored 83 chown system system /sys/bus/i2c/devices/8-0043/calibration/redc_stored 84 chown system system /sys/bus/i2c/devices/8-0043/default/vibe_state 85 chown system system /sys/bus/i2c/devices/8-0043/default/num_waves 86 chown system system /sys/bus/i2c/devices/8-0043/default/f0_offset 87 chown system system /sys/bus/i2c/devices/8-0043/default/owt_free_space 88 chown system system /sys/bus/i2c/devices/8-0043/default/f0_comp_enable 89 chown system system /sys/bus/i2c/devices/8-0043/default/redc_comp_enable 90 chown system system /sys/bus/i2c/devices/8-0043/default/delay_before_stop_playback_us 91 92 enable vendor.vibrator.cs40l26 93