init.recovery.qcom.rc 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. # Copyright (c) 2009-2012, 2014-2015, 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 met:
  5. # * Redistributions of source code must retain the above copyright
  6. # notice, this list of conditions and the following disclaimer.
  7. # * Redistributions in binary form must reproduce the above copyright
  8. # notice, this list of conditions and the following disclaimer in the
  9. # documentation and/or other materials provided with the distribution.
  10. # * Neither the name of The Linux Foundation nor
  11. # the names of its contributors may be used to endorse or promote
  12. # products derived from this software without specific prior written
  13. # permission.
  14. #
  15. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  16. # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  17. # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  18. # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  19. # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  20. # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  21. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  22. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  23. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  24. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  25. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. #
  27. on fs
  28. wait /dev/block/platform/soc/${ro.boot.bootdevice}
  29. symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
  30. chmod 0660 /dev/qseecom
  31. chown system drmrpc /dev/qseecom
  32. chmod 0664 /dev/ion
  33. chown system system /dev/ion
  34. install_keyring
  35. # Needed to make qseecomd work in recovery
  36. chmod 0777 /dev/qseecom
  37. chmod 0664 /dev/ion
  38. chown system system /dev/ion
  39. # Separate copy needed to use /sbin/linker64 instead of /system/bin/linker64
  40. service sbinqseecomd /sbin/qseecomd
  41. user root
  42. group root
  43. disabled
  44. seclabel u:r:recovery:s0
  45. service prepdecrypt /sbin/prepdecrypt.sh
  46. oneshot
  47. disabled
  48. user root
  49. group root
  50. seclabel u:r:recovery:s0
  51. service hwservicemanager /sbin/hwservicemanager
  52. user root
  53. group root
  54. disabled
  55. onrestart setprop hwservicemanager.ready false
  56. seclabel u:r:recovery:s0
  57. service boot-1-0 /sbin/android.hardware.boot@1.0-service
  58. user root
  59. group root
  60. disabled
  61. seclabel u:r:recovery:s0
  62. service servicemanager /sbin/servicemanager
  63. user root
  64. group root readproc
  65. disabled
  66. seclabel u:r:recovery:s0
  67. service keystore_auth /sbin/keystore_auth
  68. oneshot
  69. user system
  70. group root
  71. disabled
  72. seclabel u:r:recovery:s0
  73. # keystore is started and stopped on demand by TWRP
  74. service keystore /sbin/keystore /tmp/misc/keystore
  75. user root
  76. group root drmrpc readproc
  77. disabled
  78. seclabel u:r:recovery:s0
  79. service gatekeeper-1-0 /sbin/android.hardware.gatekeeper@1.0-service-qti
  80. user root
  81. group root
  82. disabled
  83. seclabel u:r:recovery:s0
  84. service keymaster-3-0 /sbin/android.hardware.keymaster@3.0-service-qti
  85. user root
  86. group root
  87. disabled
  88. seclabel u:r:recovery:s0
  89. on boot
  90. setprop sys.usb.config none
  91. setprop sys.usb.config adb
  92. on init
  93. start hwservicemanager
  94. start boot-1-0
  95. start prepdecrypt
  96. on property:crypto.ready=0
  97. stop sbinqseecomd
  98. stop keymaster-3-0
  99. stop gatekeeper-1-0
  100. stop servicemanager
  101. on property:crypto.ready=1
  102. start sbinqseecomd
  103. start keymaster-3-0
  104. start gatekeeper-1-0
  105. start servicemanager