summaryrefstree
path: root/system/init.oppo.debug.rc
blob: 29d2d3bca75abab65fbd0959285c9dc16959d7b6 (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
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
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
##################################################################################
### VENDOR_EDIT, OPPO All rights reserved.
###
### File: - init.oppo.debug.nosd.rc
### Author: Jason.Lee@OnlineRd.Framework
###
### ------------------------------- Revision History: ----------------------------
### <author>                        <data>       <version>   <desc>
### ------------------------------------------------------------------------------
### Jason.Lee@OnlineRd.Framework   2014-03-18               Create this file
##################################################################################

#ifdef VENDOR_EDIT
#yanbin@OnlineRd.framework.oppo_debug, 2015/03/07, add

# There are some duplicate codes

on property:persist.sys.dump=1
    start dumpon

on property:persist.sys.dump=0
    start dumpoff

#JianRong.Zheng@Swdp.Android.Log, 2016/10/07, remove 0x840 0x841, default value set by kernel or driver, no need to modify here
on property:persist.sys.powerkeydump=0
    start pwkdumpoff

#JianRong.Zheng@Swdp.Android.Log, 2016/10/07, modify 0x840 from 0x0c to 0x0F, 0x841 from 0x07 to 0x05 avoid cause into dump by mistake(5.5s change to 10.7s)
on property:persist.sys.powerkeydump=1
    start pwkdumpon

#Canjie.Zheng@Swdp.Android.OppoDebug.LogKit,2016/11/25,disable console log default
on property:ro.build.release_type=false
    start chprintk

#Junhao.Liang@PSW.AD.OppoDebug.LogKit.1491016, 2018/09/27, Add for removing pstore
on property:sys.oppo.rmpstore=1
    start rmpstore

#Yugang.Bao@PSW.AD.OppoDebug.LogKit.1491016, 2018/09/27, Add for removing pstore
on property:persist.sys.cpoppousage=1
    start cpoppousage

service chprintk /system/bin/autochmod.sh "chprintk"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service pwkdumpon /system/bin/autochmod.sh "pwkdumpon"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service pwkdumpoff /system/bin/autochmod.sh "pwkdumpoff"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service dumpon /system/bin/autochmod.sh "dumpon"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service dumpoff /system/bin/autochmod.sh "dumpoff"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service packupminidump /system/bin/autochmod.sh "packupminidump"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

#ifdef VENDOR_EDIT
#Bin.Yan@Swdp.Android.OppoDebug.AssertTip, 2015/12/30, add for AssertTip.
service oppoasserttip /system/bin/asserttip
    class core
    user system
    disabled

#Canjie.Zheng@PSW.AD.OppoDebug.CriticalLog.1067207, 2016/01/07, Add for critical log.
service criticallog /system/bin/criticallog
    class main
    user system
    seclabel u:r:rutilsdaemon:s0
    group system

service ps /system/bin/autochmod.sh "ps"
    class core
    user root
    disabled
    oneshot
service top /system/bin/autochmod.sh "top"
    class core
    user root
    disabled
    oneshot
service server_list /system/bin/autochmod.sh "server"
    class core
    user root
    disabled
    oneshot
service dump_sys /system/bin/autochmod.sh "dump"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
service dump_sysinfo /system/bin/autochmod.sh "dump_sysinfo"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
service dump_storage /system/bin/autochmod.sh "dump_storage"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
service dump_wechat_info /system/bin/autochmod.sh "dump_wechat_info"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
service dump_state /system/bin/autochmod.sh "dumpstate"
    class core
    user root
    disabled
    oneshot
service tranfer /system/bin/autochmod.sh "tranfer"
    class core
    user root
    disabled
    oneshot
service tranfer_tomb /system/bin/autochmod.sh "tranfer_tombstone"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
service tranfer_anr /system/bin/autochmod.sh "tranfer_anr"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
service logcatsdcard /system/bin/autochmod.sh "main"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled

service logcatradio /system/bin/autochmod.sh "radio"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled

service logcatevent /system/bin/autochmod.sh "event"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled

service cameraloginit /system/bin/autochmod.sh "cameraloginit"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled

#Jianping.Zheng@Swdp.Android.Stability.Crash,2017/04/04,add for record performance
service perf_record /system/bin/autochmod.sh "perf_record"
    class core
    user root
    disabled
    seclabel u:r:perf_record:s0

#Jianping.Zheng@PSW.Android.Stability.Crash,2017/05/08,add for systemserver futex_wait block check
service checkfutexwait /system/bin/autochmod.sh "checkfutexwait"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
#end, add for systemserver futex_wait block check

#Fei.Mo@PSW.BSP.Sensor, 2017/09/01 ,Add for power monitor top info
service thermal_top /system/bin/autochmod.sh "thermal_top"
    class core
    user root
    disabled
    oneshot

service dumpenvironment /system/bin/autochmod.sh "dumpenvironment"
    class core
    user root
    disabled
    oneshot
#ifdef VENDOR_EDIT
#Li.Liu@PSW.AD.OppoDebug.Feedback.1050853,2017/12/20, Add for Feedback can not get some files
    seclabel u:r:rutilsdaemon:s0
#endif

service logcatkernel /system/bin/autochmod.sh "kernel"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service cleanlog /system/bin/autochmod.sh "clean"
    class core
    user root
    disabled
    oneshot
service  tcpdumplog /system/bin/autochmod.sh "tcpdump"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
service fingerprintlog /system/bin/autochmod.sh "fingerprint"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

#Qilong.Ao@PSW.AD.OppoDebug.LogKit.1067207, 2019/04/01, Add for 5G log.
service logfor5G /system/bin/autochmod.sh "logfor5G"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service fplogqess /system/bin/autochmod.sh "fpqess"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

#ifdef VENDOR_EDIT
#Horn@Swdp.Android.Boot, 2015/03/27, Modify for remove suid of tcpdump . suid bit will be set only when  sys.debug = 1
service enabletcpdump /system/bin/autochmod.sh "enabletcpdump"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
#endif

#ifdef VENDOR_EDIT
#Qianyou.Chen@PSW.Android.OppoDebug.LogKit, 2017/04/12, add for wifi packet log
#ifdef VENDOR_EDIT
#Xiao.Liang@PSW.CN.WiFi.Basic.Log.1072015, 2018/10/21, Modify for collecting wifi driver log
#service prepacketlog /system/bin/autochmod.sh "prepacketlog"
#    class core
#    user root
#    disabled
#    oneshot
#
#service wifipktlogtransf /system/bin/autochmod.sh "wifipktlogtransf"
#    class core
#    user root
#   disabled
#    oneshot
#else /* VENDOR_EDIT */

service prepacketlog /vendor/bin/vendor.autochmod.sh "prepacketlog"
    class core
    user root
    disabled
    oneshot

service wifipktlogtransf /vendor/bin/vendor.autochmod.sh "wifipktlogtransf"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service wifidriverlog_on /vendor/bin/cnss_diag -q -f -t HELIUM
    class main
    user system
    group system wifi inet sdcard_rw media_rw diag
    disabled
    oneshot

service wifidriverlog_off /vendor/bin/cnss_diag -q -u -w -b 4096
    class main
    user system
    group system wifi inet net_admin sdcard_rw media_rw diag
    disabled
    oneshot

service setiwprivpkt0 /system/bin/autochmod.sh "setiwprivpkt0"
    class core
    user root
    disabled
    oneshot

service setiwprivpkt1 /system/bin/autochmod.sh "setiwprivpkt1"
    class core
    user root
    disabled
    oneshot

service setiwprivpkt4 /system/bin/autochmod.sh "setiwprivpkt4"
    class core
    user root
    disabled
    oneshot

on property:oppo.wifi.ftm=1
    stop wifidriverlog_on
    stop wifidriverlog_off

#endif /*VENDOR_EDIT*/

service pktcheck /system/bin/autochmod.sh "pktcheck"
    class core
    user root
    oneshot
#endif /*VENDOR_EDIT*/

##ifdef VENDOR_EDIT
#Boning.Li@Swdp.Android.OppoDebug.LogKit, 2016/08/06, add screen record for oppo log.
service screen_record /system/bin/autochmod.sh "screen_record"
    class core
    user root
    disabled
    oneshot
#endif /*VENDOR_EDIT*/

#ifdef VENDOR_EDIT
#RunSheng.Pei@Swdp.Android.OppoDebug.LogKit, 2016/11/20, add screen record for oppo log.
service backupscr /system/bin/autochmod.sh "screen_record_backup"
    class core
    user root
    disabled
    oneshot
#endif /*VENDOR_EDIT*/

#ifdef VENDOR_EDIT
#Yanzhen.Feng@Swdp.Android.OppoDebug.LayerDump, 2015/12/09, Add for SurfaceFlinger Layer dump
service layerdump /system/bin/autochmod.sh "layerdump"
    class core
    user root
    disabled
    oneshot
#endif /* VENDOR_EDIT */

#ifdef VENDOR_EDIT
#Deliang.Peng@MultiMedia.Display.Service.Log, 2017/3/31,add for dump sf back trace
service sfdump /system/bin/autochmod.sh "sfdump"
    class core
    user root
    disabled
    oneshot

service sfsystrace /system/bin/autochmod.sh "sfsystrace"
    class core
    user root
    disabled
    oneshot

#endif

#ifdef VENDOR_EDIT
#Yanzhen.Feng@Swdp.Android.OppoDebug, 2017/03/20, Add for systrace on phone
service cont_systrace /system/bin/autochmod.sh "cont_systrace"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
#endif /* VENDOR_EDIT */

#ifdef VENDOR_EDIT
#fangpan@Swdp.shanghai, 2017/06/05, Add for systrace snapshot mode
service snaptrace_on /system/bin/autochmod.sh "systrace_trigger_start"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service snaptrace_off /system/bin/autochmod.sh "systrace_trigger_stop"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service snaptrace /system/bin/autochmod.sh "systrace_snapshot"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
#endif /* VENDOR_EDIT */

#ifdef VENDOR_EDIT
#Jianping.Zheng@Swdp.Android.Stability.Crash, 2016/08/09, Add for logd memory leak workaround
service checklogdmemleak /system/bin/autochmod.sh "check_logd_memleak"
    class core
    user root
    disabled
    oneshot
#endif /* VENDOR_EDIT */

#ifdef VENDOR_EDIT
#Zhihao.Li@MultiMedia.AudioServer.FrameWork, 2016/10/19, Add for clean pcm dump file.
service cleanpcmdump /system/bin/autochmod.sh "cleanpcmdump"
    class core
    user root
    disabled
    oneshot
#endif /* VENDOR_EDIT */

service clearcurrentlog /system/bin/autochmod.sh "clearcurrentlog"
    class core
    user root
    disabled
    oneshot

service calcutelogsize /system/bin/autochmod.sh "calcutelogsize"
    class core
    user root
    disabled
    oneshot

service movescreenrecord /system/bin/autochmod.sh "movescreenrecord"
    class core
    user root
    disabled
    oneshot

service cleardataoppolog /system/bin/autochmod.sh "cleardataoppolog"
    class core
    user root
    disabled
    oneshot

service initcache /system/bin/autochmod.sh "initcache"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service logcatcache /system/bin/autochmod.sh "logcatcache"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service radiocache /system/bin/autochmod.sh "radiocache"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service eventcache /system/bin/autochmod.sh "eventcache"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service kernelcache /system/bin/autochmod.sh "kernelcache"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service tcpdumpcache /system/bin/autochmod.sh "tcpdumpcache"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service fingerprintcache /system/bin/autochmod.sh "fingerprintcache"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

#Qilong.Ao@PSW.AD.OppoDebug.LogKit.1067207, 2019/04/01, Add for 5G log.
service logfor5Gcache /system/bin/autochmod.sh "logfor5Gcache"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service fplogcache /system/bin/autochmod.sh "fplogcache"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service log_observer /system/bin/autochmod.sh "log_observer"
    class core
    user root
    disabled
    oneshot

service junklogcat /system/bin/autochmod.sh "junklogcat"
    class main
    user root
    disabled
    oneshot

service junkdmesg /system/bin/autochmod.sh "junkdmesg"
    class main
    user root
    disabled
    oneshot

service junkststart /system/bin/autochmod.sh "junkststart"
    class main
    user root
    disabled
    oneshot

service junkststop /system/bin/autochmod.sh "junkststop"
    class main
    user root
    disabled
    oneshot

#ifdef VENDOR_EDIT
#Canjie.Zheng@Swdp.Android.OppoDebug.LogKit, 2016/09/13, add for copy pstore
service cppstore /system/bin/autochmod.sh "cppstore"
    class main
    user root
    disabled
    oneshot
#endif  VENDOR_EDIT

#ifdef VENDOR_EDIT
#Junhao.Liang@PSW.AD.OppoDebug.Feedback.1500936, 2018/07/31, Add for panic delete pstore/dmesg-ramoops-0 file
service rmpstore /system/bin/autochmod.sh "rmpstore"
    class main
    user root
    disabled
    oneshot
#endif /* VENDOR_EDIT */

#ifdef VENDOR_EDIT
#Yugang.Bao@PSW.AD.OppoDebug.Feedback.1500936, 2018/07/31, Add for panic delete pstore/dmesg-ramoops-0 file
service cpoppousage /system/bin/autochmod.sh "cpoppousage"
    class main
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
#endif /* VENDOR_EDIT */

#ifdef VENDOR_EDIT
#Canjie.Zheng@Swdp.Android.OppoDebug.JunkLog, 2016/08/04, add for junk log.
service junklog /system/bin/junklogcollector
    class main
    user system
    group system sdcard_rw sdcard_r

#endif /* VENDOR_EDIT */

#Linjie.Xu@PSW.AD.Power.PowerMonitor.1104067, 2018/01/17, Add for OppoPowerMonitor get dmesg at O
service opmgetdmesg /system/bin/autochmod.sh "kernelcacheforopm"
    class main
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
#Linjie.Xu@PSW.AD.Power.PowerMonitor.1104067, 2018/01/17, Add for OppoPowerMonitor get Sysinfo at O
service opmgetps /system/bin/autochmod.sh "psforopm"
    class main
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
service opmgetcpufreq /system/bin/autochmod.sh "cpufreqforopm"
    class main
    user root
    disabled
    oneshot
service smapsforhealth /system/bin/autochmod.sh "smapsforhealth"
    class main
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
service opmgetsystrace /system/bin/autochmod.sh "systraceforopm"
    class main
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

on post-fs-data
   mkdir /data/oppo_log 777
   mkdir /data/ramdump 770 system system


service logpreprocess /system/bin/autochmod.sh "logpreprocess"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

on property:persist.sys.assert.panic=true
   start initcache
   start logpreprocess
   start log_observer
   start inittpdebug

on property:persist.sys.assert.panic.camera=true
   start initcache
   start logpreprocess
   start log_observer
   start inittpdebug

#ifdef VENDOR_EDIT
#Xiao.Liang@PSW.Wifi.Basic.Log.1072015,2018/10/21, add for collecting wifi driver log
on property:vold.decrypt=trigger_restart_framework && property:persist.sys.assert.panic=true
   start prepacketlog
   stop wifidriverlog_off
   start wifidriverlog_on

on property:persist.sys.assert.panic=true && property:ro.crypto.state=encrypted && property:ro.crypto.type=file
   start prepacketlog
   stop wifidriverlog_off
   start wifidriverlog_on

#endif

on property:sys.oppo.collectcache.start=true
   start logcatcache
   start radiocache
   start eventcache
   start kernelcache
   start tcpdumpcache
   start fingerprintcache
   start logfor5Gcache
   start fplogcache

on property:sys.oppo.collectlog.start=true
   start logcatsdcard
   start logcatradio
   start logcatevent
   start logcatkernel
   start tcpdumplog
   start fingerprintlog
   start logfor5G
   start fplogqess
   start cppstore
#ifdef VENDOR_EDIT
#Canjie.Zheng@Swdp.Android.OppoDebug.JunkLog,2016/07/25,add for junklog
#start or stop base on the property
on property:persist.sys.oppo.junklog=true
    start junklog

on property:persist.sys.oppo.junklog=false
    start junklog
#endif VENDOR_EDIT

on property:sys.oppo.tranfer=true
    stop logcatsdcard
    stop logcatevent
    stop logcatkernel
    stop logcatradio
    stop tcpdumplog
    stop fingerprintlog
    stop logfor5G
    stop fplogqess
    stop log_observer
    start tranfer
    setprop persist.sys.assert.panic false

#ifdef VENDOR_EDIT
#Canjie.Zheng@Swdp.Android.OppoDebug.LogKit,2017/03/09, add for Sensor.logger
service resetlogpath /system/bin/autochmod.sh "resetlogpath"
    class main
    user root
    disabled
    oneshot
#endif

#ifdef VENDOR_EDIT
#Jianping.Zheng@Swdp.Android.Stability.Crash,2017/04/04,add for record performance
on property:persist.sys.oppo.perfrecord=true
    start perf_record

on property:persist.sys.oppo.perfrecord=false
    stop perf_record
#endif VENDOR_EDIT

#ifdef VENDOR_EDIT
#Wenzhen.Lin@Swdp.Android.OppoDebug.JunkLog,2017/4/19,add for pack up junk log
service junklogmonitor /system/bin/autochmod.sh "junklogmonitor"
    class main
    user system
    group system sdcard_rw sdcard_r
    disabled
    oneshot
#endif VENDOR_EDIT

#Jianping.Zheng@PSW.Android.Stability.Crash,2017/05/08,add for systemserver futex_wait block check
on property:persist.sys.oppo.checkfutexwait=true
    start checkfutexwait

on property:persist.sys.oppo.checkfutexwait=false
    stop checkfutexwait
#end, add for systemserver futex_wait block check

#ifdef VENDOR_EDIT
#Canjie.Zheng@Swdp.Android.OppoDebug.LogKit,2016/11/28,add for tp
service gettpinfo /system/bin/autochmod.sh "gettpinfo"
    class main
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service inittpdebug /system/bin/autochmod.sh "inittpdebug"
    class main
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service settplevel /system/bin/autochmod.sh "settplevel"
    class main
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service rmminidump /system/bin/autochmod.sh "rmminidump"
    class main
    user root
    disabled
    oneshot


service readdump /system/bin/autochmod.sh "readdump"
    class main
    user root
    seclabel u:r:rutilsdaemon:s0
    oneshot

#Canjie.Zheng@PSW.AD.OppoDebug.LogKit.1078692, 2017/11/20, Add for iotop
service getiotop /system/bin/autochmod.sh "getiotop"
    class main
    user root
    oneshot

on property:sys.oppo.minidump=on
    write /sys/module/msm_poweroff/parameters/download_mode 1

on property:sys.oppo.minidump=off
    write /sys/module/msm_poweroff/parameters/download_mode 0


on property:persist.sys.assert.panic.camera=false
    start inittpdebug
    start resetlogpath

on property:persist.sys.assert.panic=false
    start inittpdebug
#ifdef VENDOR_EDIT
#Canjie.Zheng@Swdp.Android.OppoDebug.LogKit,2017/03/09, add for Sensor.logger
    start resetlogpath
#endif
#ifdef VENDOR_EDIT
#Xiao.Liang@PSW.Wifi.Basic.Log.1072015,2018/10/21, add for collecting wifi driver log
on property:vold.decrypt=trigger_restart_framework && property:persist.sys.assert.panic=false
    stop wifidriverlog_on
    start wifidriverlog_off
    start wifipktlogtransf
    chmod 0770 /data/vendor/wifi

on property:persist.sys.assert.panic=false && property:ro.crypto.state=encrypted && property:ro.crypto.type=file
    stop wifidriverlog_on
    start wifidriverlog_off
    start wifipktlogtransf
    chmod 0770 /data/vendor/wifi
#endif

on property:persist.sys.oppodebug.tplevel=*
    start settplevel

#RunSheng.Pei@Swdp.Android.OppoDebug.AssertTip, 2017/02/16, add for asserttip begin:{
on property:persist.sys.assert.state=true
    start oppoasserttip
#end.

#endif VENDOR_EDIT


//./add for new log kit begin
service tranfer2 /system/bin/autochmod.sh "tranfer2"
    class core
    user root
    disabled
    seclabel u:r:rutilsdaemon:s0
    oneshot

service deleteOrigin /system/bin/autochmod.sh "deleteOrigin"
    class core
    user root
    disabled
    oneshot

service deleteFolder /system/bin/autochmod.sh "deleteFolder"
    class core
    user root
    disabled
    oneshot

service testKit /system/bin/autochmod.sh "testkit"
    class core
    user root
    disabled
    oneshot

service calSize /system/bin/autochmod.sh "calculateFolderSize"
    class core
    user root
    disabled
    oneshot

service testassert /system/bin/autochmod.sh "test"
   class core
   user root
   disabled
   oneshot

on property:persist.sys.assert.test=true
    start testassert
    start logpreprocess
    start tranfer2
#endif
//./add for new log kit end

#ifdef VENDOR_EDIT
#Haoran.Zhang@PSW.AD.BuildConfig.StandaloneUserdata.1143522, 2017/09/13, Modify for [read new prop for feature StandaloneUserdata] 
on post-fs-data
   start datarefresh
   start lowram_device_setup

service datarefresh /system/bin/sh /system/bin/autochmod.sh "userdatarefresh"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
#endif
#end add
#ifdef VENDOR_EDIT
#Weitao.Chen@PSW.AD.Stability.Crash.1295294, 2018/03/01, Add for trying to recover from sysetm hang
on property:sys.oppo.boot_completed=0
   start recover_hang

service recover_hang /system/bin/sh /system/bin/autochmod.sh "recover_hang"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
#endif

#ifdef VENDOR_EDIT
#Jiemin.Zhu@PSW.AD.Memroy.Performance, 2017/10/12, add for low memory device
service lowram_device_setup /system/bin/sh /system/bin/autochmod.sh "lowram_device_setup"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
#endif
#add for customer log
service logcusmain  /system/bin/autochmod.sh "logcusmain"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service logcusevent /system/bin/autochmod.sh "logcusevent"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service logcusradio /system/bin/autochmod.sh "logcusradio"
    class core
    user root
    disabled
    oneshot

service logcuskernel /system/bin/autochmod.sh "logcuskernel"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service logcustcp  /system/bin/autochmod.sh "logcustcp"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

service logcuswifi  /system/bin/autochmod.sh "logcuswifi"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
service logcusqmistart  /system/bin/autochmod.sh "logcusqmistart"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
service logcusqmistop  /system/bin/autochmod.sh "logcusqmistop"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
service chmodmodemconfig  /system/bin/autochmod.sh "chmodmodemconfig"
    class core
    user root
    disabled
    oneshot

#ifdef VENDOR_EDIT
#Jian.Wang@PSW.CN.WiFi.Basic.Log.1162003, 2018/7/02, Add for dynamic collect wifi mini dump

on property:vendor.oppo.wifi.minidump=1
    start touchwifiminidumpfile

service touchwifiminidumpfile /system/bin/autochmod.sh "touchwifiminidumpfile"
    class core
    user system
    group wifi system misc
    disabled
    oneshot

service enablewifidump /system/bin/autochmod.sh "enablewifidump"
    class core
    user root
    disabled
    oneshot

service disablewifidump /system/bin/autochmod.sh "disablewifidump"
    class core
    user root
    disabled
    oneshot

service collectwifidmesg /system/bin/autochmod.sh "collectwifidmesg"
    class main
    user system
    group wifi system misc
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
#endif /*VENDOR_EDIT*/

#ifdef VENDOR_EDIT
#Laixin@PSW.CN.WiFi.Basic.Switch.1069763, 2018/09/03, Add for collect wifi switch log
service collectWifiSwitchLog /system/bin/autochmod.sh "collectWifiSwitchLog"
    class main
    user root
    disabled
    seclabel u:r:rutilsdaemon:s0
    oneshot

service packWifiSwitchLog /system/bin/autochmod.sh "packWifiSwitchLog"
    class main
    user root
    disabled
    seclabel u:r:rutilsdaemon:s0
    oneshot

on property:sys.oppo.wifi.switch.log.stop=1
    start packWifiSwitchLog

service mvWifiSwitchLog /system/bin/autochmod.sh "mvWifiSwitchLog"
    class main
    user root
    disabled
    seclabel u:r:rutilsdaemon:s0
    oneshot
#endif /*VENDOR_EDIT*/

#ifdef VENDOR_EDIT
#Xiao.Liang@PSW.CN.WiFi.Basic.SoftAP.1610391, 2018/10/30, Modify for reading client devices name from /data/misc/dhcp/dnsmasq.leases
service changedhcpfolderpermissions /system/bin/autochmod.sh "changedhcpfolderpermissions"
    class main
    user root
    disabled
    oneshot
#endif /* VENDOR_EDIT */

#ifdef VENDOR_EDIT
#Lei.Zhang@PSW.CN.WiFi.Basic.Hardware.1687242, 2018/12/04, Add for change ini file for WiFi roaming test
service switchWiFiIniForRoam /vendor/bin/vendor.autochmod.sh "switchWiFiIniForRoam"
    class main
    user root
    disabled
    seclabel u:r:rutilsdaemon:s0
    oneshot
#endif /* VENDOR_EDIT */

#ifdef VENDOR_EDIT
#Xuefeng.Peng@PSW.AD.Performance.Storage.1721598, 2018/12/26, Add for abnormal sd card shutdown long time
on property:persist.sys.fsck_shutdown=true
   start fsck_shutdown

service fsck_shutdown /system/bin/autochmod.sh "fsck_shutdown"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
#endif/*VENDOR_EDIT*/

#//Canjie.Zheng@AD.OppoFeature.Kinect.1069892,2019/03/09, Add for kill hidl
service killsensorhidl /system/bin/autochmod.sh "killsensorhidl"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot

#ifdef VENDOR_EDIT
#Bin.Li@BSP.Fingerprint.Secure 2018/12/27, Add for oae get bootmode
service oae_boot_mode /system/bin/autochmod.sh "oae_bootmode"
    class main
    user root
    seclabel u:r:rutilsdaemon:s0
    oneshot
#endif /* VENDOR_EDIT */

#endif /* VENDOR_EDIT */

#ifdef VENDOR_EDIT
#Fangfang.Hui@PSW.TECH.AD.OppoDebug.LogKit.1078692, 2019/03/07, Add for mount mnt/vendor/opporeserve/stamp to data/oppo/log/stamp
service remount_stamp /system/bin/autochmod.sh "remount_opporeserve2_stamp_to_data"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
#endif /* VENDOR_EDIT */

#add for oidt begin
service oidtlogs /system/bin/autochmod.sh "oidtlogs"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
#add for oidt end

#ifdef VENDOR_EDIT
#ifdef PHOENIX_PROJECT
on post-fs
    write /proc/phoenix "SET_BOOTSTAGE@NATIVE_INIT_POST_FS"
#endif /* PHOENIX_PROJECT */
#endif /* VENDOR_EDIT */

#ifdef VENDOR_EDIT
# Kun.Hu@PSW.TECH.RELIABILTY, 2019/1/3, fix the core domain limits to search /mnt/vendor/opporeserve
service remount_opporeserve2 /system/bin/autochmod.sh "remount_opporeserve2"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
on post-fs-data && property:ro.crypto.type=file
# Kun.Hu@PSW.TECH.RELIABILTY, 2019/1/21, add for project phoenix(hang oppo)
    mkdir /mnt/vendor/opporeserve/phoenix 0777 system system
# Kun.Hu@PSW.TECH.RELIABILTY, 2019/1/3, fix the core domain limits to search /mnt/vendor/opporeserve
    start remount_opporeserve2
#Fangfang.Hui@PSW.TECH.AD.OppoDebug.LogKit.1078692, 2019/03/07, Add for mount mnt/vendor/opporeserve/stamp to data/oppo/log/stamp
    start remount_stamp
#endif /* VENDOR_EDIT */

#ifdef VENDOR_EDIT
# Kun.Hu@PSW.TECH.RELIABILTY, 2019/1/21, add for project phoenix(hang oppo)
on property:sys.oppo.phoenix.prepare_log=*
    exec u:r:rutilsdaemon:s0 root root -- /system/bin/oppoBootlogHelper
on property:sys.oppo.phoenix.handle_error=*
    exec  u:r:rutilsdaemon:s0 root root -- /system/bin/phoenix_log_native_helper.sh ${sys.oppo.phoenix.handle_error}
#endif  /* VENDOR_EDIT */

#Liang.Zhang@PSW.TECH.BOOTUP, 2018/10/16, Add for kernel monitor whole bootup
#ifdef HANG_OPPO_ALL
on property:sys.boot_completed=1
    write /proc/opbootcomplete "true"
# Kun.Hu@PSW.TECH.RELIABILTY, 2019/1/21, add for project phoenix(hang oppo)
    setprop sys.oppo.phoenix.prepare_log boot_success

#ifdef VENDOR_EDIT
#Fuchun.Liao@BSP.CHG.Basic 2019/06/09 modify for black/bright screen check
service create_black_bright_check_file /system/bin/autochmod.sh "create_black_bright_check_file"
    class core
    user root
    seclabel u:r:rutilsdaemon:s0
    disabled
    oneshot
	
on post-fs-data && property:ro.crypto.type=file
    mkdir /data/oppo/log/bsp/ 0777 system system
    start create_black_bright_check_file
#endif /* VENDOR_EIDT */