aboutsummaryrefslogtreecommitdiffstats
path: root/rootdir/init.target.rc
blob: 6eeeada446c0012c3d93733e4ae63ab6115d2f6a (plain)
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
############################
on init
############################

    export LD_SHIM_LIBS /system/lib/libsec-ril.so|libsamsung_symbols.so

    mkdir /vendor/etc/ 0771 system system

    # Vibetonz
    export VIBE_PIPE_PATH /dev/pipes
    mkdir /dev/pipes 0771 shell shell

############################
on post-fs-data
############################

# GPS
    chown root system /dev/ttySAC1
    chmod 0660 /dev/ttySAC1
    chown root system /sys/class/sec/gps/GPS_PWR_EN/value
    chmod 0664 /sys/class/sec/gps/GPS_PWR_EN/value
    mkdir /data/system 0771 system system
    chown system system /data/system
    mkdir /data/system/gps 0771 system system
    chown system system /data/system/gps
    mkdir /vendor/etc 0771 system system
    chown system system /vendor/etc
    rm /data/system/gps/gps_started
    rm /data/system/gps/glonass_started
    rm /data/system/gps/beidou_started
    rm /data/system/gps/smd_started
    rm /data/system/gps/sv_cno.info

# bluetooth
    write /efs/bluetooth/bt_addr 0

# Waketime fot fast dormancy
    chown system radio /sys/devices/platform/mdm_hsic_pm0/waketime
    chmod 0660 /sys/devices/platform/mdm_hsic_pm0/waketime

# audio
    mkdir /data/local/audio 0775 media audio
    chown media audio /data/local/audio

# Camera
    chown radio system /sys/devices/platform/samsung-pd.5/s3c-fimc.2/range_mode
    chmod 0660 /sys/devices/platform/samsung-pd.5/s3c-fimc.2/range_mode

# KeyDisabler
    chown system system /sys/class/sec/sec_touchkey/keypad_enable

# Permissions for mDNIe
    chown system media_rw /sys/class/mdnie/mdnie/mode
    chown system media_rw /sys/class/mdnie/mdnie/outdoor
    chown system media_rw /sys/class/mdnie/mdnie/scenario
    chown system system /sys/class/mdnie/mdnie/negative
    chown system system /sys/class/mdnie/mdnie/ebook
    chown system system /sys/class/mdnie/mdnie/accessibility
    chown system media_rw /sys/class/mdnie/mdnie/cabc
    write /sys/class/mdnie/mdnie/scenario 0
    write /sys/class/mdnie/mdnie/mode 0

# Permissions for Touchkey
    chown system radio /sys/class/sec/sec_touchkey/touchkey_dummy_btn1
    chown system radio /sys/class/sec/sec_touchkey/touchkey_dummy_btn3
    chown system radio /sys/class/sec/sec_touchkey/touchkey_dummy_btn5
    chown system radio /sys/class/sec/sec_touchkey/extra_button_event
    chown system radio /sys/class/sec/sec_touchkey/touchkey_button_all
    chown system radio /sys/class/sec/sec_touchkey/touchkey_threshold
    chmod 0660 /sys/class/sec/sec_touchkey/extra_button_event

# Permissions for Hall IC
    chown system radio /sys/class/sec/sec_key/hall_detect

# Battery node
    chown system radio /sys/class/power_supply/battery/batt_error_test
    chown system radio /sys/class/power_supply/battery/batt_slate_mode
    chown system radio /sys/class/power_supply/battery/batt_temp_adc_cal
    chown system radio /sys/class/power_supply/battery/batt_vf_adc
    chown system radio /sys/class/power_supply/battery/batt_vol_adc
    chown system radio /sys/class/power_supply/battery/batt_vol_adc_aver
    chown system radio /sys/class/power_supply/battery/batt_vol_adc_cal
    chown system radio /sys/class/power_supply/battery/batt_vol_aver
    chown system radio /sys/class/power_supply/battery/factory_mode
    chown system radio /sys/class/power_supply/battery/siop_activated
    chown system radio /sys/class/power_supply/battery/siop_level
    chown system radio /sys/class/power_supply/battery/update

# CTIA event
    chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/call
    chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/video
    chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/music
    chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/browser
    chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/hotspot
    chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/camera
    chown system radio /sys/class/power_supply/battery/talk_wcdma
    chown system radio /sys/class/power_supply/battery/talk_gsm
    chown system radio /sys/class/power_supply/battery/call
    chown system radio /sys/class/power_supply/battery/data_call
    chown gps radio /sys/class/power_supply/battery/gps
    chown system radio /sys/class/power_supply/battery/wifi
    chown system radio /sys/class/power_supply/battery/lte

# Permissions for gpio_keys
    chown radio system /sys/class/sec/sec_key/wakeup_keys
    write /sys/class/sec/sec_key/wakeup_keys 116,172,544

# IPC sysfs
    chown system system /sys/devices/virtual/misc/multipdp/waketime

