diff --git a/device-common.mk b/device-common.mk index a40b2bbeb..602565755 100755 --- a/device-common.mk +++ b/device-common.mk @@ -197,6 +197,18 @@ PRODUCT_PACKAGES += \ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.fingerprint.xml:system/etc/permissions/android.hardware.fingerprint.xml +# Modem debugger +ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) +PRODUCT_PACKAGES += \ + QXDMLogger + +PRODUCT_COPY_FILES += \ + device/google/marlin/init.common.diag.rc.userdebug:root/init.common.diag.rc +else +PRODUCT_COPY_FILES += \ + device/google/marlin/init.common.diag.rc.user:root/init.common.diag.rc +endif + $(call inherit-product-if-exists, hardware/qcom/msm8996/msm8996.mk) $(call inherit-product-if-exists, vendor/qcom/gpu/msm8996/msm8996-gpu-vendor.mk) diff --git a/init.common.diag.rc.user b/init.common.diag.rc.user new file mode 100755 index 000000000..65f6a3bf2 --- /dev/null +++ b/init.common.diag.rc.user @@ -0,0 +1,4 @@ +# This file gets copied as /init.common.diag.rc + +on property:ro.boot.mode=normal + rm /dev/diag diff --git a/init.common.diag.rc.userdebug b/init.common.diag.rc.userdebug new file mode 100644 index 000000000..039ae70ee --- /dev/null +++ b/init.common.diag.rc.userdebug @@ -0,0 +1,8 @@ +# This file gets copied as /init.common.diag.rc + +on post-fs-data + # Modem logging collection + mkdir /data/diag_logs 0777 system system + +on boot + chmod 666 /dev/diag diff --git a/init.common.rc b/init.common.rc index ce5721e00..24e97700c 100644 --- a/init.common.rc +++ b/init.common.rc @@ -29,6 +29,7 @@ import init.${ro.hardware}.nanohub.rc import init.qcom.rc +import init.angler.diag.rc on early-init mkdir /firmware 0771 system system