-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinit.recovery.device.rc
185 lines (159 loc) · 5.88 KB
/
init.recovery.device.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
on boot
setprop sys.usb.config adb
write /proc/touchpanel/gesture_enable 1
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
on fs
wait /dev/block/platform/soc/${ro.boot.bootdevice}
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
symlink /dev/block/bootdevice/by-name/oem_stanvbk /dev/block/bootdevice/by-name/oem_stanvbk_a
symlink /dev/block/bootdevice/by-name/oem_stanvbk /dev/block/bootdevice/by-name/oem_stanvbk_b
chmod 0660 /dev/qseecom
chown system drmrpc /dev/qseecom
chmod 0664 /dev/ion
chown system system /dev/ion
install_keyring
on init
setprop sys.usb.configfs 1
# Don't lose recovery logs- keep warm reset for coming out of recovery.
write /sys/module/msm_poweroff/parameters/warm_reset 1
# Enable thermal mitigation
write /sys/devices/virtual/thermal/tz-by-name/backup-charge/mode enabled
start touchdriver
on property:crypto.ready=0
stop qseecomd
stop keymaster-4-0
stop gatekeeper-1-0
stop servicemanager
on property:sys.usb.config=mtp,adb
restart time_daemon
service touchdriver /system/bin/touchdriver.sh
oneshot
disabled
user root
group root
seclabel u:r:recovery:s0
on property:twrp.apex.loaded=true
export LD_LIBRARY_PATH /system/lib64:/vendor/lib64:/apex/com.android.runtime.release.apex/lib64:/apex/com.google.android.media.swcodec.apex/lib64:/apex/com.android.media.swcodec.apex/lib64
start prepdecrypt
on property:sys.usb.config=fastboot
start servicemanager
start hwservicemanager
restart fastbootd
on property:prep.decrypt=1
start qseecomd
start boot-1-0
start time_daemon
start vendor.citadeld
start vendor.weaver_hal
start vendor.authsecret
start vendor.oemlock
start gatekeeper-1-0
start vendor.keymaster-4-0-citadel
start keymaster-4-0
restart time_daemon
#start vibrator-service
# Separate copy needed to use /sbin/linker64 instead of /system/bin/linker64
service qseecomd /system/bin/qseecomd
user root
group root
disabled
seclabel u:r:recovery:s0
service prepdecrypt /system/bin/prepdecrypt.sh
oneshot
disabled
user root
group root
seclabel u:r:recovery:s0
service keystore_auth /system/bin/keystore_auth
oneshot
user system
group root
disabled
seclabel u:r:recovery:s0
# keystore is started and stopped on demand by TWRP
service keystore /system/bin/keystore /tmp/misc/keystore
user root
group root drmrpc readproc
disabled
seclabel u:r:recovery:s0
service gatekeeper-1-0 /system/bin/[email protected]
user root
group root
disabled
seclabel u:r:recovery:s0
service keymaster-4-0 /system/bin/[email protected]
user root
group root
disabled
seclabel u:r:recovery:s0
service time_daemon /system/bin/time_daemon
user root
group root
disabled
seclabel u:r:recovery:s0
service vendor.weaver_hal /system/bin/[email protected]
disabled
user root
group root
seclabel u:r:recovery:s0
service vendor.authsecret /system/bin/[email protected]
disabled
user root
group root
seclabel u:r:recovery:s0
service vendor.oemlock /system/bin/[email protected]
disabled
user root
group root
seclabel u:r:recovery:s0
service vendor.keymaster-4-0-citadel /system/bin/[email protected]
disabled
user root
group root
seclabel u:r:recovery:s0
service vendor.citadeld /system/bin/citadeld
disabled
user root
group root
seclabel u:r:recovery:s0
service vibrator-service /system/bin/[email protected]
class hal
user root
group root
setenv CALIBRATION_FILEPATH /mnt/vendor/persist/haptics/cs40l25a.cal
setenv F0_FILEPATH /sys/class/leds/vibrator/device/f0_stored
setenv REDC_FILEPATH /sys/class/leds/vibrator/device/redc_stored
setenv Q_FILEPATH /sys/class/leds/vibrator/device/q_stored
setenv ACTIVATE_PATH /sys/class/leds/vibrator/activate
setenv DURATION_PATH /sys/class/leds/vibrator/duration
setenv STATE_PATH /sys/class/leds/vibrator/state
setenv EFFECT_DURATION_PATH /sys/class/leds/vibrator/device/cp_trigger_duration
setenv EFFECT_INDEX_PATH /sys/class/leds/vibrator/device/cp_trigger_index
setenv EFFECT_QUEUE_PATH /sys/class/leds/vibrator/device/cp_trigger_queue
setenv EFFECT_SCALE_PATH /sys/class/leds/vibrator/device/cp_dig_scale
setenv GLOBAL_SCALE_PATH /sys/class/leds/vibrator/device/dig_scale
setenv ASP_ENABLE_PATH /sys/class/leds/vibrator/device/asp_enable
setenv GPIO_FALL_INDEX /sys/class/leds/vibrator/device/gpio1_fall_index
setenv GPIO_FALL_SCALE /sys/class/leds/vibrator/device/gpio1_fall_dig_scale
setenv GPIO_RISE_INDEX /sys/class/leds/vibrator/device/gpio1_rise_index
setenv GPIO_RISE_SCALE /sys/class/leds/vibrator/device/gpio1_rise_dig_scale
setenv HWAPI_DEBUG_PATHS "
/sys/class/leds/vibrator/device/asp_enable
/sys/class/leds/vibrator/device/f0_stored
/sys/class/leds/vibrator/device/fw_rev
/sys/class/leds/vibrator/device/gpio1_fall_dig_scale
/sys/class/leds/vibrator/device/gpio1_fall_index
/sys/class/leds/vibrator/device/gpio1_rise_dig_scale
/sys/class/leds/vibrator/device/gpio1_rise_index
/sys/class/leds/vibrator/device/heartbeat
/sys/class/leds/vibrator/device/num_waves
/sys/class/leds/vibrator/device/q_stored
/sys/class/leds/vibrator/device/redc_stored
/sys/class/leds/vibrator/state
"
disabled
seclabel u:r:recovery:s0
# Weaver services have to be stopped in order to wipe Titan M during a format data
on property:weaver.stop=1
stop vendor.citadeld
stop vendor.weaver_hal