Android: How to obtain data/anr/traces.txt from Samsung Galaxy Tab?
You can fetch the file using the following command:
adb pull /data/anr/traces.txt
Hope this helps, Francisco.
On some devices the traces file is called traces.txt.bugreport
for whatever reason. See the other answers for pulling the file to your device.
for Android Pie+
adb bugreport ./bugreport.zip
and you will get then in zip file
bugreport/FS/data/anr/*
bugreport/FS/data/tombstones/*