Adding ld.config.txt support
[GitHub/moto-9609/twrp_device_motorola_troika.git] / recovery / root / init.recovery.qcom.rc
CommitLineData
d52e70d1
SJ
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
d6bc9531 28on fs
db1518aa 29 wait /dev/block/platform/soc/${ro.boot.bootdevice}
30 symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
ba068305 31 symlink /dev/block/bootdevice/by-name/oem_stanvbk /dev/block/bootdevice/by-name/oem_stanvbk_a
32 symlink /dev/block/bootdevice/by-name/oem_stanvbk /dev/block/bootdevice/by-name/oem_stanvbk_b
4a52dd6b
SS
33 chmod 0660 /dev/qseecom
34 chown system drmrpc /dev/qseecom
35 chmod 0664 /dev/ion
36 chown system system /dev/ion
d52e70d1 37 install_keyring
c5729108 38
db1518aa 39# Separate copy needed to use /sbin/linker64 instead of /system/bin/linker64
40service sbinqseecomd /sbin/qseecomd
c5729108 41 user root
42 group root
43 disabled
44 seclabel u:r:recovery:s0
45
8dde1ce7 46service prepdecrypt /sbin/prepdecrypt.sh
47 oneshot
48 disabled
49 user root
50 group root
51 seclabel u:r:recovery:s0
52
db1518aa 53service hwservicemanager /sbin/hwservicemanager
c5729108 54 user root
55 group root
d8bcc3d9 56 disabled
db1518aa 57 onrestart setprop hwservicemanager.ready false
c5729108 58 seclabel u:r:recovery:s0
59
db1518aa 60service boot-1-0 /sbin/android.hardware.boot@1.0-service
d8bcc3d9
SS
61 user root
62 group root
c5729108 63 disabled
d8bcc3d9
SS
64 seclabel u:r:recovery:s0
65
c5729108 66service servicemanager /sbin/servicemanager
67 user root
68 group root readproc
69 disabled
70 seclabel u:r:recovery:s0
71
72service keystore_auth /sbin/keystore_auth
73 oneshot
74 user system
75 group root
76 disabled
77 seclabel u:r:recovery:s0
78
db1518aa 79# keystore is started and stopped on demand by TWRP
80service keystore /sbin/keystore /tmp/misc/keystore
c5729108 81 user root
82 group root drmrpc readproc
83 disabled
84 seclabel u:r:recovery:s0
c5ff77ee 85
db1518aa 86service gatekeeper-1-0 /sbin/android.hardware.gatekeeper@1.0-service-qti
c5729108 87 user root
88 group root
89 disabled
90 seclabel u:r:recovery:s0
91
406f7506
XL
92service keymaster-4-0 /sbin/android.hardware.keymaster@4.0-service-qti
93 user root
94 group root
95 disabled
96 seclabel u:r:recovery:s0
97
98service logd /sbin/logd
99 user root
100 group root
101 disabled
102 seclabel u:r:recovery:s0
103
104service time_daemon /sbin/time_daemon
c5729108 105 user root
106 group root
107 disabled
108 seclabel u:r:recovery:s0
109
488f76c2 110# This helps fix ld.config.txt errors from the linker on Android 8.1+
111service ldconfigtxt /sbin/touch /sbin/ld.config.txt
112 oneshot
113 seclabel u:r:recovery:s0
114
c5729108 115on boot
488f76c2 116 export LD_CONFIG_FILE /sbin/ld.config.txt
8dde1ce7 117 setprop sys.usb.config adb
db1518aa 118 write /proc/touchpanel/gesture_enable 1
119 write /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/power_supply/usb/otg_switch 1
120
121on init
406f7506 122 start logd
db1518aa 123 start hwservicemanager
124 start boot-1-0
8dde1ce7 125 start prepdecrypt
406f7506 126 start time_daemon
3bc4b259 127 setprop crypto.ready 1
c5729108 128
129on property:crypto.ready=0
130 stop sbinqseecomd
406f7506 131 stop keymaster-4-0
c5729108 132 stop gatekeeper-1-0
c5729108 133 stop servicemanager
134
135on property:crypto.ready=1
136 start sbinqseecomd
137
406f7506
XL
138on property:vendor.sys.listeners.registered=true
139 start keymaster-4-0
c5729108 140 start gatekeeper-1-0
141 start servicemanager
406f7506
XL
142 restart time_daemon
143
144on property:sys.usb.config=mtp,adb
145 restart time_daemon