##################################################################################
### VENDOR_EDIT, OEM All rights reserved.
###
### File: - init.oem.debug.rc
###
### ------------------------------- Revision History: ----------------------------
### <author>                        <data>       <version>   <desc>
### ------------------------------------------------------------------------------
##################################################################################


##################################  Trigger Point Begin ###########################################
on late-init
    write /proc/sys/kernel/hung_task_timeout_secs 60
    write /proc/sys/kernel/hung_task_selective_monitoring 0

on property:persist.vendor.enable.powerkey.dump=1
    write /sys/module/qpnp_power_on/parameters/long_pwr_dump_enabled  1

on property:persist.vendor.enable.powerkey.dump=0
    write /sys/module/qpnp_power_on/parameters/long_pwr_dump_enabled  0

on property:vendor.sys.oem.long_pwr_dump=1
    write /sys/module/qpnp_power_on/parameters/pwr_dump_enabled 1

on property:vendor.sys.oem.long_pwr_dump=0
    write /sys/module/qpnp_power_on/parameters/pwr_dump_enabled 0

on property:vendor.sys.oem.long_debug_suspend=1
    write /d/clk/debug_suspend 1

on property:vendor.sys.oem.long_debug_suspend=0
    write /d/clk/debug_suspend 0

on property:persist.vendor.oem.dump=1 && property:persist.vendor.oem.ssrdump=0
    write /sys/module/msm_poweroff/parameters/download_mode 1
    write /sys/kernel/dload/dload_mode full
    write /sys/kernel/dload/emmc_dload 0
    write /proc/otrace_on 7978
    write /proc/restart_level_all 1
    write /proc/sys/kernel/printk "4 6 1 7"
    setprop persist.vendor.oem.pmsg.enable 1

on property:persist.vendor.oem.dump=0 && property:persist.vendor.oem.ssrdump=0
    write /sys/module/msm_poweroff/parameters/download_mode 1
    write /sys/kernel/dload/dload_mode mini
    write /sys/kernel/dload/emmc_dload 1
    write /proc/otrace_on 0
    write /proc/restart_level_all 0
    write /proc/sys/kernel/printk "1 6 1 7"
    setprop persist.vendor.oem.pmsg.enable 0

on property:persist.vendor.oem.dump=0 && property:persist.vendor.oem.ssrdump=1
    write /sys/module/msm_poweroff/parameters/download_mode 1
    write /sys/kernel/dload/dload_mode full
    write /sys/kernel/dload/emmc_dload 0
    write /proc/otrace_on 7978
    write /proc/restart_level_all 0
    write /proc/sys/kernel/printk "4 6 1 7"
    setprop persist.vendor.oem.pmsg.enable 0


on property:persist.vendor.oem.twice.modemdump=1
    write /sys/kernel/dload/oem_modemdump twice

on property:persist.vendor.oem.twice.modemdump=0
    write /sys/kernel/dload/oem_modemdump fusion

on property:vendor.oem.enroll.index=*
    exec_background - root root -- /system_ext/bin/oem_on_gatekeeper_change.sh enroll
    exec_background - root root -- /system_ext/bin/oem_back_up_sec.sh enroll

on property:vendor.oem.verify.pass.index=*
    exec_background - root root -- /system_ext/bin/oem_on_gatekeeper_change.sh pass
    exec_background - root root -- /system_ext/bin/oem_back_up_sec.sh pass

on property:vendor.oem.verify.fail.index=*
    exec_background - root root -- /system_ext/bin/oem_on_gatekeeper_change.sh fail
    exec_background - root root -- /system_ext/bin/oem_back_up_sec.sh fail
