-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.target.rc
348 lines (298 loc) · 13.3 KB
/
init.target.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# Copyright (c) 2012, 2014, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
on early-init
mkdir /firmware 0771 system system
mkdir /firmware-mdm 0771 system system
symlink /data/tombstones /tombstones
on fs
mount_all fstab.qcom
setprop ro.crypto.fuse_sdcard true
setprop ro.product.name jflte
chown system radio /efs
chmod 0771 /efs
restorecon_recursive /efs
chown system radio /dev/block/platform/msm_sdcc.1/by-name
chmod 0775 /dev/block/platform/msm_sdcc.1/by-name
on boot
write /sys/devices/i2c-3/3-0024/cyttsp_update_fw 1
write /sys/devices/i2c-3/3-005b/update_fw 1
start qcamerasvr
# Start BSOD Killer
start bsod_killer
# Start LEDify
start ledify
on post-fs-data
mkdir /data/tombstones 0771 system system
mkdir /data/qcks 0771 system system
mkdir /tombstones/modem 0771 system system
mkdir /tombstones/lpass 0771 system system
mkdir /tombstones/wcnss 0771 system system
mkdir /tombstones/dsps 0771 system system
mkdir /tombstones/mdm 0771 system system
mkdir /tombstones/mdm2 0771 system system
#sensors
write /sys/class/input/input5/distortion "400 50 15"
write /sys/class/input/input6/distortion "400 50 15"
write /sys/class/input/input7/distortion "400 50 15"
# MDNIE
chown system system /sys/class/mdnie/mdnie/lcdtype
chown system system /sys/class/mdnie/mdnie/lcd_power
chown system media_rw /sys/class/mdnie/mdnie/scenario
chown system system /sys/class/mdnie/mdnie/tuning
chown system media_rw /sys/class/mdnie/mdnie/outdoor
chown system system /sys/class/mdnie/mdnie/mdnie_temp
chown system media_rw /sys/class/mdnie/mdnie/mode
chown system system /sys/class/mdnie/mdnie/negative
chown system media_rw /sys/class/mdnie/mdnie/playspeed
chown system system /sys/class/lcd/panel/window_type
chown radio system /sys/class/lcd/panel/power_reduce
chown system media_rw /sys/class/mdnie/mdnie/accessibility
chown system system /sys/class/mdnie/mdnie/cabc
chown radio system /sys/class/lcd/panel/siop_enable
chown radio system /sys/class/lcd/panel/temperature
# Adjust YUV to RGB Conversion
chown system media_rw /sys/class/graphics/fb0/csc_cfg
chmod 0660 /sys/class/graphics/fb0/csc_cfg
# Dynamic FPS
chown radio system /sys/class/lcd/panel/fps_change
chmod 0664 /sys/class/lcd/panel/fps_change
# Auto Brightness
chown system system /sys/class/backlight/panel/auto_brightness
chmod 0660 /sys/class/backlight/panel/auto_brightness
# Permission for Touchscreen, Touchkey.
chown radio system /sys/class/sec/sec_touchkey/touch_sensitivity
chown radio system /sys/class/sec/sec_touchkey/touchkey_firm_update
chown system radio /sys/class/sec/tsp/cmd
chown system radio /sys/class/sec/sec_touchkey/glove_mode
chown system radio /sys/class/sec/sec_touchkey/flip_mode
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/module/sco/parameters/disable_esco
chown system system /sys/kernel/ipv4/tcp_wmem_min
chown system system /sys/kernel/ipv4/tcp_wmem_def
chown system system /sys/kernel/ipv4/tcp_wmem_max
chown system system /sys/kernel/ipv4/tcp_rmem_min
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
# Set these so we can remotely update SELinux policy
chown system system /sys/fs/selinux/load
chown system system /sys/fs/selinux/enforce
# Permissions for Led
chown system system /sys/class/sec/led/led_r
chown system system /sys/class/sec/led/led_g
chown system system /sys/class/sec/led/led_b
chown system system /sys/class/sec/led/led_pattern
chown system system /sys/class/sec/led/led_blink
chown system system /sys/class/sec/led/led_lowpower
# <Sensors & NFC>
# Accelerometer_sensor
chown system radio /sys/class/sensors/accelerometer_sensor/raw_data
chown system radio /sys/class/sensors/accelerometer_sensor/calibration
chown system radio /sys/class/sensors/accelerometer_sensor/reactive_alert
chown system radio /sys/class/sensors/accelerometer_sensor/vendor
chown system radio /sys/class/sensors/accelerometer_sensor/name
# Proximity_sensor
chown system radio /sys/class/sensors/proximity_sensor/state
chown system radio /sys/class/sensors/proximity_sensor/raw_data
chown system radio /sys/class/sensors/proximity_sensor/prox_avg
chown system radio /sys/class/sensors/proximity_sensor/prox_cal
chown system radio /sys/class/sensors/proximity_sensor/vendor
chown system radio /sys/class/sensors/proximity_sensor/name
chown system radio /sys/class/sensors/proximity_sensor/thresh_high
chown system radio /sys/class/sensors/proximity_sensor/thresh_low
chown system radio /sys/class/sensors/proximity_sensor/barcode_emul_en
chown system radio /sys/class/sensors/proximity_sensor/enable
# Light_sensor
chown system radio /sys/class/sensors/light_sensor/lux
chown system radio /sys/class/sensors/light_sensor/raw_data
chown system radio /sys/class/sensors/light_sensor/vendor
chown system radio /sys/class/sensors/light_sensor/name
chown system radio /sys/class/sensors/light_sensor/enable
# Gyro_sensor
chown system radio /sys/class/sensors/gyro_sensor/power_on
chown system radio /sys/class/sensors/gyro_sensor/power_off
chown system radio /sys/class/sensors/gyro_sensor/temperature
chown system radio /sys/class/sensors/gyro_sensor/selftest
chown system radio /sys/class/sensors/gyro_sensor/selftest_dps
chown system radio /sys/class/sensors/gyro_sensor/vendor
chown system radio /sys/class/sensors/gyro_sensor/name
# Barometer_sensor
chown system radio /sys/class/sensors/barometer_sensor/sea_level_pressure
chown system radio /sys/class/sensors/barometer_sensor/vendor
chown system radio /sys/class/sensors/barometer_sensor/name
chown system radio /sys/class/sensors/barometer_sensor/calibration
chown system radio /sys/class/sensors/barometer_sensor/eeprom_check
# Magnetic_sensor
# chown system radio /dev/akm8963
chown system radio /sys/class/sensors/magnetic_sensor/raw_data
chown system radio /sys/class/sensors/magnetic_sensor/vendor
chown system radio /sys/class/sensors/magnetic_sensor/name
# uv_sensor
chown system radio /sys/class/sensors/uv_sensor/vendor
chown system radio /sys/class/sensors/uv_sensor/name
chown system radio /sys/class/sensors/uv_sensor/raw_data
chown system radio /sys/class/sensors/uv_sensor/power_on
chown system radio /sys/class/sensors/uv_sensor/power_off
# Temphumidity_sensor
chown system radio /sys/class/sensors/temphumidity_sensor/vendor
chown system radio /sys/class/sensors/temphumidity_sensor/name
chown system radio /sys/class/sensors/temphumidity_sensor/engine_ver
chown system radio /sys/class/sensors/temphumidity_sensor/engine_ver2
chown system radio /sys/class/sensors/temphumidity_sensor/cp_thm
chown system radio /sys/class/sensors/temphumidity_sensor/send_accuracy
# SensorHub
chown system radio /sys/class/sensors/ssp_sensor/enable
chown system radio /sys/class/sensors/ssp_sensor/enable_irq
chown system radio /sys/class/sensors/ssp_sensor/mcu_rev
chown system radio /sys/class/sensors/ssp_sensor/mcu_name
chown system radio /sys/class/sensors/ssp_sensor/mcu_test
chown system radio /sys/class/sensors/ssp_sensor/mcu_reset
chown system radio /sys/class/sensors/ssp_sensor/mcu_update
chown system radio /sys/class/sensors/ssp_sensor/mcu_sleep_test
chown system radio /sys/class/sensors/ssp_sensor/ori_poll_delay
chown system radio /sys/class/sensors/ssp_sensor/mag_poll_delay
chown system radio /sys/class/sensors/ssp_sensor/temp_humi_poll_delay
# Gesture_sensor
chown system radio /sys/class/sensors/gesture_sensor/ir_current
chown system radio /sys/class/sensors/gesture_sensor/selftest
# IrLed
chmod 0660 /dev/ice4_dev
chown system system /dev/ice4_dev
# Vibrator
chown system system /sys/class/timed_output/vibrator/pwm_default
chmod 0660 /sys/class/timed_output/vibrator/pwm_default
chown system system /sys/class/timed_output/vibrator/pwm_max
chmod 0660 /sys/class/timed_output/vibrator/pwm_max
chown system system /sys/class/timed_output/vibrator/pwm_min
chmod 0660 /sys/class/timed_output/vibrator/pwm_min
chown system system /sys/class/timed_output/vibrator/pwm_threshold
chmod 0660 /sys/class/timed_output/vibrator/pwm_threshold
chown system system /sys/class/timed_output/vibrator/pwm_value
chmod 0660 /sys/class/timed_output/vibrator/pwm_value
# NFC_NXP
chmod 0600 /dev/pn544
chown nfc nfc /dev/pn544
# NFC_BROADCOM
chmod 0600 /dev/bcm2079x
chown nfc nfc /dev/bcm2079x
mkdir /data/nfc
mkdir /data/nfc/param
chmod 0700 /data/nfc
chmod 0700 /data/nfc/param
chown nfc nfc /data/nfc
chown nfc nfc /data/nfc/param
# Permissions for Barcode Emul
chown system radio /sys/class/sec/sec_barcode_emul/barcode_send
chown system radio /sys/class/sec/sec_barcode_emul/barcode_ver_check
chown system radio /sys/class/sec/sec_barcode_emul/barcode_led_status
# IR_LED
chown system radio /sys/class/sec/sec_ir/ir_send
chown system radio /sys/class/sec/sec_ir/ir_send_result
# Permission for fast dormacy for RIL
chown system radio /sys/devices/virtual/sec/bamdmux/waketime
# HDCP 2.x
mkdir /data/system/hdcp2 0775 system system
# h2k permission
chown radio system /efs/redata.bin
chmod 0644 /efs/h2k.dat
chown radio radio /efs/h2k.dat
mkdir /data/misc/radio/hatp 0775 radio system
# Panel color temperature
chmod 0660 /sys/class/lcd/panel/panel_colors
chown system system /sys/class/lcd/panel/panel_colors
#start camera server as daemon
service qcamerasvr /system/bin/mm-qcamera-daemon
class late_start
user camera
group camera system inet input graphics net_bt_stack
service thermal-engine /system/bin/thermal-engine
class main
user root
group root
service mpdecision /system/bin/mpdecision --avg_comp
class main
user root
group system
disabled
service kickstart /system/bin/qcks -i /firmware-mdm/image/
user root
group radio cache inet misc audio sdcard_rw log system
oneshot
disabled
service mdm_helper /system/bin/mdm_helper
class main
onrestart setprop ro.service.mdm_helper_restarted "true"
disabled
service qseecomd /system/bin/qseecomd
class late_start
user system
group system
# Start kickstart if mdm is detected
on property:ro.baseband=mdm
start kickstart
# Start up mdm_helper if sglte detected
on property:ro.baseband=sglte
mkdir /data/misc/mdmhelperdata 0700
start mdm_helper
service time_daemon /system/bin/time_daemon
class late_start
user root
group root
# BSOD Killer
service bsod_killer /system/bin/bsod_killer
user root
group shell
disabled
oneshot
# LEDify
service ledify /system/bin/ledify
user root
group shell
disabled
oneshot
# insthk
service insthk /system/bin/insthk
class main
user root
disabled
oneshot
seclabel u:r:insthk_exec:s0
on property:sys.qseecomd.enable=true
start insthk