init.e1q.rc 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. # Copyright (c) 2019-2023, The Linux Foundation. All rights reserved.
  2. #
  3. # Redistribution and use in source and binary forms, with or without
  4. # modification, are permitted provided that the following conditions are
  5. # met:
  6. # * Redistributions of source code must retain the above copyright
  7. # notice, this list of conditions and the following disclaimer.
  8. # * Redistributions in binary form must reproduce the above
  9. # copyright notice, this list of conditions and the following
  10. # disclaimer in the documentation and/or other materials provided
  11. # with the distribution.
  12. # * Neither the name of The Linux Foundation nor the names of its
  13. # contributors may be used to endorse or promote products derived
  14. # from this software without specific prior written permission.
  15. #
  16. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
  17. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  18. # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
  19. # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
  20. # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  21. # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  22. # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  23. # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  24. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  25. # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  26. # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. #
  28. #
  29. on early-init
  30. on init
  31. on late-init
  32. on post-fs
  33. on late-fs
  34. on post-fs-data
  35. # Samsung Pay
  36. mkdir /efs/pfw_data 0760 vendor_spay vendor_spay
  37. # MST/NFC Switch
  38. chown vendor_spay system /dev/mst_ctrl
  39. chmod 0660 /dev/mst_ctrl
  40. #mAFPC
  41. mkdir /efs/afc 0760 system system
  42. exec - system system -- /system/bin/mafpc_write
  43. on boot
  44. write /proc/sys/vm/swappiness 100
  45. # SDHMS Slowdown : Cpuset
  46. write /dev/cpuset/abnormal/cpus 0-1,5-6
  47. write /dev/cpuset/moderate/cpus 0-1,5-6
  48. # [ Permissions for Range Sensor Sensor
  49. # Range Sensor
  50. chown system radio /sys/class/sensors/range_sensor/ambient
  51. chown system radio /sys/class/sensors/range_sensor/cal01
  52. chown system radio /sys/class/sensors/range_sensor/cal02
  53. chown system radio /sys/class/sensors/range_sensor/cal_uid
  54. chown system radio /sys/class/sensors/range_sensor/open_calibration
  55. chown system radio /sys/class/sensors/range_sensor/calibration
  56. chown system radio /sys/class/sensors/range_sensor/enable
  57. chown system radio /sys/class/sensors/range_sensor/frame_rate
  58. chown system radio /sys/class/sensors/range_sensor/fw_version
  59. chown system radio /sys/class/sensors/range_sensor/mode
  60. chown system radio /sys/class/sensors/range_sensor/name
  61. chown system radio /sys/class/sensors/range_sensor/range_sigma
  62. chown system radio /sys/class/sensors/range_sensor/status
  63. chown system radio /sys/class/sensors/range_sensor/target_status
  64. chown system radio /sys/class/sensors/range_sensor/temp
  65. chown system radio /sys/class/sensors/range_sensor/test01
  66. chown system radio /sys/class/sensors/range_sensor/test02
  67. chown system radio /sys/class/sensors/range_sensor/test03
  68. chown system radio /sys/class/sensors/range_sensor/test_mode
  69. chown system radio /sys/class/sensors/range_sensor/uid
  70. chown system radio /sys/class/sensors/range_sensor/vendor
  71. chown system radio /sys/class/sensors/range_sensor/zone
  72. chown system radio /sys/class/sensors/range_sensor/file_cal
  73. chown system radio /sys/class/sensors/range_sensor/file_p2p
  74. chown system radio /sys/class/sensors/range_sensor/file_shape
  75. # ] Permissions for Range Sensor
  76. # mem_boost_mode
  77. chmod 0664 /sys/kernel/mm/vmscan/mem_boost_mode
  78. chown cameraserver system /sys/kernel/mm/vmscan/mem_boost_mode
  79. # rbin mem_boost_mode
  80. chmod 0664 /sys/kernel/rbin/mem_boost_mode
  81. chown cameraserver system /sys/kernel/rbin/mem_boost_mode
  82. on shutdown
  83. # service definition
  84. # on property triggers
  85. # Create carrier folder for HiddenMenu
  86. on post-fs
  87. mkdir /efs/carrier 0755 radio system
  88. chown radio system /efs/carrier
  89. chown radio system /efs/carrier/HiddenMenu
  90. # For Range Sensor
  91. chmod 0660 /dev/range_sensor
  92. chown system system /dev/range_sensor
  93. mkdir /efs/range_sensor 0770 system system
  94. chown system system /efs/range_sensor/cal_data.bin
  95. chmod 0660 /efs/range_sensor/cal_data.bin
  96. chown system system /efs/range_sensor/vl53l5_cal_shape.bin
  97. chmod 0660 /efs/range_sensor/vl53l5_cal_shape.bin
  98. chown system system /efs/range_sensor/vl53l5_cal_p2p.bin
  99. chmod 0660 /efs/range_sensor/vl53l5_cal_p2p.bin
  100. # Range Sensor
  101. on property:sys.boot_completed=1
  102. write /sys/class/sensors/range_sensor/calibration 0
  103. # some priv-apps of TMB bind mount to ASR priv-apps
  104. on post-fs-data && property:ro.csc.sales_code=ASR
  105. umount /system/carrier
  106. mkdir /mnt/temp
  107. mount none /system/carrier/TMB /mnt/temp bind
  108. mount none /system/carrier/ASR /system/carrier bind
  109. mount none /mnt/temp/priv-app/SprintAndroidExtension2_TMB /system/carrier/priv-app/SprintAndroidExtension2_TMB bind
  110. umount /mnt/temp
  111. rmdir /mnt/temp
  112. # some priv-apps of TMB bind mount to TMK priv-apps
  113. on post-fs-data && property:ro.csc.sales_code=TMK
  114. umount /system/carrier
  115. mkdir /mnt/temp
  116. mount none /system/carrier/TMB /mnt/temp bind
  117. mount none /system/carrier/TMK /system/carrier bind
  118. mount none /mnt/temp/priv-app/SprintAndroidExtension2_TMB /system/carrier/priv-app/SprintAndroidExtension2_TMB bind
  119. umount /mnt/temp
  120. rmdir /mnt/temp
  121. # some priv-apps of DSH bind mount to DSA priv-apps
  122. on post-fs-data && property:ro.csc.sales_code=DSA
  123. umount /system/carrier
  124. mkdir /mnt/temp
  125. mount none /system/carrier/DSH /mnt/temp bind
  126. mount none /system/carrier/DSA /system/carrier bind
  127. mount none /mnt/temp/priv-app/VisualVoicemailDsh_Stub /system/carrier/priv-app/VisualVoicemailDsh_Stub bind
  128. umount /mnt/temp
  129. rmdir /mnt/temp
  130. # some priv-apps of DSH & DSA bind mount to DSG priv-apps
  131. on post-fs-data && property:ro.csc.sales_code=DSG
  132. umount /system/carrier
  133. mkdir /mnt/temp1
  134. mkdir /mnt/temp2
  135. mount none /system/carrier/DSH /mnt/temp1 bind
  136. mount none /system/carrier/DSA /mnt/temp2 bind
  137. mount none /system/carrier/DSG /system/carrier bind
  138. mount none /mnt/temp1/priv-app/NetworkCompanion /system/carrier/priv-app/NetworkCompanion bind
  139. mount none /mnt/temp1/priv-app/VisualVoicemailDsh_Stub /system/carrier/priv-app/VisualVoicemailDsh_Stub bind
  140. mount none /mnt/temp2/priv-app/Opportunistic /system/carrier/priv-app/Opportunistic bind
  141. umount /mnt/temp1
  142. umount /mnt/temp2
  143. rmdir /mnt/temp1
  144. rmdir /mnt/temp2
  145. # some priv-apps of DSA bind mount to DSH priv-apps
  146. on post-fs-data && property:ro.csc.sales_code=DSH
  147. umount /system/carrier
  148. mkdir /mnt/temp
  149. mount none /system/carrier/DSA /mnt/temp bind
  150. mount none /system/carrier/DSH /system/carrier bind
  151. mount none /mnt/temp/priv-app/Opportunistic /system/carrier/priv-app/Opportunistic bind
  152. umount /mnt/temp
  153. rmdir /mnt/temp
  154. # Pageboostd
  155. on property:sys.boot_completed=1
  156. start pageboostd
  157. service pageboostd /system/bin/pageboostd
  158. class main
  159. user system
  160. group system mount radio net_bt sdcard_rw shell media media_rw
  161. socket pageboostd seqpacket 0660 system system
  162. disabled