【Android小技巧】ANR日志导出

普通的手机,通过pull 命令即可导出

adb pull /data/anr/traces.txt d:/

或者

1、adb shell 

2、cat  /data/anr/xxx   >/mnt/sdcard/yy/zz.txt   

3、exit

4、adb pull /mnt/sdcard/yy/zz.txt  d:  ,即可将文件导出到了d盘。

类似vivo的手机,导出trace时,会遇到权限问题,可以用 adb bugreport 来解决

C:\Users\pg>g:

G:\>cd bugreport

G:\bugreport>adb bugreport
/data/user_de/0/com.android.shell/files/bugreports/bugrepo...37.zip: 1 file pulled. 11.3 MB/s (6224175 bytes in 0.527s)

G:\bugreport>

生成文件:

然后解压:

在目录: G:\bugreport\bugreport-PD1805-OPM1.171019.026-2019-04-29-10-56-37\FS\data\anr 即可看到anr 日志

posted @ 2019-04-29 11:04  gregpeng  阅读(9279)  评论(0编辑  收藏  举报