-
Notifications
You must be signed in to change notification settings - Fork 4
/
logcat.sh
executable file
·24 lines (18 loc) · 929 Bytes
/
logcat.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# Android LogCat Wrapper
avd="unknown"
test -z "$1" && avd="android"
pcapdir="../pcap"
logdir="../logs"
pcapfile="${pcapdir}/${avd}.$$.${RANDOM}.pcap"
logfile="${logdir}/${avd}.$$.${RANDOM}.logcat"
ignore='SFPerfTracer|TraceEventNetworkController|dalvikvm|WifiStateMachine|WifiP2pService|wpa_supplicant|qdhwcomposer|CydiaSubstrate|AlarmManager|MDMCTBK|ConnectivityService|Nat464Xlat|ModemStatsDSDetect|audio_hw_primary|audio_hw_extn|msm8974_platfor|Laser|NetworkController|Adreno-EGL|WifiService|BluetoothManagerService|BluetoothAdapter|Trace|SFPerfTracer'
test -d ${pcapdir} || mkdir -p ${pcapdir}
test -d ${logdir} || mkdir -p ${logdir}
ps aux | grep -q "adb logcat" && {
echo "[*] CARE logcat already running"
}
echo "adb logcat >> ${logfile} 2>&1 &"
echo "tail -f ${logfile} | egrep -h -v "$ignore" | logcat-colorize"
#| egrep 'dreamteam|chromium|Console|INFO:CONSOLE|System.out' \