1# SJTAG
2on init
3    chown system system /sys/devices/platform/sjtag_ap/interface/access_lvl
4    chown system system /sys/devices/platform/sjtag_ap/interface/auth
5    chown system system /sys/devices/platform/sjtag_ap/interface/begin
6    chown system system /sys/devices/platform/sjtag_ap/interface/dbg_domain
7    chown system system /sys/devices/platform/sjtag_ap/interface/dbg_itvl
8    chown system system /sys/devices/platform/sjtag_ap/interface/end
9    chown system system /sys/devices/platform/sjtag_ap/interface/pubkey
10    chown system system /sys/devices/platform/sjtag_gsa/interface/access_lvl
11    chown system system /sys/devices/platform/sjtag_gsa/interface/auth
12    chown system system /sys/devices/platform/sjtag_gsa/interface/begin
13    chown system system /sys/devices/platform/sjtag_gsa/interface/dbg_domain
14    chown system system /sys/devices/platform/sjtag_gsa/interface/dbg_itvl
15    chown system system /sys/devices/platform/sjtag_gsa/interface/end
16    chown system system /sys/devices/platform/sjtag_gsa/interface/pubkey
17
18on property:vendor.debug.ramdump.force_crash=true
19    write /sys/kernel/pixel_debug/trigger "null"
20
21on property:power.battery_input.suspended=true
22   write /sys/kernel/debug/google_charger/input_suspend 1
23
24on property:power.battery_input.suspended=false
25   write /sys/kernel/debug/google_charger/input_suspend 0
26
27# Bluetooth
28on post-fs-data
29    chown bluetooth system /dev/logbuffer_btlpm
30    chown bluetooth system /dev/logbuffer_tty18
31
32# pKVM performance is different on A0 and B0 chips.
33# Add extra tag to metrics collected on A0 to separate the results.
34on property:ro.revision=PROTO1.0
35    setprop debug.hypervisor.metrics_tag "hwrev_a0"
36on property:ro.revision=PROTO1.1
37    setprop debug.hypervisor.metrics_tag "hwrev_a0"
38on property:ro.revision=EVT1.0
39    setprop debug.hypervisor.metrics_tag "hwrev_a0"
40
41# A0 chips require pKVM for a hardware issue workaround. Set pKVM to 'enabled'
42# in /misc partition on first boot to signal to tests that this device should
43# not be booted with pKVM disabled.
44service vendor.force_pkvm /vendor/bin/misc_writer --set-enable-pkvm
45    disabled
46    oneshot
47on property:persist.sys.device_provisioned=1 && property:ro.revision=PROTO1.0
48    start vendor.force_pkvm
49on property:persist.sys.device_provisioned=1 && property:ro.revision=PROTO1.1
50    start vendor.force_pkvm
51on property:persist.sys.device_provisioned=1 && property:ro.revision=EVT1.0
52    start vendor.force_pkvm
53