diff --git a/ChangeLog.md b/ChangeLog.md index 3199f61..16f929b 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -20,6 +20,9 @@ * ensure GNU Bash uses our version of the less pager, even if busybox' version is installed * make ls use colors, if possible when in GNU Bash * make grep use colors, if possible when in GNU Bash + * Full packages + * record logcat in /data/adb/logcat/${CURDATE} + * e.g.: /data/adb/logcat/20180208-07.05.18 * Updates (automatic) * XDA Labs (1.1.4b) * (Simple) Calendar (3.2.4) diff --git a/Full/common/service.sh b/Full/common/service.sh index 41f0cd2..eed91da 100644 --- a/Full/common/service.sh +++ b/Full/common/service.sh @@ -6,7 +6,7 @@ MODDIR=${0%/*} # Create private Log directory LOGDIR="${MODDIR}"/.logs -[[ ! -d ${LOGDIR} ]] && mkdir "${LOGDIR}" +[[ ! -d ${LOGDIR} ]] && mkdir -p "${LOGDIR}" # Set current date in 20170607-12.07.25 format CURDATE=$(date +%Y%m%d-%I.%M.%S) @@ -17,3 +17,5 @@ for init in fstrim logscleaner sqlite external_sd permissions; do "${MODDIR}/init.d/${init}" | \ tee -a "${LOGDIR}/${init}.log.${CURDATE}" & done + +"${MODDIR}/init.d/logcat" diff --git a/Full/nanodroid-functions b/Full/nanodroid-functions index 1b8a9e0..4da8b94 100644 --- a/Full/nanodroid-functions +++ b/Full/nanodroid-functions @@ -662,7 +662,7 @@ install_initd () { set_perm_bin "${INIT_BASE}" [ "${MODE}" = "SYSTEM" ] && \ - for init in fstrim logscleaner sqlite external_sd; do + for init in fstrim logcat logscleaner sqlite external_sd; do echo "/system/etc/init.d/${init}" \ >> /data/adb/.nanodroid-list done diff --git a/Full/system/etc/init.d/logcat b/Full/system/etc/init.d/logcat new file mode 100755 index 0000000..13795bf --- /dev/null +++ b/Full/system/etc/init.d/logcat @@ -0,0 +1,7 @@ +#!/system/bin/sh + +CURDATE=$(date +%Y%m%d-%I.%M.%S) + +[[ ! -d /data/adb/logcat ]] && mkdir -p /data/adb/logcat + +logcat | tee -a "/data/adb/logcat/${CURDATE}"