Commit | Line | Data |
---|---|---|
d05bb22f S |
1 | |
2 | #connectivity related init script | |
3 | #import init.project.rc | |
4 | #import init.connectivity.rc | |
5 | import init.charging.rc | |
6 | #import init.mt8127usb.rc | |
7 | #import init.aee.rc | |
8 | #import init.ssd.rc | |
9 | #import init.no_ssd.rc | |
10 | #import init.ssd_nomuser.rc | |
11 | ||
12 | on init | |
13 | export USBOTG_STORAGE /storage/usbotg | |
14 | mount tmpfs tmpfs /mnt/media_rw/ mode=0755,uid=1000,gid=1000 | |
15 | mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw | |
16 | mkdir /storage/usbotg 0700 root root | |
17 | mount tmpfs tmpfs /storage/usbotg mode=0755,uid=1000,gid=1000 | |
18 | ||
19 | # Backward compatibility | |
20 | symlink /system/etc /etc | |
21 | symlink /sys/kernel/debug /d | |
22 | ||
23 | # Right now vendor lives on the same filesystem as system, | |
24 | # but someday that may change. | |
25 | symlink /system/vendor /vendor | |
26 | ||
27 | # Create cgroup mount point for cpu accounting | |
28 | mkdir /acct | |
29 | mount cgroup none /acct cpuacct | |
30 | mkdir /acct/uid | |
31 | ||
32 | ||
33 | mkdir /system | |
34 | mkdir /data 0771 system system | |
35 | mkdir /cache 0770 system cache | |
36 | mkdir /config 0500 root root | |
37 | ||
38 | mkdir /mnt/cd-rom 0000 system system | |
39 | ||
40 | # Directory for putting things only root should see. | |
41 | mkdir /mnt/secure 0700 root root | |
42 | # Create private mountpoint so we can MS_MOVE from staging | |
43 | mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0 | |
44 | ||
45 | # Directory for staging bindmounts | |
46 | mkdir /mnt/secure/staging 0700 root root | |
47 | ||
48 | # Directory-target for where the secure container | |
49 | # imagefile directory will be bind-mounted | |
50 | mkdir /mnt/secure/asec 0700 root root | |
51 | ||
52 | # Secure container public mount points. | |
53 | mkdir /mnt/asec 0700 root system | |
54 | mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000 | |
55 | ||
56 | # Filesystem image public mount points. | |
57 | mkdir /mnt/obb 0700 root system | |
58 | mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000 | |
59 | ||
60 | write /proc/sys/kernel/panic_on_oops 1 | |
61 | write /proc/sys/kernel/hung_task_timeout_secs 0 | |
62 | write /proc/cpu/alignment 4 | |
63 | write /proc/sys/kernel/sched_latency_ns 10000000 | |
64 | write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000 | |
65 | write /proc/sys/kernel/sched_compat_yield 1 | |
66 | write /proc/sys/kernel/sched_child_runs_first 0 | |
67 | write /proc/sys/kernel/randomize_va_space 2 | |
68 | write /proc/sys/kernel/kptr_restrict 2 | |
69 | write /proc/sys/kernel/dmesg_restrict 1 | |
70 | write /proc/sys/vm/mmap_min_addr 32768 | |
71 | write /proc/sys/net/ipv4/ping_group_range "0 2147483647" | |
72 | write /proc/sys/kernel/sched_rt_runtime_us 950000 | |
73 | write /proc/sys/kernel/sched_rt_period_us 1000000 | |
74 | ||
75 | ||
76 | # Allow everybody to read the xt_qtaguid resource tracking misc dev. | |
77 | # This is needed by any process that uses socket tagging. | |
78 | chmod 0644 /dev/xt_qtaguid | |
79 | ||
80 | #HWComposer fb0 | |
81 | chmod 0666 /dev/graphics/fb0 | |
82 | chown system graphics /dev/graphics/fb0 | |
83 | ||
84 | #HWComposer Vsync | |
85 | chmod 0666 /dev/mtkfb_vsync | |
86 | chown system graphics /dev/mtkfb_vsync | |
87 | ||
88 | ||
89 | #HWComposer fence | |
90 | chmod 0666 /dev/sw_sync | |
91 | chown system graphics /dev/sw_sync | |
92 | ||
93 | # Change ION driver permission | |
94 | chmod 0666 /dev/ion | |
95 | ||
96 | # Change BWC permission | |
97 | chmod 0664 /sys/bus/platform/drivers/mem_bw_ctrl/concurrency_scenario | |
98 | chown system media /sys/bus/platform/drivers/mem_bw_ctrl/concurrency_scenario | |
99 | ||
100 | # Change M4U driver permission | |
101 | # chmod 0444 /dev/M4U_device | |
102 | ||
103 | # Change SMI driver permission | |
104 | chmod 0660 /dev/MTK_SMI | |
105 | chown system media /dev/MTK_SMI | |
106 | ||
107 | #Use uinput's default permission | |
108 | chown system net_bt_admin /dev/uinput | |
109 | ||
110 | # Change SMI mtk_sched permission | |
111 | chmod 0660 /dev/mtk_sched | |
112 | chown system media /dev/mtk_sched | |
113 | ||
114 | # Change DISP permission | |
115 | chmod 0666 /dev/mtk_disp | |
116 | chown system system /dev/mtk_disp | |
117 | ||
118 | # Change Camera permission | |
119 | chmod 0660 /dev/camera-sysram | |
120 | chmod 0660 /dev/camera-isp | |
121 | chmod 0660 /dev/camera-pipemgr | |
122 | chmod 0660 /dev/kd_camera_hw | |
123 | chmod 0660 /dev/kd_camera_flashlight | |
124 | chmod 0660 /dev/kd_camera_hw_bus2 | |
125 | chmod 0660 /dev/FM50AF | |
126 | chmod 0660 /dev/CAM_CAL_DRV | |
127 | ||
128 | chown system camera /dev/camera-sysram | |
129 | chown system camera /dev/camera-isp | |
130 | chown system camera /dev/camera-pipemgr | |
131 | chown system camera /dev/kd_camera_hw | |
132 | chown system camera /dev/kd_camera_flashlight | |
133 | chown system camera /dev/kd_camera_hw_bus2 | |
134 | chown system camera /dev/FM50AF | |
135 | chown system camera /dev/CAM_CAL_DRV | |
136 | ||
137 | # Change OVL permission | |
138 | chmod 0440 /dev/mtk_ovl | |
139 | chown system system /dev/mtk_ovl | |
140 | ||
141 | # Change Jpeg permission | |
142 | # chmod 0444 /dev/mtk_jpeg | |
143 | # chmod 0444 /dev/mtk_gdma | |
144 | # chmod 0444 /dev/mtk_gfmt | |
145 | chmod 0440 /dev/mtk_almk | |
146 | ||
147 | # otg_test | |
148 | chown root radio /dev/mt_otg_test | |
149 | chmod 0660 /dev/mt_otg_test | |
150 | ||
151 | # Enable AAL | |
152 | setprop ro.mediatek.aal 1 | |
153 | ||
154 | # mount debugfs for ftrace | |
155 | mount debugfs none /sys/kernel/debug | |
156 | ||
157 | # change owner | |
158 | chown system system /proc/bootprof | |
159 | chown root system /proc/mtprof/cputime | |
160 | chown root system /proc/mtprof/reboot_pid | |
161 | ||
162 | on boot | |
163 | # start sensor services | |
164 | # start akmd8963 | |
165 | ||
166 | # start nvram | |
167 | start NvRAMAgent | |
168 | ||
169 | chown system system /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_base | |
170 | chmod 0660 /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_base | |
171 | ||
172 | on fs | |
173 | ||
174 | # export EXTERNAL_STORAGE /mnt/sdcard | |
175 | # mkdir /mnt/sdcard 0000 system system | |
176 | # symlink /mnt/sdcard /sdcard | |
177 | ||
178 | ||
179 | # mount mtd partitions | |
180 | # Mount /system rw first to give the filesystem a chance to save a checkpoint | |
181 | #write /proc/bootprof "INIT:NAND:Mount_START" | |
182 | #mount yaffs2 mtd@system /system | |
183 | ||
184 | # via: set ril and pppd | |
185 | #chown root /system/bin/pppd | |
186 | #chmod 4755 /system/bin/pppd | |
187 | #chown root /system/etc/ppp/ip-up-cdma | |
188 | #chmod 4755 /system/et/ppp/ip-up-cdma | |
189 | #chown root /system/etc/ppp/ipv6-up-cdma | |
190 | #chmod 4755 /system/etc/ppp/ipv6-up-cdma | |
191 | #chown root /system/etc/ppp/link-down-cdma | |
192 | #chmod 4755 /system/etc/ppp/link-down-cdma | |
193 | #mount yaffs2 mtd@system /system ro remount | |
194 | #mount yaffs2 mtd@userdata /data nosuid nodev | |
195 | #mount yaffs2 mtd@cache /cache nosuid nodev | |
196 | #write /proc/bootprof "INIT:NAND:Mount_END" | |
197 | ||
198 | #on fs_property:ro.mount.fs=EXT4 | |
199 | write /proc/bootprof "INIT:eMMC:Mount_START" | |
200 | mount_all /fstab.mt8127 | |
201 | write /proc/bootprof "INIT:eMMC:Mount_END" | |
202 | mount iso9660 loop@/system/etc/iAmCdRom.iso /mnt/cd-rom ro | |
203 | ||
204 | #change partition permission | |
205 | exec /system/etc/partition_permission.sh | |
206 | ||
207 | # RGX init | |
208 | service pvrsrvctl /system/vendor/bin/pvrsrvctl --start | |
209 | class core | |
210 | user root | |
211 | group root | |
212 | oneshot | |
213 | ||
214 | on post-fs-data | |
215 | mkdir /data/nvram 2770 root system | |
216 | mkdir /data/media 0770 media_rw media_rw | |
217 | chmod 0660 /data/misc/wifi/p2p_supplicant.conf | |
218 | ||
219 | ||
220 | # dhcp server | |
221 | mkdir /data/misc/dhcp 0770 dhcp wifi | |
222 | chown dhcp wifi /data/misc/dhcp | |
223 | ||
224 | # dhcpv6 server | |
225 | mkdir /data/misc/wide-dhcpv6 0770 dhcp wifi | |
226 | chown dhcp wifi /data/misc/wide-dhcpv6 | |
227 | ||
228 | # GPS | |
229 | mkdir /data/gps_mnl 0771 gps system | |
230 | ||
231 | # remove /data/system/wpa_supplicant which was created in meta mode of JB version, | |
232 | # wlan will be not able to enabled if this directory exists in L version. | |
233 | rmdir /data/system/wpa_supplicant | |
234 | ||
235 | # for ppp options file | |
236 | mkdir /data/misc/ppp 0770 bluetooth net_bt | |
237 | # bluetooth | |
238 | mkdir /data/@btmtk 0770 bluetooth net_bt | |
239 | chown bluetooth bluetooth /dev/hid-keyboard | |
240 | chmod 0660 /dev/hid-keyboard | |
241 | ||
242 | # NFC | |
243 | mkdir /data/nfc_socket 0771 nfc radio | |
244 | ||
245 | #VideoCodec | |
246 | insmod /system/lib/modules/vcodec_kernel_driver.ko | |
247 | ||
248 | # JPEG | |
249 | chmod 0440 /dev/mtk_jpeg | |
250 | chown system camera /dev/mtk_jpeg | |
251 | ||
252 | # UIBC | |
253 | chown system media /dev/uibc | |
254 | chmod 0660 /dev/uibc | |
255 | ||
256 | #HDMI | |
257 | chmod 0664 /dev/hdmitx | |
258 | ||
259 | # Sensor | |
260 | chmod 0660 /dev/hwmsensor | |
261 | chmod 0660 /dev/msensor | |
262 | chmod 0660 /dev/gsensor | |
263 | chmod 0660 /dev/als_ps | |
264 | chmod 0660 /dev/gyroscope | |
265 | chmod 0660 /dev/aal_als | |
266 | ||
267 | chmod 0660 /sys/devices/platform/msensor/driver/cpsopmode | |
268 | chmod 0660 /sys/devices/platform/msensor/driver/cpsreptxy | |
269 | chmod 0660 /sys/devices/platform/msensor/driver/cpsreptz | |
270 | chmod 0660 /sys/devices/platform/gsensor/driver/cpsopmode | |
271 | chmod 0660 /sys/devices/platform/gsensor/driver/cpsrange | |
272 | ||
273 | chown system system /dev/hwmsensor | |
274 | chown system system /dev/msensor | |
275 | chown system system /dev/gsensor | |
276 | chown radio system /dev/als_ps | |
277 | chown system system /dev/gyroscope | |
278 | chown system system /dev/aal_als | |
279 | ||
280 | chmod 0660 /sys/class/misc/m_acc_misc/accenablenodata | |
281 | chmod 0660 /sys/class/misc/m_acc_misc/accactive | |
282 | chmod 0660 /sys/class/misc/m_acc_misc/accdelay | |
283 | chmod 0660 /sys/class/misc/m_acc_misc/accbatch | |
284 | chmod 0660 /sys/class/misc/m_acc_misc/accflush | |
285 | chown system system /sys/class/misc/m_acc_misc/accenablenodata | |
286 | chown system system /sys/class/misc/m_acc_misc/accactive | |
287 | chown system system /sys/class/misc/m_acc_misc/accdelay | |
288 | chown system system /sys/class/misc/m_acc_misc/accbatch | |
289 | chown system system /sys/class/misc/m_acc_misc/accflush | |
290 | ||
291 | chmod 0660 /sys/class/misc/m_mag_misc/magactive | |
292 | chmod 0660 /sys/class/misc/m_mag_misc/magdelay | |
293 | chmod 0660 /sys/class/misc/m_mag_misc/magbatch | |
294 | chmod 0660 /sys/class/misc/m_mag_misc/magflush | |
295 | chmod 0660 /sys/class/misc/m_mag_misc/magoactive | |
296 | chmod 0660 /sys/class/misc/m_mag_misc/magodelay | |
297 | chmod 0660 /sys/class/misc/m_mag_misc/magobatch | |
298 | chmod 0660 /sys/class/misc/m_mag_misc/magoflush | |
299 | chown system system /sys/class/misc/m_mag_misc/magactive | |
300 | chown system system /sys/class/misc/m_mag_misc/magdelay | |
301 | chown system system /sys/class/misc/m_mag_misc/magbatch | |
302 | chown system system /sys/class/misc/m_mag_misc/magflush | |
303 | chown system system /sys/class/misc/m_mag_misc/magoactive | |
304 | chown system system /sys/class/misc/m_mag_misc/magodelay | |
305 | chown system system /sys/class/misc/m_mag_misc/magobatch | |
306 | chown system system /sys/class/misc/m_mag_misc/magoflush | |
307 | chmod 0660 /sys/class/misc/m_batch_misc/batchactive | |
308 | chmod 0660 /sys/class/misc/m_batch_misc/batchdelay | |
309 | chmod 0660 /sys/class/misc/m_batch_misc/batchbatch | |
310 | chmod 0660 /sys/class/misc/m_batch_misc/batchflush | |
311 | chown system system /sys/class/misc/m_batch_misc/batchactive | |
312 | chown system system /sys/class/misc/m_batch_misc/batchdelay | |
313 | chown system system /sys/class/misc/m_batch_misc/batchbatch | |
314 | chown system system /sys/class/misc/m_batch_misc/batchflush | |
315 | ||
316 | chmod 0660 /sys/class/misc/m_gyro_misc/gyroenablenodata | |
317 | chmod 0660 /sys/class/misc/m_gyro_misc/gyroactive | |
318 | chmod 0660 /sys/class/misc/m_gyro_misc/gyrodelay | |
319 | chmod 0660 /sys/class/misc/m_gyro_misc/gyrobatch | |
320 | chmod 0660 /sys/class/misc/m_gyro_misc/gyroflush | |
321 | chown system system /sys/class/misc/m_gyro_misc/gyroenablenodata | |
322 | chown system system /sys/class/misc/m_gyro_misc/gyroactive | |
323 | chown system system /sys/class/misc/m_gyro_misc/gyrodelay | |
324 | chown system system /sys/class/misc/m_gyro_misc/gyrobatch | |
325 | chown system system /sys/class/misc/m_gyro_misc/gyroflush | |
326 | ||
327 | chmod 0660 /sys/class/misc/m_alsps_misc/alsactive | |
328 | chmod 0660 /sys/class/misc/m_alsps_misc/alsdelay | |
329 | chmod 0660 /sys/class/misc/m_alsps_misc/alsbatch | |
330 | chmod 0660 /sys/class/misc/m_alsps_misc/alsflush | |
331 | chmod 0660 /sys/class/misc/m_alsps_misc/psactive | |
332 | chmod 0660 /sys/class/misc/m_alsps_misc/psdelay | |
333 | chmod 0660 /sys/class/misc/m_alsps_misc/psbatch | |
334 | chmod 0660 /sys/class/misc/m_alsps_misc/psflush | |
335 | chown system system /sys/class/misc/m_alsps_misc/alsactive | |
336 | chown system system /sys/class/misc/m_alsps_misc/alsdelay | |
337 | chown system system /sys/class/misc/m_alsps_misc/alsbatch | |
338 | chown system system /sys/class/misc/m_alsps_misc/alsflush | |
339 | chown system system /sys/class/misc/m_alsps_misc/psactive | |
340 | chown system system /sys/class/misc/m_alsps_misc/psdelay | |
341 | chown system system /sys/class/misc/m_alsps_misc/psbatch | |
342 | chown system system /sys/class/misc/m_alsps_misc/psflush | |
343 | ||
344 | chmod 0660 /sys/class/misc/m_baro_misc/baroenablenodata | |
345 | chmod 0660 /sys/class/misc/m_baro_misc/baroactive | |
346 | chmod 0660 /sys/class/misc/m_baro_misc/barodelay | |
347 | chmod 0660 /sys/class/misc/m_baro_misc/barobatch | |
348 | chmod 0660 /sys/class/misc/m_baro_misc/baroflush | |
349 | chown system system /sys/class/misc/m_baro_misc/baroenablenodata | |
350 | chown system system /sys/class/misc/m_baro_misc/baroactive | |
351 | chown system system /sys/class/misc/m_baro_misc/barodelay | |
352 | chown system system /sys/class/misc/m_baro_misc/barobatch | |
353 | chown system system /sys/class/misc/m_baro_misc/baroflush | |
354 | ||
355 | ||
356 | mkdir /data/misc/sensors 0664 system system | |
357 | mkdir /data/misc/akmd 0770 system system | |
358 | mkdir /data/acdapi/ 0770 system system | |
359 | chmod 0660 /data/misc/acdapi/calib.dat | |
360 | chmod 0660 /data/misc/acdapi/param.dat | |
361 | chmod 0660 /data/misc/acdapi/sensors.dat | |
362 | chown system /sys/devices/platform/msensor/driver/cpsopmode | |
363 | chown system /sys/devices/platform/msensor/driver/cpsreptxy | |
364 | chown system /sys/devices/platform/msensor/driver/cpsreptz | |
365 | ||
366 | chown system system /system/bin/sbchk | |
367 | chmod 0771 /system/bin/sbchk | |
368 | ||
369 | # change key_provisioning | |
370 | mkdir /data/key_provisioning | |
371 | chmod 0770 /data/key_provisioning | |
372 | chown system system /data/key_provisioning | |
373 | restorecon /data/key_provisioning | |
374 | ||
375 | # encryption flow | |
376 | setprop vold.post_fs_data_done 1 | |
377 | ||
378 | # Recycle stuffs | |
379 | exec /system/bin/rm -f /cache/.ipoh.img | |
380 | ||
381 | on property:vold.decrypt=trigger_restart_framework | |
382 | start msensord | |
383 | start nvram_daemon | |
384 | start permission_check | |
385 | ||
386 | # | |
387 | #sensor service (begin) | |
388 | service msensord /system/bin/msensord | |
389 | class main | |
390 | oneshot | |
391 | ||
392 | # | |
393 | #drm operation server | |
394 | service kisd /system/bin/kisd | |
395 | class main | |
396 | ||
397 | service nvram_daemon /system/bin/nvram_daemon | |
398 | class main | |
399 | user root | |
400 | group system | |
401 | oneshot | |
402 | ||
403 | # write proc for test sim | |
404 | on property:gsm.sim.ril.testsim=0 | |
405 | write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 0 | |
406 | write /proc/sys/net/ipv4/tcp_rto_min 200 | |
407 | on property:gsm.sim.ril.testsim=1 | |
408 | write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 1 | |
409 | write /proc/sys/net/ipv4/tcp_rto_min 400 | |
410 | on property:gsm.sim.ril.testsim.2=0 | |
411 | write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 0 | |
412 | write /proc/sys/net/ipv4/tcp_rto_min 200 | |
413 | on property:gsm.sim.ril.testsim.2=1 | |
414 | write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 1 | |
415 | write /proc/sys/net/ipv4/tcp_rto_min 400 | |
416 | on property:gsm.sim.ril.testsim.3=0 | |
417 | write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 0 | |
418 | write /proc/sys/net/ipv4/tcp_rto_min 200 | |
419 | on property:gsm.sim.ril.testsim.3=1 | |
420 | write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 1 | |
421 | write /proc/sys/net/ipv4/tcp_rto_min 400 | |
422 | on property:gsm.sim.ril.testsim.4=0 | |
423 | write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 0 | |
424 | write /proc/sys/net/ipv4/tcp_rto_min 200 | |
425 | on property:gsm.sim.ril.testsim.4=1 | |
426 | write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 1 | |
427 | write /proc/sys/net/ipv4/tcp_rto_min 400 | |
428 | service NvRAMAgent /system/bin/nvram_agent_binder | |
429 | user system | |
430 | group system | |
431 | ||
432 | service akmd8963 /system/bin/akmd8963 | |
433 | disabled | |
434 | user system | |
435 | group system | |
436 | oneshot | |
437 | ||
438 | service akmd09911 /system/bin/akmd09911 | |
439 | disabled | |
440 | user system | |
441 | group system | |
442 | class main | |
443 | ||
444 | service GoogleOtaAgent /system/bin/GoogleOtaBinder | |
445 | class main | |
446 | user system | |
447 | group system | |
448 | ||
449 | # workaround: disable mtkbt to avoid NE | |
450 | service mtkbt /system/bin/mtkbt | |
451 | class late_start | |
452 | socket bt.int.adp dgram 660 bluetooth net_bt | |
453 | socket bt.a2dp.stream dgram 660 bluetooth net_bt | |
454 | user bluetooth | |
455 | group system vpn net_admin inet net_raw net_bt bluetooth net_bt_admin net_bt_stack sdcard_r | |
456 | oneshot | |
457 | ||
458 | service dhcpcd_bt-pan /system/bin/dhcpcd -BK -dd | |
459 | class main | |
460 | user dhcp | |
461 | group net_admin net_raw | |
462 | disabled | |
463 | oneshot | |
464 | ||
465 | service dhcpcd_wlan0 /system/bin/dhcpcd -BK -dd | |
466 | class main | |
467 | user dhcp | |
468 | group net_admin net_raw | |
469 | disabled | |
470 | oneshot | |
471 | ||
472 | service dhcpcd_p2p /system/bin/dhcpcd -BK -dd | |
473 | class main | |
474 | user dhcp | |
475 | group net_admin net_raw | |
476 | disabled | |
477 | oneshot | |
478 | ||
479 | service iprenew_wlan0 /system/bin/dhcpcd -n | |
480 | class main | |
481 | user dhcp | |
482 | group net_admin net_raw | |
483 | disabled | |
484 | oneshot | |
485 | ||
486 | service iprenew_p2p /system/bin/dhcpcd -n | |
487 | class main | |
488 | user dhcp | |
489 | group net_admin net_raw | |
490 | disabled | |
491 | oneshot | |
492 | ||
493 | service dhcp6cDNS_wlan0 /system/bin/dhcp6c -c "/etc/wide-dhcpv6/dhcp6cDNS.conf" -Df wlan0 | |
494 | disabled | |
495 | oneshot | |
496 | ||
497 | service dhcp6c_wlan0 /system/bin/dhcp6c -c "/etc/wide-dhcpv6/dhcp6c.conf" -Df wlan0 | |
498 | disabled | |
499 | oneshot | |
500 | ||
501 | on property:service.dhcp6c_wlan0.enable=0 | |
502 | stop dhcp6c_wlan0 | |
503 | ||
504 | on property:service.dhcp6c_wlan0.enable=1 | |
505 | start dhcp6c_wlan0 | |
506 | ||
507 | service dhcp6c_PD /system/bin/dhcp6c -c "/etc/wide-dhcpv6/dhcp6cPD.conf" -Df | |
508 | disabled | |
509 | oneshot | |
510 | ||
511 | # | |
512 | #sensor service (end) | |
513 | # | |
514 | ||
515 | #thermal service | |
516 | service thermal_manager /system/bin/thermal_manager | |
517 | class main | |
518 | user root | |
519 | oneshot | |
520 | ||
521 | service thermal /system/bin/thermal | |
522 | class main | |
523 | user system | |
524 | group system | |
525 | ||
526 | service thermald /system/bin/thermald | |
527 | class main | |
528 | user system | |
529 | group system | |
530 | ||
531 | service aal /system/bin/aal | |
532 | class core | |
533 | user system | |
534 | group system graphics radio | |
535 | ||
536 | service pq /system/bin/pq | |
537 | class main | |
538 | user system | |
539 | group system graphics | |
540 | oneshot | |
541 | ||
542 | # FOTA upgrade | |
543 | service rbfota /system/bin/fota1 | |
544 | class main | |
545 | disabled | |
546 | oneshot | |
547 | ||
548 | # | |
549 | # MT6620 related services (Begin) | |
550 | # | |
551 | ||
552 | # monitor property and power on/off wlan | |
553 | on property:wlan.driver.status=ok | |
554 | write /dev/wmtWifi "1" | |
555 | ||
556 | on property:wlan.driver.status=unloaded | |
557 | write /dev/wmtWifi "0" | |
558 | ||
559 | #remove -puse_p2p_group_interface=1, our driver doesnot support this feature | |
560 | # | |
561 | service p2p_supplicant /system/bin/wpa_supplicant \ | |
562 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ | |
563 | -I/system/etc/wifi/wpa_supplicant_overlay.conf -N \ | |
564 | -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -ddd \ | |
565 | -I/system/etc/wifi/p2p_supplicant_overlay.conf \ | |
566 | -O/data/misc/wifi/sockets -g@android:wpa_wlan0 | |
567 | # we will start as root and wpa_supplicant will switch to user wifi | |
568 | # after setting up the capabilities required for WEXT | |
569 | # user wifi | |
570 | # group wifi inet keystore | |
571 | class main | |
572 | socket wpa_wlan0 dgram 660 wifi wifi | |
573 | disabled | |
574 | oneshot | |
575 | ||
576 | service wpa_supplicant /system/bin/wpa_supplicant \ | |
577 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin -ddd \ | |
578 | -I/system/etc/wifi/wpa_supplicant_overlay.conf \ | |
579 | -O/data/misc/wifi/sockets -g@android:wpa_wlan0 | |
580 | # we will start as root and wpa_supplicant will switch to user wifi | |
581 | # after setting up the capabilities required for WEXT | |
582 | # user wifi | |
583 | # group wifi inet keystore | |
584 | class main | |
585 | socket wpa_wlan0 dgram 660 wifi wifi | |
586 | disabled | |
587 | oneshot | |
588 | ||
589 | service ap_daemon /system/bin/wpa_supplicant \ | |
590 | -iap0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1 -ddd | |
591 | # we will start as root and wpa_supplicant will switch to user wifi | |
592 | # after setting up the capabilities required for WEXT | |
593 | # user wifi | |
594 | # group wifi inet keystore | |
595 | class main | |
596 | disabled | |
597 | oneshot | |
598 | ||
599 | service mobile_log_d /system/bin/mobile_log_d | |
600 | class main | |
601 | ||
602 | service netdiag /system/bin/netdiag | |
603 | class main | |
604 | socket netdiag stream 0660 root inet | |
605 | ||
606 | # | |
607 | # MT6620 related services (End) | |
608 | # | |
609 | ||
610 | ## mtk printk uart controller | |
611 | on property:persist.uartconsole.enable=1 | |
612 | write /proc/mtprintk 1 | |
613 | ||
614 | # Update the second boot logo | |
615 | service bootlogoupdater /system/bin/boot_logo_updater | |
616 | class core | |
617 | oneshot | |
618 | ||
619 | service auto_shutdown /system/bin/sh /auto_shutdown.sh | |
620 | oneshot | |
621 | disabled | |
622 | ||
623 | service audio-daemon /system/bin/audiocmdservice_atci | |
624 | class main | |
625 | socket atci-audio stream 660 media system | |
626 | user root | |
627 | group media system sdcard_rw | |
628 | disabled | |
629 | oneshot | |
630 | ||
631 | # OTA update backup partition | |
632 | service flash_tee2 /system/etc/install-tee2.sh | |
633 | class main | |
634 | oneshot | |
635 | ||
636 | # GuiExt Server init | |
637 | service guiext-server /system/bin/guiext-server | |
638 | class main | |
639 | user system | |
640 | group system graphics | |
641 | ||
642 | #Define device for ATCID | |
643 | chmod 660 /dev/ttyGS0 | |
644 | chown system /dev/ttyGS0 | |
645 | chmod 660 /dev/ttyGS1 | |
646 | chown system /dev/ttyGS1 | |
647 | ||
648 | service atci_service /system/bin/atci_service | |
649 | class core | |
650 | socket atci-service stream 660 radio system | |
651 | socket atci-serv-fw stream 660 radio system | |
652 | user root | |
653 | disabled | |
654 | group radio system | |
655 | oneshot | |
656 | ||
657 | service atcid-daemon-u /system/bin/atcid | |
658 | class main | |
659 | user system | |
660 | group radio system media | |
661 | disabled | |
662 | oneshot | |
663 | ||
664 | service atcid-daemon-e /system/bin/atcid | |
665 | class core | |
666 | user root | |
667 | group radio system | |
668 | disabled | |
669 | oneshot | |
670 | ||
671 | service sbchk /system/bin/sbchk | |
672 | class main | |
673 | user system | |
674 | group system | |
675 | oneshot | |
676 | ||
677 | on property:init.svc.servicemanager=restarting | |
678 | restart aal | |
679 | restart pq | |
680 | ||
681 | on property:init.svc.bootanim=running | |
682 | write /proc/bootprof "BOOT_Animation:START" | |
683 | ||
684 | on property:init.svc.bootanim=stopped | |
685 | write /proc/bootprof "BOOT_Animation:END" | |
686 | start auto_shutdown | |
687 | ||
688 | on property:ro.build.type=eng | |
689 | start atci_service | |
690 | start atcid-daemon-e | |
691 | ||
692 | #emsvr service (start) | |
693 | # | |
694 | on property:ro.build.type=eng | |
695 | start emsvr | |
696 | ||
697 | on property:ro.build.type=user | |
698 | start emsvr_user | |
699 | ||
700 | on property:ro.build.type=userdebug | |
701 | start emsvr_user | |
702 | ||
703 | service emsvr_user /system/bin/em_svr | |
704 | disabled | |
705 | user system | |
706 | group system radio diag | |
707 | ||
708 | service emsvr /system/bin/em_svr | |
709 | disabled | |
710 | user root | |
711 | ||
712 | # | |
713 | #emsvr service (end) | |
714 | # | |
715 | ||
716 | ||
717 | # | |
718 | #ape codec service | |
719 | # | |
720 | ||
721 | service MtkCodecService /system/bin/MtkCodecService | |
722 | class main | |
723 | user system | |
724 | group audio media sdcard_r | |
725 | ||
726 | #MNLD daemon | |
727 | service mnld /system/xbin/mnld | |
728 | class main | |
729 | user gps | |
730 | group system gps inet misc sdcard_rw sdcard_r media_rw | |
731 | socket mnld stream 660 gps system | |
732 | ||
733 | on boot | |
734 | # AGPS | |
735 | mkdir /data/agps_supl 0771 gps system | |
736 | ||
737 | ###########add for 3Gdongle | |
738 | ||
739 | on boot | |
740 | # | |
741 | # change the right of ip-up ip-down scripts(begin) | |
742 | # | |
743 | chmod 777 /etc/ppp/ip-up | |
744 | chmod 777 /etc/ppp/ip-down | |
745 | # | |
746 | # change the right of ip-up ip-down scripts(end) | |
747 | # | |
748 | ||
749 | # | |
750 | # change the right of ip-up-ppp0 ip-down-ppp0 scripts(begin) | |
751 | # | |
752 | chmod 777 /etc/ppp/ip-up-ppp0 | |
753 | chmod 777 /etc/ppp/ip-down-ppp0 | |
754 | # | |
755 | # change the right of ip-up ip-down scripts(end) | |
756 | # | |
757 | ||
758 | #set the property of persiste.radio.reset_on_switch | |
759 | setprop persist.radio.reset_on_switch true | |
760 | #end | |
761 | ||
762 | #set the property of rild.mark_switchuser | |
763 | setprop rild.mark_switchuser 0 | |
764 | #end | |
765 | ||
766 | chmod 0644 /system/lib/libzteevdo-ril.so | |
767 | chomd 0644 /system/lib/zterilPara | |
768 | chown root /system/bin/pppd | |
769 | chmod 4755 /system/bin/pppd | |
770 | chown root /system/bin/chat | |
771 | chmod 4755 /system/bin/chat | |
772 | ||
773 | chmod 0664 /sys/class/leds/lcd-backlight/brightness | |
774 | chown system system /sys/class/leds/red/trigger | |
775 | chown system system /sys/class/leds/green/trigger | |
776 | chown system system /sys/class/leds/blue/trigger | |
777 | # | |
778 | #ril-daemon (begin) | |
779 | # | |
780 | service ril-3gddaemon /system/bin/rild_dongle | |
781 | class main | |
782 | socket rild-dongle stream 660 root radio | |
783 | socket rild-dongle-debug stream 660 radio radio | |
784 | user root | |
785 | group radio cache inet misc audio log | |
786 | disabled | |
787 | ||
788 | # | |
789 | #ril-daemon (end) | |
790 | # | |
791 | ||
792 | # | |
793 | #usbdongled(begin) | |
794 | # | |
795 | service usbdongled /system/bin/dongled | |
796 | class main | |
797 | user root | |
798 | group radio cache inet misc | |
799 | enabled | |
800 | ||
801 | # | |
802 | #usbdongled(end) | |
803 | # | |
804 | ||
805 | # | |
806 | # add the service for call pppd(begin) | |
807 | # | |
808 | service zpppd_gprs /system/bin/init.gprs-pppd | |
809 | user root | |
810 | group radio cache inet misc | |
811 | disabled | |
812 | oneshot | |
813 | # | |
814 | # add the service for call pppd(end) | |
815 | # | |
816 | ||
817 | # | |
818 | # ipo | |
819 | # | |
820 | service ipod /system/bin/ipod | |
821 | user root | |
822 | group root | |
823 | disabled | |
824 | ||
825 | # | |
826 | # swap | |
827 | # | |
828 | service enableswap /system/bin/sh /enableswap.sh | |
829 | class core | |
830 | oneshot | |
831 | seclabel u:r:enableswap:s0 | |
832 | ||
833 | #monitor battery status | |
834 | service batterywarning /system/bin/batterywarning | |
835 | class main | |
836 | user shell | |
837 | group shell |