File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33# A tool to redact sensitive information from the extremely verbose debug logs of Meow's Debug Assistant.
44# LICENSE: BSD 3-Clause by ThePedroo
55
6+ SAVE_FOLDER=" /data/local/tmp/DebugAssistant"
7+
68log () {
79 echo " $1 "
810 echo " "
911}
1012
11- SAVE_FOLDER=" /data/local/tmp/DebugAssistant"
12- mkdir -p " $SAVE_FOLDER "
13-
1413log " Selecting the latest debug log file..."
1514
1615LATEST_SUFFIX=$( basename $( ls -t " $SAVE_FOLDER /" DebugAssistant* | grep -v " -Redacted" | head -n 1) | grep -oE " (-[0-9]+)?" )
@@ -62,10 +61,10 @@ sed -E \
6261 \
6362 \
6463 " $SAVE_FOLDER /$LATEST " > " $NEW_LOG "
65-
64+ chmod 751 " $NEW_LOG "
6665log " Redacted logs in $NEW_LOG "
6766
6867cp " $NEW_LOG " /sdcard/Download
69- cp " $DMESG_LOG " /sdcard/Download
68+ cp " $DMESG_LOG " /sdcard/Download/DebugAssistant-DMESG.log
7069log " Copied redacted log and matching dmesg to /sdcard/Download..."
7170sleep 3
Original file line number Diff line number Diff line change 55
66SAVE_FOLDER=" /data/local/tmp/DebugAssistant"
77mkdir -p " $SAVE_FOLDER "
8+ chmod 751 " $SAVE_FOLDER "
9+ chown shell:shell " $SAVE_FOLDER "
810
911start_log () {
1012 local suffix=" $1 "
@@ -19,6 +21,7 @@ prepare_file() {
1921 rm " $file_path "
2022 touch " $file_path "
2123 chown shell:shell " $file_path "
24+ chmod 751 " $file_path "
2225}
2326
2427watch_logcat () {
4952fi
5053
5154start_log " $SUFFIX "
55+
You can’t perform that action at this time.
0 commit comments