init.lynx.rc 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. # Lynx specific init.rc
  2. import /vendor/etc/init/hw/init.gs201.rc
  3. on init
  4. # NFC streset tool name
  5. setprop persist.vendor.nfc.streset libstreset21
  6. setprop persist.vendor.se.streset libstreset21
  7. setprop dalvik.vm.dexopt.thermal-cutoff 1
  8. # When ro.build.flavor=factory_lynx-userdebug, add vendor/bin/factory to default path
  9. on init && property:ro.build.flavor=factory_lynx-userdebug
  10. export PATH /product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin:/vendor/bin/factory
  11. on 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_lynx
  15. service insmod_sh_lynx /vendor/bin/insmod.sh /vendor/etc/init.insmod.lynx.cfg
  16. class main
  17. user root
  18. group root system
  19. disabled
  20. oneshot
  21. on boot && property:ro.build.flavor=factory_lynx-userdebug
  22. # FTM log folder
  23. mkdir /data/ftmlog 0775 system system
  24. # Audio test folder
  25. mkdir /data/AudioTest 0775 system system
  26. # Start the twoshay touch service
  27. on property:vendor.device.modules.ready=1
  28. start twoshay
  29. on property:vendor.mfgapi.touchpanel.permission=1
  30. chmod 0600 /sys/devices/virtual/sec/tsp/cmd
  31. chown system system /sys/devices/virtual/sec/tsp/cmd
  32. # SecureElement eSE2 cts mode
  33. on property:persist.vendor.se.ese2.mode=ctsmode
  34. write /sys/class/st33spi/st33spi/st33spi_state 33
  35. # Allow secure_element group to read / write ST33 SPI state
  36. on post-fs-data
  37. chown secure_element secure_element /sys/class/st33spi/st33spi/st33spi_state
  38. chmod 0660 /sys/class/st33spi/st33spi/st33spi_state
  39. # Wifi
  40. on property:sys.boot_completed=1
  41. write /sys/bus/platform/drivers/cnss2/qcom,cnss-qca6490/fs_ready 1
  42. on property:vendor.all.modules.ready=1 && property:vendor.all.devices.ready=1
  43. write /sys/bus/platform/drivers/cnss2/qcom,cnss-qca6490/fs_ready 1
  44. # Create directories for wifihal services
  45. mkdir /dev/socket/wifihal 0770 wifi wifi
  46. chmod 2777 /dev/socket/wifihal
  47. # Create directories for Location services
  48. mkdir /dev/socket/location 0770 wifi wifi
  49. chmod 2777 /dev/socket/location
  50. mkdir /dev/socket/location/mq 0770 wifi wifi
  51. chmod 2777 /dev/socket/location/mq
  52. start vendor.loc_launcher
  53. # Start loc_launcher to launch lowi-server
  54. service vendor.loc_launcher /system/vendor/bin/loc_launcher
  55. class late_start
  56. user wifi
  57. group wifi
  58. disabled
  59. # Start cnss-daemon for CHRE
  60. service vendor.cnss-daemon /vendor/bin/cnss-daemon -n -l
  61. class late_start
  62. user system
  63. group system inet wifi
  64. # Toggle high_sensitivity according to touch_sensitivity_mode
  65. on property:persist.vendor.touch_sensitivity_mode=0 && property:sys.boot_completed=1
  66. write /sys/devices/virtual/goog_touch_interface/gti.0/screen_protector_mode_enabled 0
  67. on property:persist.vendor.touch_sensitivity_mode=1 && property:sys.boot_completed=1
  68. write /sys/devices/virtual/goog_touch_interface/gti.0/screen_protector_mode_enabled 1
  69. # Touch
  70. on property:vendor.device.modules.ready=1
  71. chown system system /sys/devices/virtual/goog_touch_interface/gti.0/force_active
  72. chown system system /sys/devices/virtual/goog_touch_interface/gti.0/fw_ver
  73. chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ms_base
  74. chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ms_diff
  75. chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ms_raw
  76. chown system system /sys/devices/virtual/goog_touch_interface/gti.0/self_test
  77. chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_base
  78. chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_diff
  79. chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_raw
  80. # Override SF and RE uclamps to 0 on boot after being set elsewhere, for adpf cpu hints
  81. on property:sys.boot_completed=1
  82. trigger override-sf-uclamp
  83. on property:vendor.powerhal.init=*
  84. write /dev/cpuset/background/cpus ${persist.device_config.vendor_system_native.background_cpuset:-0-3}
  85. on override-sf-uclamp
  86. write /proc/vendor_sched/rt_uclamp_min 0
  87. write /proc/vendor_sched/sf_uclamp_min 0
  88. # For Japan sku, always enforce camera shutter sound
  89. # Since this property is read by the audio server in system service,
  90. # it should be written by the system init.
  91. on property:ro.boot.hardware.sku=G82U8
  92. setprop audio.camerasound.force true
  93. # Haptics
  94. on property:vendor.all.modules.ready=1
  95. mkdir /mnt/vendor/persist/haptics 0770 system system
  96. chmod 770 /mnt/vendor/persist/haptics
  97. chmod 440 /mnt/vendor/persist/haptics/cs40l26.cal
  98. chown system system /mnt/vendor/persist/haptics
  99. chown system system /mnt/vendor/persist/haptics/cs40l26.cal
  100. chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/f0_stored
  101. chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/q_stored
  102. chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/redc_stored
  103. chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/vibe_state
  104. chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/num_waves
  105. chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/f0_offset
  106. chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/owt_free_space
  107. chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/f0_comp_enable
  108. chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/redc_comp_enable
  109. chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/delay_before_stop_playback_us
  110. enable vendor.vibrator.cs40l26