From 974850dca4ba166feee93696020158bd55434fb8 Mon Sep 17 00:00:00 2001 From: Shawn Yang Date: Fri, 24 Mar 2017 14:50:19 -0700 Subject: [PATCH] Change init.logging.rc sequence and modify SMLoging location -Load blank init.logging.rc for user build -Start SMLoging after PerMgr service running -Change SMLoging location to /vendor/bin Test: Verified in device by manually trigger SMLog Change-Id: I622106e7a8023770bbe5ea4224ce2905c2647768 --- device-common.mk | 6 ++++-- dumpstate/DumpstateDevice.cpp | 2 +- init.logging.rc | 4 ---- init.logging.userdebug.rc | 6 ++++++ 4 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 init.logging.userdebug.rc diff --git a/device-common.mk b/device-common.mk index 6f7dac3..4d12c2f 100644 --- a/device-common.mk +++ b/device-common.mk @@ -31,8 +31,10 @@ PRODUCT_PROPERTY_OVERRIDES += \ ro.radio.log_loc="/data/smlog_dump" PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/init.logging.rc:root/init.$(PRODUCT_HARDWARE).logging.rc \ - $(LOCAL_PATH)/init.common.usb.rc:root/init.$(PRODUCT_HARDWARE).usb.rc + $(LOCAL_PATH)/init.logging.userdebug.rc:root/init.$(PRODUCT_HARDWARE).logging.rc +else +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/init.logging.rc:root/init.$(PRODUCT_HARDWARE).logging.rc endif include device/google/wahoo/device.mk diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index 906107a..9a6fe72 100755 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -53,7 +53,7 @@ static void getModemLogs(int fd) return; } /* Check if smlog_dump tool exist */ - if (!PropertiesHelper::IsUserBuild() && !access("/system/bin/smlog_dump", X_OK)) { + if (!PropertiesHelper::IsUserBuild() && !access("/vendor/bin/smlog_dump", X_OK)) { modemLogsEnabled = android::base::GetBoolProperty(MODEM_LOGGING_SWITCH, false); /* Execute SMLOG DUMP if SMLOG is enabled */ diff --git a/init.logging.rc b/init.logging.rc index dbe6dc0..e69de29 100644 --- a/init.logging.rc +++ b/init.logging.rc @@ -1,4 +0,0 @@ -on property:ro.build.type=userdebug - write /sys/class/uio/uio1/device/rtel/rtel 1 - # SM DUMP logging collection - mkdir /data/smlog_dump 0777 system system diff --git a/init.logging.userdebug.rc b/init.logging.userdebug.rc new file mode 100644 index 0000000..eff86af --- /dev/null +++ b/init.logging.userdebug.rc @@ -0,0 +1,6 @@ +on property:init.svc.per_mgr=running + write /sys/class/uio/uio1/device/rtel/rtel 1 + +on post-fs-data + # SM DUMP logging collection + mkdir /data/smlog_dump 0777 system system