# Input Events
    chown system input /sys/class/input/input2/delay
    chown system input /sys/class/input/input3/delay
    chown system input /sys/class/input/input4/delay
    chown system input /sys/class/input/input5/delay
    chown system input /sys/class/input/input6/delay
    chown system input /sys/class/input/input6/delay
    chown system input /sys/class/input/input7/delay
    chown system input /sys/class/input/input8/delay
    chown system input /sys/class/input/input9/delay

# Magnetic_sensor
    chmod 0777 /dev/i2c-10
    chown compass input /sys/class/input/input6/offsets
    chown compass input /sys/class/input/input6/dynamic_matrix
    chown system input /sys/class/input/input6/threshold
    chown system input /sys/class/input/input6/distortion
    chown system input /sys/class/input/input6/shape
    write /sys/class/input/input6/distortion "350 50 15"
    write /sys/class/input/input6/static_matrix "10602 -980 25 -830 10470 -188 2753 1005 9019"
    write /sys/class/input/input6/ellipsoid_mode "1"

    chown system input /sys/class/input/input6/filter_enable
    chown system input /sys/class/input/input6/filter_len
    chown system input /sys/class/input/input6/data
    chown system input /sys/class/input/input6/status
    chown system input /sys/class/input/input6/wake
    chown system input /sys/class/input/input6/position

# Magnetic_sensor
    chown compass input /sys/class/input/input5/offsets
    chown compass input /sys/class/input/input5/dynamic_matrix
    chown system input /sys/class/input/input5/threshold
    chown system input /sys/class/input/input5/distortion
    chown system input /sys/class/input/input5/shape
    write /sys/class/input/input5/distortion "350 50 15"
    write /sys/class/input/input5/static_matrix "10602 -980 25 -830 10470 -188 2753 1005 9019"
    write /sys/class/input/input5/ellipsoid_mode "1"

    chown system input /sys/class/input/input5/filter_enable
    chown system input /sys/class/input/input5/filter_len
    chown system input /sys/class/input/input5/data
    chown system input /sys/class/input/input5/status
    chown system input /sys/class/input/input5/wake
    chown system input /sys/class/input/input5/position

# Vibetonz
    chmod 0660 /dev/tspdrv
    chown root shell /dev/tspdrv

# IR_LED
    chown system system /sys/class/sec/sec_ir/ir_send
    chown system system /sys/class/sec/sec_ir/ir_send_result

# for wifi
    mkdir /data/misc/wifi/sockets 0770 wifi wifi

    restorecon /data/system/yas.cfg
    restorecon /data/system/yas-backup.cfg
    restorecon_recursive /data/system/gps
    restorecon_recursive /efs

############################
on boot
############################

# epen
    chown system system /sys/class/sec/sec_epen/epen_saving_mode
    chmod 660 /sys/class/sec/sec_epen/epen_saving_mode

on property:init.svc.macloader=stopped
    chown system root /data/.cid.info
    chmod 0664 /data/.cid.info
    chown system root /data/.rev
    chmod 0660 /data/.rev

# SISO-ANDR_PERF :: START Changing scheduler to cfq and reseting cpu min freq to -1 after boot complete
on property:sys.boot_completed=1
    write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor pegasusq
    write /sys/block/mmcblk0/queue/scheduler cfq
    write /sys/power/cpufreq_min_limit -1
# SISO-ANDR_PERF :: END

    chown radio system /sys/devices/system/cpu/cpufreq/pegasusq/cpucore_table
    chown radio system /sys/devices/system/cpu/cpufreq/pegasusq/max_cpu_lock
    chown radio system /sys/devices/system/cpu/cpufreq/pegasusq/min_cpu_lock
    chown radio system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_lock
    chmod 0660 /sys/devices/system/cpu/cpufreq/pegasusq/cpucore_table
    chmod 0660 /sys/devices/system/cpu/cpufreq/pegasusq/max_cpu_lock
    chmod 0660 /sys/devices/system/cpu/cpufreq/pegasusq/min_cpu_lock
    chmod 0660 /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_lock

    # To prevent out of order acknowledgements from making
    # connection tracking to treat them as not belonging to
    # the connection they belong to.
    # Otherwise, a weird issue happens in which some long
    # connections on high-throughput links get dropped when
    # an ack packet comes out of order
    write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1

############################
############################

service cpboot-daemon /system/bin/cbd -d -t xmm6262 -p 7
    class main
    user root
    group radio cache inet misc audio sdcard_rw log sdcard_r
    seclabel u:r:cpboot-daemon:s0

service gpsd /system/bin/gpsd -c /system/etc/gps.xml
    class main
    user gps
    group system inet net_raw
    ioprio be 0
    seclabel u:r:gpsd:s0

service orientationd /system/bin/orientationd
    class main
    user compass
    group input
    seclabel u:r:orientationd:s0

service geomagneticd /system/bin/geomagneticd
    class main
    user compass
    group system input
    seclabel u:r:geomagneticd:s0