init.lynx.rc 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 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. # SecureElement eSE2 cts mode
  36. on property:persist.vendor.se.ese2.mode=ctsmode
  37. write /sys/class/st33spi/st33spi/st33spi_state 33
  38. # Allow secure_element group to read / write ST33 SPI state
  39. on post-fs-data
  40. chown secure_element secure_element /sys/class/st33spi/st33spi/st33spi_state
  41. chmod 0660 /sys/class/st33spi/st33spi/st33spi_state
  42. # Wifi
  43. on property:sys.boot_completed=1
  44. write /sys/bus/platform/drivers/cnss2/qcom,cnss-qca6490/fs_ready 1
  45. # Create directories for wifihal services
  46. mkdir /dev/socket/wifihal 0770 wifi wifi
  47. chmod 2777 /dev/socket/wifihal
  48. # Create directories for Location services
  49. mkdir /dev/socket/location 0770 wifi wifi
  50. chmod 2777 /dev/socket/location
  51. mkdir /dev/socket/location/mq 0770 wifi wifi
  52. chmod 2777 /dev/socket/location/mq
  53. start vendor.loc_launcher
  54. # Start loc_launcher to launch lowi-server
  55. service vendor.loc_launcher /system/vendor/bin/loc_launcher
  56. class late_start
  57. user wifi
  58. group wifi
  59. disabled
  60. # Toggle high_sensitivity according to touch_sensitivity_mode
  61. on property:persist.vendor.touch_sensitivity_mode=0 && property:sys.boot_completed=1
  62. write /sys/devices/virtual/goog_touch_interface/gti.0/screen_protector_mode_enabled 0
  63. on property:persist.vendor.touch_sensitivity_mode=1 && property:sys.boot_completed=1
  64. write /sys/devices/virtual/goog_touch_interface/gti.0/screen_protector_mode_enabled 1