summaryrefstree
path: root/system/init.rtd288o.rc
blob: 2920c7d09a432bd05976be9fd13e066b1dab027c (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
#
# Copyright 2014 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import init.rtd288o.usb.rc
#import init.intel.tools.rc
import init.rtd288o.diag.rc

# ifndef VENDOR_EDIT
# mengran.chen@tcl.com, 2021/09/08, modify cpuset config
import init.rtd288o.performance.rc
# endif /* VENDOR_EDIT */

on early-init
    mount debugfs debugfs /sys/kernel/debug mode=0755


on init
    ##ifdef VENDOR_EDIT

    # huopinghua@googleATV ,add var tmpfs
    mkdir /var 0775 system system
    mount tmpfs tmpfs /var mode=0775,gid=1000
    mkdir /var/tmp 0775 system system
    mkdir /var/tmp/bml 0775 system system
    symlink /var/tmp /tmp

    #create /var/tmp/media for camera/ve/dwin
    mkdir /var/tmp/media 0775 media media
    mkdir /var/tmp/hwc 0775 system system
    mkdir /var/tmp/providers.media 0775 system sdcard_rw

    write /var/tmp/shop_solution_v2 1
    chmod 0770 /var/tmp/shop_solution_v2
    ##endif

    # Android creates by-name disk links with the disk controller
    # in the generated path, so that the names pulled out of the GPT
    # can be associated with the correct disk. Create a shortcut to
    # /dev/block/by-name so that we can use the same fstabs everywhere.
    symlink /dev/block/pci/pci0000:00/0000:00:01.0/by-name /dev/block/by-name

    symlink /sdcard /storage/sdcard0

    # ZRAM options
    write /sys/block/zram0/comp_algorithm zacc
    write /sys/block/zram0/max_comp_streams 2

    # KSM options
    #write /sys/kernel/mm/ksm/pages_to_scan 100
    #write /sys/kernel/mm/ksm/sleep_millisecs 500
    #write /sys/kernel/mm/ksm/run 1

    #  Mount the sep filesystem
    mount sepfs sepfs /sys/fs/sepfs

    chmod 0666 /sys/realtek_boards/reclaim_dvr
    chmod 0000 /sys/bus/platform/devices/18010800.emmc/em_open_log
    chmod 0666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    chmod 0666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
    chmod 0666 /sys/class/rtk-pwm/pwm-I-1/duty
    chmod 0666 /sys/class/rtk-pwm/pwm-I-1/apply
    chown system system /sys/power/pm_userresume
    chmod 0660 /sys/power/pm_userresume
    chmod 0440 /proc/cmdline

    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_clr_pm_task
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_clr_share_mem
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_get_rec_time
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_get_sleep_dur
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_get_wakeup_source
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_get_wakeup_status
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_set_RTC
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_set_STM
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_set_WOL
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_set_WOWLAN
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_set_cur_time
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_set_sharemem
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_set_sharemem_mask
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_setup_cec
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_setup_irda
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_setup_irda_in_code
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_setup_keypad_multi
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_setup_mhl
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_setup_power_en
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_setup_power_en_in_name
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_setup_ppsource
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_setup_uart
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_setup_wakeup_min
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_setup_wakeup_sec
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_setup_wakeup_timer
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_setup_wakeup_timer1
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_show_help
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_show_share_mem
    #chmod 0664 /sys/devices/virtual/misc/emcu_kdv/emcu_show_version


    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_clr_pm_task
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_clr_share_mem
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_get_rec_time
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_get_sleep_dur
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_get_wakeup_source
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_get_wakeup_status
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_set_RTC
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_set_STM
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_set_WOL
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_set_WOWLAN
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_set_cur_time
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_set_sharemem
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_set_sharemem_mask
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_setup_cec
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_setup_irda
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_setup_irda_in_code
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_setup_keypad_multi
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_setup_mhl
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_setup_power_en
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_setup_power_en_in_name
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_setup_ppsource
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_setup_uart
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_setup_wakeup_min
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_setup_wakeup_sec
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_setup_wakeup_timer
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_setup_wakeup_timer1
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_show_help
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_show_share_mem
    chown system media /sys/devices/virtual/misc/emcu_kdv/emcu_show_version


    chmod 0640         /sys/class/input/input_intercept_add_event
    chmod 0640         /sys/class/input/input_intercept_remove_event
    chmod 0640         /sys/class/input/input_event_gen
    chown system media /sys/class/input/input_intercept_add_event
    chown system media /sys/class/input/input_intercept_remove_event
    chown system media /sys/class/input/input_event_gen

    # virtual IR mouse
    chmod 0660 /sys/venus_ir/ir_to_mouse
    chown system media /sys/venus_ir/ir_to_mouse

    # ir intercept key
    chmod 0660         /sys/venus_ir/ir_set_intercept_key
    chown system media /sys/venus_ir/ir_set_intercept_key

    chmod 0660         /sys/venus_ir/ir_gen_keycode
    chown system media /sys/venus_ir/ir_gen_keycode
    #chmod 0664         /sys/venus_ir/ir_irda_key_decode_on_off
    #chown system media /sys/venus_ir/ir_irda_key_decode_on_off

    # ifdef VENDOR_EDIT
    # jiajun.xu@ARCH, 2020/12/09. add for block io to long
    write /proc/sys/vm/lowmem_reserve_ratio "40 1024"
    # endif

    symlink /vendor/tvos /tvos

    # Create UDS structure for base VR services.
    mkdir /dev/socket/pdx 0775 system system
    mkdir /dev/socket/pdx/system 0775 system system
    mkdir /dev/socket/pdx/system/buffer_hub 0775 system system
    mkdir /dev/socket/pdx/system/performance 0775 system system
    mkdir /dev/socket/pdx/system/vr 0775 system system
    mkdir /dev/socket/pdx/system/vr/display 0775 system system
    mkdir /dev/socket/pdx/system/vr/pose 0775 system system
    mkdir /dev/socket/pdx/system/vr/sensors 0775 system system

	chmod 666 /dev/tshmem
	
	chmod 0750 /rtdata
	
    start console

on fs
    mkdir /logs 0770 system log
    mkdir /factory 0775 system system

    mount_all ./fstab.rtd288o
    restorecon_recursive /factory
    chmod 0666 /dev/rtd-logger 
    # gaoyunpei add for shop reset                               
    #start tcl_shop_reset

on early-boot
    # set RLIMIT_MEMLOCK to 64MB
    setrlimit 8 67108864 67108864

on boot
    # Assign TCP buffer thresholds to be ceiling value of technology maximums
    # Increased technology maximums should be reflected here.
    write /proc/sys/net/core/rmem_max  1500000
    write /proc/sys/net/core/wmem_max  1500000
    write /proc/sys/net/ipv4/tcp_limit_output_bytes 1500000
    setprop net.tcp.buffersize.wifi 500000,1000000,1500000,500000,1000000,1500000

    chown system system /sys/class/backlight/psb-bl/brightness
    chown system system /sys/class/backlight/psb-bl/max_brightness
    chown system system /sys/class/backlight/psb-bl/actual_brightness
    chmod 0660 /sys/class/backlight/psb-bl/brightness
    chmod 0660 /sys/class/backlight/psb-bl/max_brightness
    chmod 0660 /sys/class/backlight/psb-bl/actual_brightness

    # Wifi
    setprop wifi.interface wlan0
    # Set correct country code
    exec - root root system -- /system/bin/init.rtd288o.countrycode.sh

    # Wifi firmware reload path
    chown wifi wifi /sys/module/bcmdhd/parameters/firmware_path

    # bluetooth
    # change back to bluetooth from system
    chown bluetooth net_bt_admin /data/misc/bluetooth
    mkdir /data/misc/bluedroid 0770 bluetooth net_bt_admin
    mkdir /vendor/etc/bluetooth 0770 bluetooth net_bt_admin
    # bluetooth LPM
    chown bluetooth net_bt_admin /proc/bluetooth/sleep/lpm
    chown bluetooth net_bt_admin /proc/bluetooth/sleep/btwrite

    #enable USB
    write /proc/usercalls 1

    #USB device
    chmod 0660 /dev/rtkbt_dev
    chown bluetooth net_bt_admin /dev/rtkbt_dev

    #fusion device
    #insmod /lib/modules/4.4.3+/kernel/drivers/char/fusion.ko
    #insmod /vendor/lib/modules/fusion.ko

    #tcl_sim_kb, move to vendor.init.rtd288o.rc
    #insmod /vendor/lib/modules/tcl_sim_kb.ko
    #insmod /vendor/lib/modules/tcl_sim_tp.ko
	
    # rfkill
    chmod 0660 /sys/class/rfkill/rfkill0/state
    chmod 0660 /sys/class/rfkill/rfkill0/type
    chown bluetooth net_bt_admin /sys/class/rfkill/rfkill0/state
    chown bluetooth net_bt_admin /sys/class/rfkill/rfkill0/type

    # bluetooth MAC address programming
    chown bluetooth net_bt_admin ro.bt.bdaddr_path
    chown bluetooth net_bt_admin /system/etc/bluetooth
    chown bluetooth net_bt_admin /vendor/etc/bluetooth
    setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr"

    # ifndef VENDOR_EDIT
    # jiangfei.lu@tcl.com, 2020/12/14, remove it to system/core/rootdir/init.rc
    # add for fota
    # mkdir /data/fota 0777
    # endif /* VENDOR_EDIT */

    # ifndef VENDOR_EDIT
    # mengran.chen@tcl.com, 2021/03/09, add for whitelist_ui
    mkdir /data/whitelist_ui 0770 system system
    # endif /* VENDOR_EDIT */

    #begin RT2851MGLOBAL-40 tansen fix outer permission for security 20201225
    chown system system /data/outer
    mkdir /data/outer 0770
    #end
    #add for userdata/epg RAM
    mkdir /userdata  0770 system system
    mkdir  /userdata/epg 0770 system system
    mount tmpfs tmpfs /userdata/epg size=64M,mode=0770
    write /userdata/epg/EpgData.db 0
    chmod 0660 /userdata/epg/EpgData.db
    restorecon_recursive /userdata/epg


    # ifndef VENDOR_EDIT
    # fei.bai@tcl.com, 2020/09/14, add userdata selinux
    restorecon /userdata
    restorecon /rtdata
    # endif /* VENDOR_EDIT */
	
    # ifndef VENDOR_EDIT
    # wjx add fslib 	
    mkdir /persist/fsdtf  0777 system system		
    mkdir /persist/fsdtf/servicelist  0777 system system
    # endif /* VENDOR_EDIT */
	
    service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
    disabled
    oneshot
    service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG
    disabled
    oneshot
    service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG
    disabled
    oneshot
    service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG
    disabled
    oneshot
    service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG
    disabled
    oneshot
    service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL
    class main
    disabled
    oneshot
    service iprenew_bt-pan /system/bin/dhcpcd -n
    class main
    disabled
    oneshot


on post-fs

    #adjust some parameter -rtk
    write /sys/module/kernel/parameters/alignment 3

    # Performance tweaks for interactive governor
    chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
    chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
    chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
    chown system system /sys/devices/system/cpu/cpufreq/interactive/touchboostpulse
    chown system system /sys/devices/system/cpu/cpufreq/interactive/touchboostpulse_duration
    chown system system /sys/devices/system/cpu/cpufreq/interactive/touchboost_freq
    chmod 0220 /sys/devices/system/cpu/cpufreq/interactive/touchboostpulse
    chmod 0220 /sys/devices/system/cpu/cpufreq/interactive/boostpulse
    # jiajun4.xu@arch add for kswapd run
    write /proc/sys/vm/min_free_kbytes 2093
    write /proc/sys/vm/watermark_scale_factor 105
    write /proc/sys/vm/extra_free_kbytes 21300

    # Tune interactive governor parameters for Android TV UI animations
    write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 4000
    write /sys/devices/system/cpu/cpufreq/interactive/timer_slack 16000
    write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 90
    write /sys/devices/system/cpu/cpufreq/interactive/target_loads 70
    write /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration 800000

    # SEP
    copy /system/etc/security/sep_policy.conf /sys/fs/sepfs/load
    chown system system /dev/dx_sep_q0
    chmod 0666 /dev/dx_sep_q0

    # hdmi cec
    chown system system /sys/module/drm_intel_mid/parameters/hdmi_state
    chmod 0440 /sys/module/drm_intel_mid/parameters/hdmi_state
    chown system system /sys/module/drm_intel_mid/parameters/hdmi_edid_src_phy_addr
    chmod 0440 /sys/module/drm_intel_mid/parameters/hdmi_edid_src_phy_addr

    #start tcl_shop_reset

on post-fs-data
    # Create the directories used by the Wireless subsystem
    mkdir /data/misc/wifi 0770 wifi wifi
    mkdir /data/misc/wifi/sockets 0770 wifi wifi
    mkdir /data/misc/dhcp 0770 dhcp system

    # Create directory used by audio subsystem
    mkdir /data/misc/audio 0770 audio audio

    mkdir /data/system 0775 system system

    setprop vold.post_fs_data_done 1

    setprop init.post_fs_data.bootreason ${ro.boot.bootreason}

    # itux
    # Set this property to enable Thermal service
    setprop persist.service.thermal 1
    # Properties for Thermal Service
    setprop persist.thermal.turbo.dynamic 1
    setprop ro.thermal.ituxversion 3.0
    setprop persist.thermal.shutdown.msg 0
    setprop persist.thermal.shutdown.vibra 0
    setprop persist.thermal.shutdown.tone 0
    chown system system /sys/module/intel_mid_osip/parameters/force_shutdown_occured
    chown system system /sys/module/intel_mid_osip/parameters/thermal_shutdown_occured
    chown system system /sys/devices/platform/coretemp.0/temp2_threshold1
    chown system system /sys/devices/platform/coretemp.0/temp2_threshold2
    chown system system /sys/devices/virtual/thermal/thermal_zone6/emul_temp
    chown system system /sys/devices/virtual/thermal/thermal_zone7/emul_temp

    # Stop led blinking and reduce brightness
    write /sys/class/leds/white/device/led_lighting_effect 1
    write /sys/class/leds/white/brightness 0

    # Playready
    mkdir /data/mediadrm/playready/ 0770 mediadrm mediadrm
    copy  /system/vendor/firmware/PR-ModelCert /data/mediadrm/playready/bgroupcert.dat
    chown mediadrm mediadrm /data/mediadrm/playready/bgroupcert.dat
    chmod 0440 /data/mediadrm/playready/bgroupcert.dat

    # realtek saved data directory
    mkdir /data/vendor/realtek 0770 system media
    mkdir /data/vendor/realtek/databases 0770 media media
    mkdir /data/vendor/realtek/satellite 0770 media media

    mkdir /data/ad  0770
    chown system system /data/ad

    #ifndef VENDOR_EDIT
    #shaochun.wan@android, 2020/11/24 add the P mode for shop reset
    start tcl_shop_reset
    #endif / VENDOR_EDIT */
    
    #ifndef VENDOR_EDIT
    #chuanming.huang@tcl.com, 2021/12/10, add for disable vulkan in rt51m
    setprop debug.hwui.use_vulkan false
    # endif /* VENDOR_EDIT */


on property:init.post_fs_data.bootreason=panic
    # Create dump dir and collect dumps. (use the same location as in init.rc)
    mkdir /data/dontpanic 0750 root log

    copy /proc/emmc_ipanic_console /data/dontpanic/ipanic_console
    chown root log /data/dontpanic/ipanic_console
    chmod 0640 /data/dontpanic/ipanic_console

    copy /proc/emmc_ipanic_threads /data/dontpanic/ipanic_threads
    chown root log /data/dontpanic/ipanic_threads
    chmod 0640 /data/dontpanic/ipanic_threads

    copy /proc/emmc_ipanic_gbuffer /data/dontpanic/ipanic_gbuffer
    chown root log /data/dontpanic/ipanic_gbuffer
    chmod 0640 /data/dontpanic/ipanic_gbuffer

    # Clear panic partition
    write /proc/emmc_ipanic_header 1

service pvrsrvctl /vendor/bin/pvrsrvctl --start
    class core
    user root
    group root
    oneshot
    disabled
    seclabel u:r:vendor_modprobe:s0

service icVerifyd /system/bin/icVerifyd
    class    main
    oneshot

# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/dumpstate -d -p -B -z \
        -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
    class main
    disabled
    oneshot
    keycodes 114 115 116

# interval:60s margin:20s
service watchdogd /sbin/watchdogd 60 20
    class core
    oneshot
    seclabel u:r:watchdogd:s0

 # TCL sitatvservice
 #service tcl_sitatvservice /vendor/bin/sh /vendor/tvos/bin/run.sh
 #   class main
 #   user system
 #   group system
 #   oneshot
 #   seclabel u:r:tcl_sitatvservice:s0

	#do burn key
service burnkey_init /vendor/bin/rtk_burn_key
    class late_start
    user root
    group system drmrpc
	oneshot

# daemon runs before shutdown
service shutdownd /vendor/bin/shutdownd
    user system
    oneshot
    group system

on property:system.rtk.shutdown_start=1
    start shutdownd

# Reset the watchdog counter once boot is completed
on property:sys.boot_completed=1
    restorecon /persist/PersistData.db
    write /sys/devices/virtual/misc/watchdog/counter "0"

# Enable native bridge for target executables
on early-init
    mount binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc

on property:ro.enable.native.bridge.exec=1
    copy /system/etc/binfmt_misc/arm_exe /proc/sys/fs/binfmt_misc/register
    copy /system/etc/binfmt_misc/arm_dyn /proc/sys/fs/binfmt_misc/register

on property:sys.boot_completed=1
    #start tcl_boot_broadcast
    swapon_all ./fstab.rtd288o

    #release boot logo memory
#    write /sys/realtek_boards/reclaim_dvr 1
#    write /sys/realtek_boards/reclaim_dvr 2

    #disable console dmesg
    write /proc/sys/kernel/printk "0 4 1 7"

    #enable more key
    #write /sys/venus_ir/ir_is_upload_more_key 1

#on property:sys.tcl.shop_reset=1
#    start tcl_shop_reset

on property:sys.tcl.rc_unconnected=1
    start tcl_rcunconnected_start

#tm4.0 service
service tmmgr /system/bin/tmmgr
	class main
	user root
	group root
	seclabel u:r:tmmgr:s0

#add for set ro.oem.key1
service setoemkey1 /product/bin/oemkey1
	class main
	user root
	group root
	oneshot
	seclabel u:r:tmmgr:s0
	
# add for tcl boot broadcast.
service tcl_boot_broadcast /product/bin/tcl_boot_broadcast.sh
    class main
    oneshot
    user root
    group root
    seclabel u:r:vold:s0

service tcl_shop_reset /system/bin/sh  /product/bin/tcl_shop_reset.sh
    oneshot
    disabled
    seclabel u:r:tmmgr:s0

service tcl_rcunconnected_start /system/bin/sh /product/bin/tcl_rcunconnected_broadcast.sh
    oneshot
    disabled
    seclabel u:r:tmmgr:s0
	
service tcl_wow_priv   /system/bin/sh /product/bin/tcl_wow_priv_cmd.sh
    oneshot
    disabled
    seclabel u:r:tmmgr:s0
	
on property:sys.tcl.rt51m_miracast.flag=*
   write /sys/class/net/${sys.tcl.rt51m_miracast.flag}/queues/rx-0/rps_cpus 1
   write /sys/class/net/${sys.tcl.rt51m_miracast.flag}/queues/rx-0/rps_flow_cnt 32768
   write /proc/sys/net/core/rps_sock_flow_entries 32768
   

on property:sys.enable_key=true
    write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
    write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor ondemand
    write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor ondemand
    write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor ondemand

# histreamingservice service
on property:sys.boot_completed=1
    start histreamingservice

service histreamingservice /system/bin/histreamingservice
    class main
    user root
    group root system camera
    disabled

on property:sys.tcl.videocall=true
   write /data/vendor/voice_ap_idle.prop ok

on property:sys.tcl.videocall=false
    rm /data/vendor/voice_ap_idle.prop