init.lynx.rc 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. # When ro.build.flavor=factory_lynx-userdebug, add vendor/bin/factory to default path
  8. on init && property:ro.build.flavor=factory_lynx-userdebug
  9. 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
  10. on early-boot
  11. # Wait for insmod_sh to finish all common modules
  12. wait_for_prop vendor.common.modules.ready 1
  13. start insmod_sh_lynx
  14. service insmod_sh_lynx /vendor/bin/init.insmod.sh /vendor/etc/init.insmod.lynx.cfg
  15. class main
  16. user root
  17. group root system
  18. disabled
  19. oneshot
  20. on boot && property:ro.build.flavor=factory_lynx-userdebug
  21. # FTM log folder
  22. mkdir /data/ftmlog 0775 system system
  23. # Audio test folder
  24. mkdir /data/AudioTest 0775 system system
  25. # Start the twoshay touch service
  26. on late-init && property:vendor.device.modules.ready=1
  27. start twoshay
  28. on property:vendor.mfgapi.touchpanel.permission=1
  29. chmod 0600 /sys/devices/virtual/sec/tsp/cmd
  30. chown system system /sys/devices/virtual/sec/tsp/cmd
  31. # Fingerprint
  32. on post-fs-data
  33. chown system system /dev/goodix_fp
  34. exec_background - system shell -- /vendor/bin/trusty_apploader /vendor/firmware/g7.app
  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. # Create directories for wifihal services
  43. mkdir /dev/socket/wifihal 0770 wifi wifi
  44. chmod 2777 /dev/socket/wifihal
  45. # Create directories for Location services
  46. mkdir /dev/socket/location 0770 wifi wifi
  47. chmod 2777 /dev/socket/location
  48. mkdir /dev/socket/location/mq 0770 wifi wifi
  49. chmod 2777 /dev/socket/location/mq
  50. start vendor.loc_launcher
  51. # Start loc_launcher to launch lowi-server
  52. service vendor.loc_launcher /system/vendor/bin/loc_launcher
  53. class late_start
  54. user wifi
  55. group wifi
  56. disabled
  57. # Toggle high_sensitivity according to touch_sensitivity_mode
  58. on property:persist.vendor.touch_sensitivity_mode=0 && property:sys.boot_completed=1
  59. write /sys/devices/virtual/goog_touch_interface/gti.0/screen_protector_mode_enabled 0
  60. on property:persist.vendor.touch_sensitivity_mode=1 && property:sys.boot_completed=1
  61. write /sys/devices/virtual/goog_touch_interface/gti.0/screen_protector_mode_enabled 1