这个问题已经有了答案:
Android: How to obtain data/anr/traces.txt from Samsung Galaxy Tab?
3个答案
我想从android设备上获取my application traces.txt文件。我在谷歌上查了很多链接,但还是没有成功。如果有人知道,请帮帮我。
我也检查了下面的链接。
how to access android files /data/anr/traces.txt and /data/tombstones/tombstones
How to find this stack trace?
我也在尝试这个。
adb-s 0123456789abcdef外壳<<

ps | grep com.package.name # This will list some info about the running         instance of your app
# Output should be something like:
# u0_a7    18941 173   869348 26040 ffffffff 00000000 S    com.package.name
# Important is the PID (number in the second column), in this case 18941.

# Now send the SIGQUIT to your process, please change '18941' to your PID
run-as com.package.name kill -3 18941

# Now Android should have created the file /data/anr/traces.txt, check that:
ls -l /data/anr/traces.txt
# Output should be something like
# -rw-rw-rw- system   system     325391 2014-02-03 14:11 traces.txt

# And finally pull that file
exit

adb-s 0123456789abcdef pull/data/anr/traces.txt
但我得到的错误是“run as:package'com.package.name'已损坏安装。”

最佳答案

您可以使用adb执行相同的操作:

adb pull /data/anr/traces.txt

07-26 09:31