init.e3q.rc 7.3 KB

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