init.e1q.rc 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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. #mAFPC
  36. mkdir /efs/afc 0760 system system
  37. exec - system system -- /system/bin/mafpc_write
  38. on boot
  39. write /proc/sys/vm/swappiness 100
  40. # SDHMS Slowdown : Cpuset
  41. write /dev/cpuset/abnormal/cpus 0-1,5-6
  42. write /dev/cpuset/moderate/cpus 0-1,5-6
  43. # [ Permissions for Range Sensor Sensor
  44. # Range Sensor
  45. chown system radio /sys/class/sensors/range_sensor/ambient
  46. chown system radio /sys/class/sensors/range_sensor/cal01
  47. chown system radio /sys/class/sensors/range_sensor/cal02
  48. chown system radio /sys/class/sensors/range_sensor/cal_uid
  49. chown system radio /sys/class/sensors/range_sensor/open_calibration
  50. chown system radio /sys/class/sensors/range_sensor/calibration
  51. chown system radio /sys/class/sensors/range_sensor/enable
  52. chown system radio /sys/class/sensors/range_sensor/frame_rate
  53. chown system radio /sys/class/sensors/range_sensor/fw_version
  54. chown system radio /sys/class/sensors/range_sensor/mode
  55. chown system radio /sys/class/sensors/range_sensor/name
  56. chown system radio /sys/class/sensors/range_sensor/range_sigma
  57. chown system radio /sys/class/sensors/range_sensor/status
  58. chown system radio /sys/class/sensors/range_sensor/target_status
  59. chown system radio /sys/class/sensors/range_sensor/temp
  60. chown system radio /sys/class/sensors/range_sensor/test01
  61. chown system radio /sys/class/sensors/range_sensor/test02
  62. chown system radio /sys/class/sensors/range_sensor/test03
  63. chown system radio /sys/class/sensors/range_sensor/test_mode
  64. chown system radio /sys/class/sensors/range_sensor/uid
  65. chown system radio /sys/class/sensors/range_sensor/vendor
  66. chown system radio /sys/class/sensors/range_sensor/zone
  67. chown system radio /sys/class/sensors/range_sensor/file_cal
  68. chown system radio /sys/class/sensors/range_sensor/file_p2p
  69. chown system radio /sys/class/sensors/range_sensor/file_shape
  70. # ] Permissions for Range Sensor
  71. # mem_boost_mode
  72. chmod 0664 /sys/kernel/mm/vmscan/mem_boost_mode
  73. chown cameraserver system /sys/kernel/mm/vmscan/mem_boost_mode
  74. # rbin mem_boost_mode
  75. chmod 0664 /sys/kernel/rbin/mem_boost_mode
  76. chown cameraserver system /sys/kernel/rbin/mem_boost_mode
  77. on shutdown
  78. # service definition
  79. # on property triggers
  80. # Create carrier folder for HiddenMenu
  81. on post-fs
  82. mkdir /efs/carrier 0755 radio system
  83. chown radio system /efs/carrier
  84. chown radio system /efs/carrier/HiddenMenu
  85. # For Range Sensor
  86. chmod 0660 /dev/range_sensor
  87. chown system system /dev/range_sensor
  88. mkdir /efs/range_sensor 0770 system system
  89. chown system system /efs/range_sensor/cal_data.bin
  90. chmod 0660 /efs/range_sensor/cal_data.bin
  91. chown system system /efs/range_sensor/vl53l5_cal_shape.bin
  92. chmod 0660 /efs/range_sensor/vl53l5_cal_shape.bin
  93. chown system system /efs/range_sensor/vl53l5_cal_p2p.bin
  94. chmod 0660 /efs/range_sensor/vl53l5_cal_p2p.bin
  95. # Range Sensor
  96. on property:sys.boot_completed=1
  97. write /sys/class/sensors/range_sensor/calibration 0
  98. # some priv-apps of TMB bind mount to ASR priv-apps
  99. on post-fs-data && property:ro.csc.sales_code=ASR
  100. umount /system/carrier
  101. mkdir /mnt/temp
  102. mount none /system/carrier/TMB /mnt/temp bind
  103. mount none /system/carrier/ASR /system/carrier bind
  104. mount none /mnt/temp/priv-app/SprintAndroidExtension2_TMB /system/carrier/priv-app/SprintAndroidExtension2_TMB bind
  105. umount /mnt/temp
  106. rmdir /mnt/temp
  107. # some priv-apps of TMB bind mount to TMK priv-apps
  108. on post-fs-data && property:ro.csc.sales_code=TMK
  109. umount /system/carrier
  110. mkdir /mnt/temp
  111. mount none /system/carrier/TMB /mnt/temp bind
  112. mount none /system/carrier/TMK /system/carrier bind
  113. mount none /mnt/temp/priv-app/SprintAndroidExtension2_TMB /system/carrier/priv-app/SprintAndroidExtension2_TMB bind
  114. umount /mnt/temp
  115. rmdir /mnt/temp
  116. # some priv-apps of DSH bind mount to DSA priv-apps
  117. on post-fs-data && property:ro.csc.sales_code=DSA
  118. umount /system/carrier
  119. mkdir /mnt/temp
  120. mount none /system/carrier/DSH /mnt/temp bind
  121. mount none /system/carrier/DSA /system/carrier bind
  122. mount none /mnt/temp/priv-app/VisualVoicemailDsh_Stub /system/carrier/priv-app/VisualVoicemailDsh_Stub bind
  123. umount /mnt/temp
  124. rmdir /mnt/temp
  125. # some priv-apps of DSH & DSA bind mount to DSG priv-apps
  126. on post-fs-data && property:ro.csc.sales_code=DSG
  127. umount /system/carrier
  128. mkdir /mnt/temp1
  129. mkdir /mnt/temp2
  130. mount none /system/carrier/DSH /mnt/temp1 bind
  131. mount none /system/carrier/DSA /mnt/temp2 bind
  132. mount none /system/carrier/DSG /system/carrier bind
  133. mount none /mnt/temp1/priv-app/NetworkCompanion /system/carrier/priv-app/NetworkCompanion bind
  134. mount none /mnt/temp1/priv-app/VisualVoicemailDsh_Stub /system/carrier/priv-app/VisualVoicemailDsh_Stub bind
  135. mount none /mnt/temp2/priv-app/Opportunistic /system/carrier/priv-app/Opportunistic bind
  136. umount /mnt/temp1
  137. umount /mnt/temp2
  138. rmdir /mnt/temp1
  139. rmdir /mnt/temp2
  140. # some priv-apps of DSA bind mount to DSH priv-apps
  141. on post-fs-data && property:ro.csc.sales_code=DSH
  142. umount /system/carrier
  143. mkdir /mnt/temp
  144. mount none /system/carrier/DSA /mnt/temp bind
  145. mount none /system/carrier/DSH /system/carrier bind
  146. mount none /mnt/temp/priv-app/Opportunistic /system/carrier/priv-app/Opportunistic bind
  147. umount /mnt/temp
  148. rmdir /mnt/temp
  149. # Pageboostd
  150. on property:sys.boot_completed=1
  151. start pageboostd
  152. service pageboostd /system/bin/pageboostd
  153. class main
  154. user system
  155. group system mount radio net_bt sdcard_rw shell media media_rw
  156. socket pageboostd seqpacket 0660 system system
  157. disabled