Android系统稳定性Log分析

各种常见问题:

1、应用冻结/崩溃

App这里问题比较常见,表现的现象为ANR、Crash、OOM等情况,可以通过Log日志分析:

1.捕获通用日志
logcat log (main, system, event, radio)

2.抓取内核日志(Dmesg/kernel logs)
adb shell  " cat /proc/kmsg "  或者 adb shell dmesg

3.获取系统ANR日志(Trace file /data/anr) 
adb pull /data/anr/  .\anr

4.获取系统墓碑日志(tombstones )
adb pull /data/tombstones  .\tombstones

5.过滤运行时异常和DEBUG异常
adb logcat  -s AndroidRuntime,DEBUG > crash.txt
2、系统重启

这属于系统的稳定系,出现在system server死锁问题,然后Android的WatchDog看门狗检测到了,然后重启Android相关进程导致,可以通过以下手段捕获奔溃日志:

1.捕获通用日志
logcat log (main, system, event, radio)

2.抓取内核日志(Dmesg/kernel logs)
adb shell  " cat  /proc/kmsg "  或者 adb shell dmesg

3.抓取bugreport信息(该信息是Android为了方便开发人员分析整个系统平台和某个app在运行一段时间之内的所有信息,专门开发了bugreport工具)
adb shell bugreport  > bugreport.txt

4.抓取dumpstate信息(dumpstate类似于dumpsys都是android提供给开发者的帮助了解系统运行状态的利器)
adb shell dumpstate > dumpstate.txt

5.抓取dumpsate(dumpsys都是android提供给开发者的帮助了解系统运行状态的利器)
adb shell dumpsys > dumpsys.txt

6.抓取Binder传输日志
adb pull /d/binder/ .\binder

7.获取系统ANR日志(Trace file /data/anr) 
adb pull /data/anr/  .\anr

8.获取系统墓碑日志(tombstones )
adb pull /data/tombstones  .\tombstones
3、手机黑屏(Black screen)

终端黑屏(Black screen)这种系统稳定性问题,一般出现问题时,此时power按键一般能用,可以通过adb shell getevent查看到input事件信息,可以通过如下手段捕获崩溃日志:

1.捕获通用日志
logcat log (main, system, event, radio)

2.抓取内核日志(Dmesg/kernel logs)
adb shell  " cat  /proc/kmsg "  或者 adb shell dmesg

3.抓取bugreport信息(该信息是Android为了方便开发人员分析整个系统平台和某个app在运行一段时间之内的所有信息,专门开发了bugreport工具)
adb shell bugreport  > bugreport.txt

4.抓取dumpstate信息(dumpstate类似于dumpsys都是android提供给开发者的帮助了解系统运行状态的利器)
adb shell dumpstate > dumpstate.txt

5.抓取dumpsate(dumpsys都是android提供给开发者的帮助了解系统运行状态的利器)
adb shell dumpsys > dumpsys.txt

6.抓取Binder传输日志
adb pull /d/binder/ .\binder

7.获取系统ANR日志(Trace file /data/anr) 
adb pull /data/anr/  .\anr

8.获取系统墓碑日志(tombstones )
adb pull /data/tombstones  .\tombstones

9.获取meminfo日志(Meminfo log) 
adb shell cat proc/meminfo >meminfo.txt 

10.获取Procrank信息 (Procrank log) 
adb shell procrank >procrank.txt 

11 获取top信息日志(Top log) 
adb shell top -m 10  >top.txt 

12.Add below information: 
•Adb workable or not, ANR or not 
•CTP workable or not
 -> touch screen and observe the output of
 "adb shell getevent". 
•Display driver workable or not
 -> Use the screencast to see
 if the screen can be displayed 
•Power key/volume key work or not? 
Menu/back/home key work or not? 

13 .查看kernel的线程函数栈
adb shell "echo t > /proc/sysrq-trigger"
adb shell "cat /proc/kmsg" > ./kmsg_trigger.txt
4、系统卡死/屏幕卡死(System Freeze/ Touch Panel Freeze)

这是Android系统稳定性里面最严重的,此时一般按Power按键、菜单键等都是失效的,此时可以通过adb shell getevent查看不到到input事件信息,看不到任何信息了,我们这是可以通过如下手段捕获日志:

1.捕获通用日志
logcat log (main, system, event, radio)

2.抓取内核日志(Dmesg/kernel logs)
adb shell  " cat  /proc/kmsg "  或者 adb shell dmesg

3.抓取bugreport信息(该信息是Android为了方便开发人员分析整个系统平台和某个app在运行一段时间之内的所有信息,专门开发了bugreport工具)
adb shell bugreport  > bugreport.txt

4.抓取dumpstate信息(dumpstate类似于dumpsys都是android提供给开发者的帮助了解系统运行状态的利器)
adb shell dumpstate > dumpstate.txt

5.抓取dumpsate(dumpsys都是android提供给开发者的帮助了解系统运行状态的利器)
adb shell dumpsys > dumpsys.txt

6.抓取Binder传输日志
adb pull /d/binder/ .\binder

7.获取系统ANR日志(Trace file /data/anr) 
adb pull /data/anr/  .\anr

8.获取系统墓碑日志(tombstones )
adb pull /data/tombstones  .\tombstones

9.获取meminfo日志(Meminfo log) 
adb shell cat proc/meminfo >meminfo.txt 

10.获取Procrank信息 (Procrank log) 
adb shell procrank >procrank.txt 

11 获取top信息日志(Top log) 
adb shell top -m 10  >top.txt 

12.Add below information: 
•Adb workable or not, ANR or not 
•CTP workable or not
 -> touch screen and observe the output of
 "adb shell getevent". 
•Display driver workable or not
 -> Use the screencast to see
 if the screen can be displayed 
•Power key/volume key work or not? 
Menu/back/home key work or not? 

13 .查看kernel的线程函数栈
adb shell "echo t > /proc/sysrq-trigger"
adb shell "cat /proc/kmsg" > ./kmsg_trigger.txt

14.抓取窗口信息 (Dumpsys window log)
adb shell dumpsys window > dump_window.txt

15.抓取可以 event信息(Key events log) 
adb shell getevent -rtl /dev/input/event0 按键事件
  • 9
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值