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