1.保存日志:adb logcat -v threadtime > log.txt 或 adb logcat | tee log.txt
2.搜索日志:grep -rE "TAG1|TAG2" temp/log.txt > outlog.txt
3.查看异常日志:adb logcat -v threadtime | grep -iE "AndroidRuntime|FATAL|Exception|System.err|ANR|Crash"
4.清除所有的缓存日志:adb logcat -c 或 adb logcat -c all 或 adb logcat -c main events radio system crash
5.清除应用所有数据:adb shell pm clear packagename
6.查看当前activity:adb shell "dumpsys window | grep mCurrentFcous"
7.查看全部窗口信息:adb shell dumpsys window windows | grep "Window #"
8.查看应用内存:adb shell dumpsys meminfo 'packagename'
9.查看当前线程优先级:
adb shell
ps -A | grep 包名 //根据包名找到pid
top -H -p PID //查看进程PID所有线程的优先级
10.查看手机CPU核数及频率:
adb shell
cd /sys/devices/system/cpu //查看CPU核数
cat cpu0/cpufreq/cpuinfo_max_freq //查看cpu0的频率