forked from jedld/device_samsung_gtexslte
-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.sc8830.rc
executable file
·962 lines (801 loc) · 27.9 KB
/
init.sc8830.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
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
import /init.board.rc
import /init.sc8830.usb.rc
import /init.sc8830_ss.rc
import /init.rilcommon.rc
import /init.fac.rc
import /init.sec_debug.rc
on early-init
mount debugfs debugfs /sys/kernel/debug
# set core dump resource limit
setrlimit 4 2147483647 2147483647
# radio pipe
mkdir /dev/rpipe 0550 radio radio
exec -- mkfifo /dev/rpipe/ril.vt.0
exec -- mkfifo /dev/rpipe/ril.vt.1
exec -- mkfifo /dev/rpipe/ril.vt.2
on init
# Support Preload install apks
mkdir /preload 0771 system system
mkdir /productinfo 0771 system system
# Support legacy paths
symlink /sdcard /mnt/sdcard
symlink /sdcard /storage/sdcard0
#Google FRP
symlink /dev/block/platform/sdio_emmc/by-name/PERSISTENT /dev/block/persistent
chown system system /sys/class/power_supply/battery/hw_switch_point
chown system system /sys/class/power_supply/battery/save_capacity
# for tsp command
chown system system /sys/class/sec/tsp/cmd
mkdir /efs 0771 radio system
mkdir /efs/imei 0775 radio system
# SEC_SELINUX
# for audit message
chown system system /proc/avc_msg
chmod 0660 /proc/avc_msg
restorecon /dev/pipes
## Samsung ODE >>>
# Create private mountpoint so we can MS_MOVE from staging
mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0
## Samsung ODE <<<
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
restorecon_recursive /mnt/secure/staging
# Directory-target for where the secure container
# imagefile directory will be bind-mounted
mkdir /mnt/secure/asec 0700 root root
restorecon_recursive /mnt/secure/asec
# Secure container public mount points.
mkdir /mnt/asec 0700 root system
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
restorecon_recursive /mnt/asec
# Filesystem image public mount points.
mkdir /mnt/obb 0700 root system
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
restorecon_recursive /mnt/obb
on fs
ubiattach 0 ubipac
mount_all /fstab.sc8830
mount pstore pstore /sys/fs/pstore
setprop ro.crypto.fuse_sdcard true
symlink /system/res /res
symlink /system/bin /bin
#Allow others to read fb devices
chmod 660 /dev/graphics/fb0
chmod 660 /dev/fb0
#permissions for debug
chown system system /sys/power/restart_cpc
chmod 0220 /sys/power/restart_cpc
#KEY
chown system system /sys/class/sec/sec_key/reset_enabled
# Support Preload install apks
mount ext4 /dev/block/platform/sdio_emmc/by-name/HIDDEN /preload nosuid nodev ro barrier=1
setprop storage.preload.complete 1
on post-fs
chown system system /productinfo
chmod 0771 /productinfo
insmod /lib/modules/mali.ko
insmod /lib/modules/trout_fm.ko
chown system system /proc/uid_cputime/show_uid_stat
chmod 0440 /proc/uid_cputime/show_uid_stat
chown system system /proc/uid_cputime/remove_uid_range
chmod 0660 /proc/uid_cputime/remove_uid_range
## Samsung ODE >>>
mount tmpfs tmpfs /mnt/secure private rec
mount tmpfs tmpfs /mnt/secure/asec shared rec
## Samsung ODE <<<
on late-init
trigger post-fs-data
on post-fs-data
# sec_efs_file
mkdir /efs/sec_efs 0775 radio system
copy /system/etc/bluetooth/bt_stack.conf /data/misc/bluedroid/bt_stack.conf
chown bluetooth system /data/misc/bluedroid/bt_stack.conf
chmod 0640 /data/misc/bluedroid/bt_stack.conf
mkdir /data/local/media 0770 media media
mkdir /data/local/tmp/slogmodem 0770 system system
mkdir /data/anr 0771 system system
mkdir /data/tombstones 0771 system system
/* SPRD: For saving the hprof */
mkdir /data/misc/hprofs 0770 system system
# Set indication (checked by vold) that we have finished this action
setprop vold.post_fs_data_done 1
#SPRD: Add support for install apk to internal sdcard @{
mkdir /mnt/secure/internal-asec 0700 root root
# @}
mkdir /data/ssh 0750 root shell
mkdir /data/ssh/empty 0700 root root
mkdir /data/ssh 0750 root shell
mkdir /data/ssh/empty 0700 root root
# SA, System SW, SAMSUNG create log directory
mkdir /data/log 0775 system log
chown system log /data/log
mkdir /data/anr 0775 system system
chown system system /data/anr
chmod 0775 /data/log
chmod 0775 /data/anr
restorecon /data/log
restorecon /data/anr
# symlink telphony data files
symlink /data/user_de/0/com.android.providers.telephony/databases /data/data/com.android.providers.telephony/databases
symlink /data/user_de/0/com.android.providers.telephony/shared_prefs /data/data/com.android.providers.telephony/shared_prefs
# MUIC
chown system radio /sys/class/sec/switch/uart_en
# [ SEC_MM_DRM
# OMA DB directory creation
mkdir /data/system/databases 0775
chown system system /data/system/databases
chmod 0775 /data/system/databases
# DRM directory creation
mkdir /system/etc/security/.drm 0775
chown root root /system/etc/security/.drm
chmod 0775 /system/etc/security/.drm
# Added for Playready DRM Support
mkdir /data/data/.drm 0775
chown drm system /data/data/.drm
chmod 0775 /data/data/.drm
mkdir /data/data/.drm/.playready 0775
chown drm system /data/data/.drm/.playready
chmod 0775 /data/data/.drm/.playready
# Added drm folder to copy drm plugins
mkdir /system/lib/drm 0775
chown root root /system/lib/drm
chmod 0775 /system/lib/drm
restorecon -R /efs
restorecon -R /carrier
restorecon_recursive /data/misc/keystore
restorecon_recursive /data/property
restorecon_recursive /data/security
# ]
on early-boot
# set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864
# Support audio loopback test
mkdir /dev/pipe 0755 system system
exec -- mkfifo /dev/pipe/mmi.audio.ctrl
chmod 220 /proc/cpt/cp_crash
chmod 660 /proc/cpt/wdtirq
chmod 660 /proc/cpt/stop
chmod 660 /proc/cpt/start
chmod 660 /proc/cpt/modem
chmod 660 /proc/cpt/dsp
chown system root /proc/cpt/cp_crash
chown system root /proc/cpt/wdtirq
chown system root /proc/cpt/stop
chown system root /proc/cpt/start
chown system root /proc/cpt/modem
chown system root /proc/cpt/dsp
chown system root /sys/class/rtcc/rtcc_trigger
chmod 220 /proc/cpw/cp_crash
chmod 660 /proc/cpw/wdtirq
chmod 660 /proc/cpw/stop
chmod 660 /proc/cpw/start
chmod 660 /proc/cpw/modem
chmod 660 /proc/cpw/dsp
chown system root /proc/cpw/cp_crash
chown system root /proc/cpw/wdtirq
chown system root /proc/cpw/stop
chown system root /proc/cpw/start
chown system root /proc/cpw/modem
chown system root /proc/cpw/dsp
chmod 220 /proc/cpwcn/cp_crash
chmod 660 /proc/cpwcn/wdtirq
chmod 660 /proc/cpwcn/stop
chmod 660 /proc/cpwcn/start
chmod 660 /proc/cpwcn/modem
chmod 660 /proc/cpwcn/dsp
chown system root /proc/cpwcn/cp_crash
chown system root /proc/cpwcn/wdtirq
chown system root /proc/cpwcn/stop
chown system root /proc/cpwcn/start
chown system root /proc/cpwcn/modem
chown system root /proc/cpwcn/dsp
chown system root /proc/mdbg
chown system root /proc/mdbg/assert
chown system root /proc/mdbg/wdtirq
chown system root /proc/mdbg/loopcheck
chown system root /proc/mdbg/at_cmd
chmod 555 /proc/mdbg
chmod 760 /proc/mdbg/assert
chmod 760 /proc/mdbg/wdtirq
chmod 760 /proc/mdbg/loopcheck
chmod 760 /proc/mdbg/at_cmd
on boot
chown system system /sys/module/mali/parameters/gpu_freq_cur
chown system system /sys/module/mali/parameters/gpu_freq_max_limit
chown system system /sys/module/mali/parameters/gpu_freq_min_limit
chown system system /sys/module/mali/parameters/gpu_freq_list
chown system system /sys/class/backlight/sprd_backlight/brightness
chown system system /sys/class/leds/red_bl/high_time
chown system system /sys/class/leds/red_bl/low_time
chown system system /sys/class/leds/red_bl/rising_time
chown system system /sys/class/leds/red_bl/falling_time
chown system system /sys/class/leds/red_bl/on_off
chown system system /sys/class/leds/green_bl/high_time
chown system system /sys/class/leds/green_bl/low_time
chown system system /sys/class/leds/green_bl/rising_time
chown system system /sys/class/leds/green_bl/falling_time
chown system system /sys/class/leds/green_bl/on_off
chown system system /sys/class/leds/blue_bl/high_time
chown system system /sys/class/leds/blue_bl/low_time
chown system system /sys/class/leds/blue_bl/rising_time
chown system system /sys/class/leds/blue_bl/falling_time
chown system system /sys/class/leds/blue_bl/on_off
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
chown system system /sys/devices/system/cpu/cpufreq/sprdemand/cpu_hotplug_disable
chown system system /sys/devices/system/cpu/cpuhotplug/cpu_hotplug_disable
chown system system /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
chown system system /sys/devices/system/cpu/cpu0/online
chown system system /sys/devices/system/cpu/cpufreq/sprdemand/boostpulse
chown system system /sys/devices/system/cpu/cpufreq/sprdemand/boost
chown system system /sys/devices/platform/scxx30-dmcfreq.0/devfreq/scxx30-dmcfreq.0/ondemand/set_freq
chown system system /sys/devices/platform/scxx30-dmcfreq.0/devfreq/scxx30-dmcfreq.0/ondemand/set_enable
chown system system /sys/devices/platform/scxx30-dmcfreq.0/devfreq/scxx30-dmcfreq.0/ondemand/set_enable
chown system system /sys/devices/platform/scxx30-dmcfreq.0/devfreq/scxx30-dmcfreq.0/ondemand/set_upthreshold
chown system system /sys/devices/platform/scxx30-dmcfreq.0/devfreq/scxx30-dmcfreq.0/ondemand/set_downdifferential
chown media system /sys/devices/platform/scxx30-dmcfreq.0/devfreq/scxx30-dmcfreq.0/ondemand/set_freq
chown media system /sys/devices/platform/scxx30-dmcfreq.0/devfreq/scxx30-dmcfreq.0/ondemand/set_request
chown system system /dev/iq_mem
chown system system /sys/class/graphics/fb0/dynamic_pclk
chown system system /sys/class/graphics/fb0/dynamic_mipi_clk
chown system system /dev/sprd_bm
chown system system /sys/class/thermal/cooling_device0/cur_ctrl_param
chown system system /sys/class/power_supply/battery/chg_cool_state
chown system system /sys/class/power_supply/battery/adjust_cur_min
chown system system /sys/class/power_supply/battery/adjust_cur_max
chown system system /sys/class/power_supply/battery/stop_charge
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 0660 /sys/devices/system/cpu/cpufreq/sprdemand/cpu_hotplug_disable
chmod 0664 /sys/devices/system/cpu/cpuhotplug/cpu_hotplug_disable
chmod 0664 /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
chmod 0664 /sys/devices/system/cpu/cpu0/online
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
chmod 0660 /sys/devices/system/cpu/cpufreq/sprdemand/boostpulse
chmod 0660 /sys/devices/system/cpu/cpufreq/sprdemand/boost
chmod 0660 /sys/devices/platform/scxx30-dmcfreq.0/devfreq/scxx30-dmcfreq.0/ondemand/set_freq
chmod 0660 /sys/devices/platform/scxx30-dmcfreq.0/devfreq/scxx30-dmcfreq.0/ondemand/set_enable
chmod 0444 /dev/iq_mem
chmod 0660 /dev/sprd_bm
chmod 0660 /sys/class/graphics/fb0/dynamic_pclk
chmod 0660 /sys/class/graphics/fb0/dynamic_mipi_clk
# for BT MAC address
mkdir /efs/bluetooth 0775 radio system
# if already exist
chown radio system /efs/bluetooth
chmod 0775 /efs/bluetooth
setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
chown bluetooth net_bt_stack ro.bt.bdaddr_path
chown radio net_bt_stack /efs/bluetooth/bt_addr
chmod 0640 /efs/bluetooth/bt_addr
# permissions for Input booster
chmod 0660 /sys/class/input_booster/level
chown system radio /sys/class/input_booster/level
chmod 0660 /sys/class/input_booster/head
chown system radio /sys/class/input_booster/head
chmod 0660 /sys/class/input_booster/tail
chown system radio /sys/class/input_booster/tail
# permission for CHARGING
chown system radio /sys/class/power_supply/battery/batt_reset_soc
chown system radio /sys/class/power_supply/battery/batt_slate_mode
chown system radio /sys/class/power_supply/battery/factory_mode
chown system radio /sys/class/power_supply/battery/siop_level
chown system radio /sys/class/power_supply/battery/wc_enable
chown system radio /sys/class/power_supply/battery/update
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 system 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
chown system radio /sys/class/power_supply/battery/lcd
chmod 0664 /sys/class/power_supply/battery/charge_otg_control
chown media sdcard_rw /sys/class/power_supply/battery/store_mode
setprop persist.sys.cmdservice.enable disable
write /sys/block/mmcblk0/queue/scheduler noop
on charger
start console
start slog
mount ext4 /dev/block/platform/sdio_emmc/by-name/SYSTEM /system wait ro
copy /system/etc/battery_charging_temp.data /sys/class/power_supply/battery/batt_temp_table
wait /dev/block/platform/sdio_emmc/by-name/efs
check_fs /dev/block/platform/sdio_emmc/by-name/efs ext4
mount ext4 /dev/block/platform/sdio_emmc/by-name/efs /efs nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
chown system radio /efs
chmod 0771 /efs
mkdir /efs/Battery 0775 radio system
service poweroffalarm /system/bin/poweroff_alarm
disabled
oneshot
on alarm
class_start core
start drm
start media
start console
start slog
start poweroffalarm
on property:ro.board_ram_size=min
setprop zram.disksize 64
on property:ro.board_ram_size=low
setprop zram.disksize 200
write /proc/sys/vm/extra_free_kbytes 1024
write /sys/module/zram/parameters/total_mem_usage_percent 35
on property:ro.board_ram_size=mid
setprop zram.disksize 400
write /proc/sys/vm/extra_free_kbytes 2048
on property:ro.board_ram_size=high
setprop zram.disksize 600
write /proc/sys/vm/extra_free_kbytes 4096
on property:ro.config.zram.support=true
write /proc/sys/vm/page-cluster 0
start zram
service zram /system/xbin/zram.sh
disabled
oneshot
on property:ro.debuggable=1
write /sys/kernel/debug/fatal_dump/enable 1
chmod 777 /sys/kernel/debug/sc2713-regulator/vddarm/voltage
chmod 777 /sys/kernel/debug/sc2713-regulator/vddcore/voltage
chmod 777 /sys/kernel/debug/sprd-regulator/vddarm/voltage
chmod 777 /sys/kernel/debug/sprd-regulator/vddcore/voltage
chmod 755 /sys/kernel/debug
write /proc/sys/fs/suid_dumpable 1
write /sys/module/smsg/parameters/debug_enable 1
on property:ro.product.name=sp9838aea_auto_slt
setprop persist.sys.sprd.mtbf 0
on property:ro.modem.t.count=1
write /proc/sim/0 t
on property:ro.modem.t.count=2
write /proc/sim/0 t
write /proc/sim/1 t
on property:ro.modem.t.count=3
write /proc/sim/0 t
write /proc/sim/1 t
write /proc/sim/2 t
on property:ro.modem.w.count=1
write /proc/sim/0 w
on property:ro.modem.w.count=2
write /proc/sim/0 w
write /proc/sim/1 w
on property:ro.modem.w.count=3
write /proc/sim/0 w
write /proc/sim/1 w
write /proc/sim/2 w
on property:sys.boot_completed=1
write /sys/kernel/mm/ksm/run 1
# SPRD: add for theme setting @{
on property:universe_ui_support=true
start theme_init
service theme_init /system/bin/theme_init.sh
disabled
oneshot
# @}
#modem_control
service modem_control /system/bin/modem_control
class core
user system
group system radio shell
oneshot
service modemd /system/bin/modemd
class core
user system
group system radio shell
oneshot
service wcnd /system/bin/wcnd
class core
# we will start as root and wcnd will switch to user system
user system
group system shell wifi inet bluetooth net_bt_stack
oneshot
service wcnd_eng /system/bin/wcnd -G
class core
group system shell wifi inet bluetooth net_bt_stack
disabled
oneshot
service phoneserver_t /system/bin/phoneserver -m t
class core
user root
group radio system shell dhcp
disabled
oneshot
service phoneserver_w /system/bin/phoneserver -m w
class core
user root
group radio system shell dhcp
disabled
oneshot
service phoneserver_l /system/bin/phoneserver -m l
class core
user root
group radio system shell dhcp
disabled
oneshot
service phoneserver_tl /system/bin/phoneserver -m tl
class core
user root
group radio system shell
disabled
oneshot
service phoneserver_lf /system/bin/phoneserver -m lf
class core
user root
group radio system shell
disabled
oneshot
service batterysrv /bin/batterysrv
class core
user system
group system
oneshot
#service charge /bin/charge
# class charger
# user root
# oneshot
##td rild service
#service tril-daemon /system/bin/rild_sp -l /system/lib/libreference-ril_sp.so -m t -n 0
# class core
# socket trild stream 660 root radio
# socket trild-debug stream 660 radio system
# disabled
# user root
# group radio cache inet misc audio sdcard_rw log
#
#service tril-daemon1 /system/bin/rild_sp -l /system/lib/libreference-ril_sp.so -m t -n 1
# class core
# socket trild1 stream 660 root radio
# socket trild-debug1 stream 660 radio system
# disabled
# user root
# group radio cache inet misc audio sdcard_rw log
#
#service tril-daemon2 /system/bin/rild_sp -l /system/lib/libreference-ril_sp.so -m t -n 2
# class core
# socket trild2 stream 660 root radio
# socket trild-debug2 stream 660 radio system
# disabled
# user root
# group radio cache inet misc audio sdcard_rw log
#
##wcdma rild service
#service wril-daemon /system/bin/rild_sp -l /system/lib/libreference-ril_sp.so -m w -n 0
# class core
# socket wrild stream 660 root radio
# socket wrild-debug stream 660 radio system
# disabled
# user root
# group radio cache inet misc audio sdcard_rw log shell
#
#service wril-daemon1 /system/bin/rild_sp -l /system/lib/libreference-ril_sp.so -m w -n 1
# class core
# socket wrild1 stream 660 root radio
# socket wrild-debug1 stream 660 radio system
# disabled
# user root
# group radio cache inet misc audio sdcard_rw log shell
#
#service wril-daemon2 /system/bin/rild_sp -l /system/lib/libreference-ril_sp.so -m w -n 2
# class core
# socket wrild2 stream 660 root radio
# socket wrild-debug2 stream 660 radio system
# disabled
# user root
# group radio cache inet misc audio sdcard_rw log shell
#
##lte rild service
#service lril-daemon /system/bin/rild_sp -l /system/lib/libreference-ril_sp.so -m l -n 0
# class core
# socket rild stream 660 root radio
# socket rild-debug stream 660 radio system
# disabled
# user root
# group radio cache inet misc audio sdcard_rw log shell
#
#service lril-daemon1 /system/bin/rild_sp -l /system/lib/libreference-ril_sp.so -m l -n 1
# class core
# socket rild2 stream 660 root radio
# socket rild-debug2 stream 660 radio system
# disabled
# user root
# group radio cache inet misc audio sdcard_rw log shell
#
##tl rild service
#service tlril-daemon /system/bin/rild_sp -l /system/lib/libreference-ril_sp.so -m tl -n 0
# class core
# socket rild stream 660 root radio
# socket rild-debug stream 660 radio system
# disabled
# user root
# group radio cache inet misc audio sdcard_rw log shell
#
#service tlril-daemon1 /system/bin/rild_sp -l /system/lib/libreference-ril_sp.so -m tl -n 1
# class core
# socket rild2 stream 660 root radio
# socket rild-debug2 stream 660 radio system
# disabled
# user root
# group radio cache inet misc audio sdcard_rw log shell
#
##lf rild service
#service lfril-daemon /system/bin/rild_sp -l /system/lib/libreference-ril_sp.so -m lf -n 0
# class core
# socket rild stream 660 root radio
# socket rild-debug stream 660 radio system
# disabled
# user root
# group radio cache inet misc audio sdcard_rw log shell
#
#service lfril-daemon1 /system/bin/rild_sp -l /system/lib/libreference-ril_sp.so -m lf -n 1
# class core
# socket rild2 stream 660 root radio
# socket rild-debug2 stream 660 radio system
# disabled
# user root
# group radio cache inet misc audio sdcard_rw log shell
#cp_diskserver
service cp_diskserver_td /system/bin/cp_diskserver t 0
class core
user system
disabled
group system radio shell
oneshot
service cp_diskserver_w /system/bin/cp_diskserver w 0
class core
user system
group system radio shell
disabled
oneshot
service cp_diskserver_l /system/bin/cp_diskserver l 0
class core
user system
group system radio shell
disabled
oneshot
service cp_diskserver_tl /system/bin/cp_diskserver tl 0
class core
user system
group system radio shell
disabled
oneshot
service cp_diskserver_lf /system/bin/cp_diskserver lf 0
class core
user system
group system radio shell
disabled
oneshot
service slog /system/bin/slog -t
class main
user system
group system shell radio log sdcard_r sdcard_rw media_rw
disabled
service slogmodem /system/bin/slogmodem -s sec
class main
user system
group media_rw system shell radio log sdcard_r sdcard_rw
disabled
service refnotify_td /system/bin/refnotify -t 0
class main
disabled
user system
group system radio shell
oneshot
service refnotify_w /system/bin/refnotify -t 1
class main
disabled
user system
group system radio shell
oneshot
service refnotify_l /system/bin/refnotify -t 2
class main
disabled
user system
group system radio shell
oneshot
# For CTS of slog ->
# This action is to make sure that the shell user
# can also enable the slog daemon
# convert the debug to system
on property:debug.slog.enabled=1
setprop persist.sys.slog.enabled 1
# convert the debug to system
on property:debug.slog.enabled=0
setprop persist.sys.slog.enabled 0
# Start the daemon
on property:persist.sys.slog.enabled=1
mkdir /data/local/tmp/slog 0770 system system
mkdir /data/local/tmp/slogmodem 0770 system system
start slog
start slogmodem
start sprd_res_monitor
# Stop the daemon
on property:persist.sys.slog.enabled=0
stop slog
stop slogmodem
stop sprd_res_monitor
rm /data/local/tmp/sprd_monitor.conf
# For CTS of slog <-
on property:persist.modem.w.enable=1
symlink /dev/spipe_w1 /dev/vbpipe1
symlink /dev/spipe_w2 /dev/vbpipe2
symlink /dev/spipe_w3 /dev/vbpipe3
symlink /dev/spipe_w6 /dev/vbpipe6
start refnotify_w
start cp_diskserver_w
on property:persist.modem.t.enable=1
start refnotify_td
start cp_diskserver_td
on property:persist.modem.l.enable=1
start refnotify_l
start cp_diskserver_l
on property:persist.modem.lf.enable=1
start refnotify_l
#create symlink
service smd_symlink /system/bin/ext_symlink.sh -u
user root
disabled
oneshot
#data on
service data_on /system/bin/ext_data.sh -u
user root
disabled
oneshot
#data off
service data_off /system/bin/ext_data.sh -d
user root
disabled
oneshot
#kill td app
service kill_td_phone /system/bin/ext_kill.sh -t
user root
disabled
oneshot
#kill w app
service kill_w_phone /system/bin/ext_kill.sh -w
user root
disabled
oneshot
#kill lte app
service kill_l_phone /system/bin/ext_kill.sh -l
user root
disabled
oneshot
#kill td-lte app
service kill_tl_phone /system/bin/ext_kill.sh -tl
user root
disabled
oneshot
#kill lte-fdd app
service kill_lf_phone /system/bin/ext_kill.sh -lf
user root
disabled
oneshot
#change owner
service chown_service /system/bin/ext_chown.sh -c
class main
user root
oneshot
#set mac addr
service set_mac /system/bin/ext_chown.sh -e
user root
disabled
oneshot
service inputfreq /system/bin/inputfreq.sh
user root
disabled
oneshot
service recoveryfreq /system/bin/recoveryfreq.sh
user root
disabled
oneshot
chmod 0666 /proc/pin_switch/iis0_sys_sel/cp0_iis0
chmod 0666 /proc/pin_switch/iis0_sys_sel/cp1_iis0
chmod 0666 /proc/pin_switch/iis0_sys_sel/cp2_iis0
chmod 0666 /proc/pin_switch/iis0_sys_sel/ap_iis0
chmod 0666 /proc/pin_switch/bt_iis_sys_sel/cp0_iis0
chmod 0666 /proc/pin_switch/bt_iis_sys_sel/cp1_iis0
chmod 0666 /proc/pin_switch/bt_iis_sys_sel/cp2_iis0
chmod 0666 /proc/pin_switch/bt_iis_sys_sel/ap_iis0
service autotest /system/bin/autotest
class main
disabled
user root
oneshot
#volte
service modemDriver /system/bin/modemDriver_vpad_main
class core
user root
group system radio shell
on property:persist.sys.volte.enable=true
start modemDriver
service umount_service /system/bin/umount /preload
disabled
oneshot
# Support Preload install apks
on property:persist.sys.storage_preload=1
mount ext4 /dev/block/platform/sdio_emmc/by-name/HIDDEN /preload nosuid nodev ro barrier=1
setprop storage.preload.complete 1
on property:persist.sys.storage_preload=0
start umount_service
# Activate Background Compaction
on property:sys.sysctl.compact_memory=1
setprop sys.sysctl.compact_memory 0
start compact_memory
service compact_memory /sbin/bgcompact
user root
seclabel u:r:sswap:s0
oneshot
disabled
# SEC_SELINUX
service auditd /system/bin/auditd -k
class main
seclabel u:r:auditd:s0
disabled
oneshot
service lpm /system/bin/lpm
class charger
critical
## WTL_EDM_START
## EDM AuditLog
service edmaudit /system/bin/edmaudit
class main
user root
## WTL_EDM_END
service prepare_param /system/bin/prepare_param.sh /dev/block/platform/sdio_emmc/by-name/PARAM
class core
user root
group root
seclabel u:r:prepare_param:s0
oneshot
service scs /system/bin/scs
class main
user system
group system
oneshot
# bootchecker
service bootchecker /system/bin/bootchecker
class late_start
user system
group system log
oneshot
on property:init.svc.zygote=restarting
restart bootchecker
# Strongswan VPN
service charon /system/bin/charon
class main
socket charon stream 600 system system
# charon will setuid to vpn after getting necessary resources.
group vpn net_admin inet
disabled
oneshot
service cmd_services /system/bin/cmd_services
class main
user root
disabled
oneshot
service sdumpstate /system/bin/dumpstate -P
class main
disabled
oneshot
on property:persist.sys.cmdservice.enable=enable
start cmd_services
on property:persist.sys.cmdservice.enable=disable
stop cmd_services
on property:sys.boot_completed=1
write /sys/block/mmcblk0/queue/scheduler cfq
service mobex-daemon /system/bin/npsmobex
class main
user system
group system radio inet sdcard_r sdcard_rw media_rw shell
service charger /sbin/healthd -c
class charger
critical
seclabel u:r:healthd:s0