Created
June 16, 2018 03:53
-
-
Save brianjmurrell/ed364a58dd6e25ac5195ce5d72f4ecc4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/device/lge/g3-common/rootdir/etc/init.g3.rc b/device/lge/g3-common/rootdir/etc/init.g3.rc | |
index b19e30f..d9e6b84 100644 | |
--- a/device/lge/g3-common/rootdir/etc/init.g3.rc | |
+++ b/device/lge/g3-common/rootdir/etc/init.g3.rc | |
@@ -507,3 +507,8 @@ on property:sys.boot_completed=1 | |
write /sys/module/lowmemorykiller/parameters/minfree "14746,18432,22118,25805,33038,41988" | |
start baseband-sh | |
+ | |
+service loggy /system/bin/sh /loggy.sh | |
+ class main | |
+ user root | |
+ oneshot | |
diff --git a/device/lge/g3-common/rootdir/etc/loggy.sh b/device/lge/g3-common/rootdir/etc/loggy.sh | |
index e69de29..2e2d510 100644 | |
--- a/device/lge/g3-common/rootdir/etc/loggy.sh | |
+++ b/device/lge/g3-common/rootdir/etc/loggy.sh | |
@@ -0,0 +1,6 @@ | |
+#!/bin/sh | |
+# loggy.sh. | |
+ | |
+_date=`date +%F_%H-%M-%S` | |
+logcat -v time -f /cache/logcat_${_date}.txt | |
+cat /proc/kmsg > /cache/kmsg_${_date}.txt | |
diff --git a/device/lge/g3-common/rootdir/Android.mk b/device/lge/g3-common/rootdir/Android.mk | |
index 368d988..c29b927 100644 | |
--- a/device/lge/g3-common/rootdir/Android.mk | |
+++ b/device/lge/g3-common/rootdir/Android.mk | |
@@ -73,3 +73,13 @@ LOCAL_MODULE_CLASS := ETC | |
LOCAL_SRC_FILES := etc/ueventd.g3.rc | |
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) | |
include $(BUILD_PREBUILT) | |
+ | |
+# testing for logs | |
+include $(CLEAR_VARS) | |
+LOCAL_MODULE := loggy.sh | |
+LOCAL_MODULE_TAGS := optional eng | |
+LOCAL_MODULE_CLASS := ETC | |
+LOCAL_SRC_FILES := etc/loggy.sh | |
+LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) | |
+include $(BUILD_PREBUILT) | |
+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment