Android 抓日志的各种命令

getting logcat,radio,events,system,properties,env,dmesg,last_kmsg,ps,cmdline,userdata_check …

adb  logcat -d -v threadtime > logcat.txt  logcat日志
adb  logcat -d -b radio -v threadtime > radio.txt  radio日志
adb  logcat -d -b events -v threadtime > events.txt  events日志
adb  logcat -d -b system -v threadtime > system.txt system日志
adb shell getprop > props.txt   获取属性
adb shell env > env.txt   环境信息
adb shell dmesg > dmesg.txt  消息列表
adb shell cat /proc/last_kmsg > last_kmsg.txt   last_kmsg信息
adb shell ps > ps.txt   进程信息
adb shell ps -t > ps_t.txt  进程信息
adb shell top -n 1 -t > top_t.txt   内存占用信息
adb shell  cat /proc/cmdline > cmdline.txt  进程相关
adb shell ls -lR /data  > userdata_check.txt
adb shell "echo 1 > /proc/sys/kernel/sysrq" 中断
adb shell "echo w > /proc/sysrq-trigger"  
adb shell  dmesg > dmesg_sysrq_blocked_tasks.txt  
adb shell dumpsys power>power.txt  电源信息

getting screenshot …

adb shell screencap -p /sdcard/screenshot.png  截图
adb pull /sdcard/screenshot.png  拉出来
adb shell rm /sdcard/screenshot.png  删除

getting audio log …

adb shell tinymix > tinymix.txt 
adb shell dumpsys media.audio_flinger > audioflinger.log
adb shell cat /sys/kernel/debug/regmap/tasha-slim-pgd/registers > wcd9335_reg.txt
adb shell cat /sys/kernel/debug/regmap/9-0039/registers > max98927_receiver_reg.txt
adb shell cat /sys/kernel/debug/regmap/9-003a/registers > max98927_speaker_reg.txt

getting bugreport

adb shell bugreport > bugreport.txt  bugreport

getting dropbox,anr,tombstones,logd

adb pull /data/system/dropbox dropbox dropbox 日志
adb pull /data/anr anr  anr日志
adbpull /data/tombstones tombstones tombstones日志
adb pull /data/misc/logd logd
adb pull /data/cplc_info cplc
adb pull /sdcard/logs offlinelogs 离线日志

adb pull /sdcard/tcpdump tcpdump

deleting dropbox,anr,tombstones,logd

adb shell rm -rf /data/system/dropbox/*
adb shell rm -rf /data/anr/*
adb shell rm -rf /data/tombstones/*
adb shell rm -rf /data/misc/logd/*
发布了54 篇原创文章 · 获赞 14 · 访问量 6万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 编程工作室 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览