diff --git a/rootdir/Android.mk b/rootdir/Android.mk index cb14082b..79d394f4 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -192,7 +192,7 @@ include $(BUILD_PREBUILT) include $(CLEAR_VARS) LOCAL_MODULE := init.qcom.debug.sh -LOCAL_MODULE_TAGS := optional eng +LOCAL_MODULE_TAGS := debug LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := etc/init.qcom.debug.sh include $(BUILD_PREBUILT) diff --git a/rootdir/etc/init.qcom.post_boot.sh b/rootdir/etc/init.qcom.post_boot.sh index 11998f89..16e9d680 100644 --- a/rootdir/etc/init.qcom.post_boot.sh +++ b/rootdir/etc/init.qcom.post_boot.sh @@ -1195,19 +1195,5 @@ case "$target" in ;; esac -# Enable QDSS agent if QDSS feature is enabled -# on a non-commercial build. This allows QDSS -# debug tracing. -if [ -c /dev/coresight-stm ]; then - build_variant=`getprop ro.build.type` - if [ "$build_variant" != "user" ]; then - # Test: Is agent present? - if [ -f /data/qdss/qdss.agent.sh ]; then - # Then tell agent we just booted - /system/bin/sh /data/qdss/qdss.agent.sh on.boot & - fi - fi -fi - # Start RIDL/LogKit II client #su -c /system/vendor/bin/startRIDL.sh & diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index d74f6db1..d3f900de 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -319,11 +319,6 @@ on property:sys.boot_completed=1 on property:persist.radio.atfwd.start=false stop atfwd -service qcom-debug /system/bin/sh /system/etc/init.qcom.debug.sh - class core - user root - oneshot - on property:radio.atfwd.start=false stop atfwd @@ -963,3 +958,24 @@ on property:sys.wfdservice=enable on property:sys.wfdservice=disable stop wfdservice + +# Coresight early boot service +service cs-early-boot /system/bin/sh /persist/coresight/qdss.agent.sh early-boot /system/etc/init.qcom.debug.sh + class core + user root + oneshot + +# Coresight post boot servive +service cs-post-boot /system/bin/sh /persist/coresight/qdss.agent.sh + user root + disabled + oneshot + +on property:sys.boot_completed=1 + start cs-post-boot + +on property:sys.dbg.coresight.enable=1 + write /persist/coresight/enable 1 + +on property:sys.dbg.coresight.enable=0 + write /persist/coresight/enable 0