1# RipcurrentPro specific init.rc
2import /vendor/etc/init/hw/init.${ro.board.platform}.board.rc
3
4on init && property:ro.vendor.factory=1
5    import /vendor/etc/init/hw/init.factory.rc
6
7on init
8    # eSE streset tool name
9    setprop persist.vendor.se.streset libstreset24
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_ripcurrentpro
15
16service insmod_sh_ripcurrentpro /vendor/bin/insmod.sh /vendor_dlkm/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# Bluetooth
36on post-fs-data
37    chown bluetooth system /proc/bluetooth/timesync
38
39# Haptics
40on property:vendor.all.modules.ready=1
41    mkdir /mnt/vendor/persist/haptics 0770 system system
42    chmod 770 /mnt/vendor/persist/haptics
43    chmod 440 /mnt/vendor/persist/haptics/cs40l26_dual.cal
44    chown system system /mnt/vendor/persist/haptics
45    chown system system /mnt/vendor/persist/haptics/cs40l26_dual.cal
46
47    chown system system /sys/bus/i2c/devices/0-0043/calibration/f0_stored
48    chown system system /sys/bus/i2c/devices/0-0043/calibration/q_stored
49    chown system system /sys/bus/i2c/devices/0-0043/calibration/redc_stored
50    chown system system /sys/bus/i2c/devices/0-0043/default/vibe_state
51    chown system system /sys/bus/i2c/devices/0-0043/default/num_waves
52    chown system system /sys/bus/i2c/devices/0-0043/default/f0_offset
53    chown system system /sys/bus/i2c/devices/0-0043/default/owt_free_space
54    chown system system /sys/bus/i2c/devices/0-0043/default/f0_comp_enable
55    chown system system /sys/bus/i2c/devices/0-0043/default/redc_comp_enable
56    chown system system /sys/bus/i2c/devices/0-0043/default/delay_before_stop_playback_us
57    chown system system /sys/bus/i2c/devices/0-0042/calibration/f0_stored
58    chown system system /sys/bus/i2c/devices/0-0042/calibration/q_stored
59    chown system system /sys/bus/i2c/devices/0-0042/calibration/redc_stored
60    chown system system /sys/bus/i2c/devices/0-0042/default/vibe_state
61    chown system system /sys/bus/i2c/devices/0-0042/default/num_waves
62    chown system system /sys/bus/i2c/devices/0-0042/default/f0_offset
63    chown system system /sys/bus/i2c/devices/0-0042/default/owt_free_space
64    chown system system /sys/bus/i2c/devices/0-0042/default/f0_comp_enable
65    chown system system /sys/bus/i2c/devices/0-0042/default/redc_comp_enable
66    chown system system /sys/bus/i2c/devices/0-0042/default/delay_before_stop_playback_us
67
68    enable vendor.vibrator.cs40l26-dual
69