File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Created by: Sujay Davalgi
4+ #
5+ # Displays the kernel logcat in the terminal
6+ # If argument was provided while initiating the command, it will also save the output in a specified file
7+ #
8+ # Usage: ./kernelLogcat.sh [<filename>]
9+ # Arguments (Optional):
10+ # $1 - File name to be saved as.
11+ # No necessary to give the extension, by default it will save as ".txt"
12+ # If, filename is not provided, it will only display the logcat and not save the output to a file
13+
14+ . ./library/mainFunctions.sh
15+ . ./library/textFormatting.sh
16+ . ./library/deviceOperations.sh
17+ . ./library/logFunctions.sh
18+
19+ getDeviceChoice
20+ displaySelectedDevice $deviceSerial
21+
22+ if [ $( isAdbDevice $deviceSerial ) == " true" ]; then
23+ if [ $# -lt 1 ]; then
24+ adb -s $deviceSerial logcat -v threadtime
25+ else
26+ fileName=" ` echo $( getFormatedFileName $deviceSerial " $1 " ) ` "
27+ echo -e " Your file will be saved in folder : ${myLogs} as : ${fileName} -logcat.txt \n"
28+ saveKernelLogcat $deviceSerial ${fileName}
29+ fi
30+ else
31+ echo " Device is not in 'adb' mode"
32+ fi
You can’t perform that action at this time.
0 commit comments