diff --git a/msm8996.mk b/msm8996.mk index c5ab060..35dd2e5 100755 --- a/msm8996.mk +++ b/msm8996.mk @@ -72,6 +72,10 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/public.libraries.txt:$(TARGET_COPY_OUT_VENDOR)/etc/public.libraries.txt +# loggy +PRODUCT_PACKAGES += \ + loggy.sh + # ANT+ PRODUCT_PACKAGES += \ AntHalService \ diff --git a/rootdir/Android.mk b/rootdir/Android.mk index 8791b00..9cace3f 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -132,3 +132,12 @@ LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := etc/wifi_sec.rc LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init include $(BUILD_PREBUILT) + +# testing for logs +include $(CLEAR_VARS) +LOCAL_MODULE := loggy.sh +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := ETC +LOCAL_SRC_FILES := bin/loggy.sh +LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES) +include $(BUILD_PREBUILT) diff --git a/rootdir/bin/loggy.sh b/rootdir/bin/loggy.sh new file mode 100644 index 0000000..487bbac --- /dev/null +++ b/rootdir/bin/loggy.sh @@ -0,0 +1,6 @@ +#!/system/bin/sh +# loggy.sh. + +_date=`date +%F_%H-%M-%S` +logcat -b all -v time -f /cache/logcat_${_date}.txt & +dmesg -w > /cache/kmsg_${_date}.txt diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc index 6a1e222..fc1a9b5 100644 --- a/rootdir/etc/init.target.rc +++ b/rootdir/etc/init.target.rc @@ -183,6 +183,11 @@ on boot write /sys/module/g_android/parameters/mtp_rx_req_len 131072 write /sys/class/android_usb/android0/f_rndis_qc/rndis_transports BAM2BAM_IPA +service loggy /vendor/bin/loggy.sh + class core + user root + oneshot + #start camera server as daemon service qcamerasvr /vendor/bin/mm-qcamera-daemon class late_start