mirror of
https://gitlab.com/Nanolx/NanoDroid
synced 2024-11-02 03:40:13 +00:00
add logcat init script
This commit is contained in:
parent
b64ea3e7a0
commit
bc7d77613d
@ -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)
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
7
Full/system/etc/init.d/logcat
Executable file
7
Full/system/etc/init.d/logcat
Executable file
@ -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}"
|
Loading…
Reference in New Issue
Block a user