普通的手機,通過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 日志