Search code examples
androidadbandroid-anr-dialog

How to fetch /data/anr/anr_xxx on Oreo (8.1.0)?


I'm unable to adb pull /data/anr/anr_xxx files on my Pixel Xl with Android 8.1.0.

My trials:

➜  Downloads adb shell ls -al /data/anr
total 1184
drwxrwxr-x  2 system system   4096 2018-06-24 13:57 .
drwxrwx--x 43 system system   4096 1970-02-11 19:30 ..
-rw-------  1 system system 503517 2018-06-24 01:41 anr_2018-06-24-01-41-39-700
-rw-------  1 system system 683519 2018-06-24 13:57 anr_2018-06-24-13-57-19-517
➜  Downloads adb pull /data/anr/anr_2018-06-24-01-41-39-700 .
adb: error: failed to copy '/data/anr/anr_2018-06-24-01-41-39-700' to './anr_2018-06-24-01-41-39-700': remote open failed: Permission denied

marlin:/data/anr $ ls -al
total 1184
drwxrwxr-x  2 system system   4096 2018-06-24 13:57 .
drwxrwx--x 43 system system   4096 1970-02-11 19:30 ..
-rw-------  1 system system 503517 2018-06-24 01:41 anr_2018-06-24-01-41-39-700
-rw-------  1 system system 683519 2018-06-24 13:57 anr_2018-06-24-13-57-19-517
marlin:/data/anr $ cp anr_2018-06-24-13-57-19-517 /sdcard/Download
cp: /sdcard/Download/anr_2018-06-24-13-57-19-517: Permission denied

I googled many times and didn't find a solution and i'm really going to be crazy. Any help or hint will be appreciated. Thank you!


Solution

  • You can use adb bugreport ./bugreport.zip, then unzip bugreport.zip, you will find a bugreporp-xxx.txt. from this txt, you can get /data/anr/anr_xxx file content by greping /data/anr/anr_