android - 如何从 android 设备获取 android 应用程序 traces.txt 文件

标签 android

<分区>

我想从 Android 设备获取我的应用程序 traces.txt 文件。我检查了谷歌中的很多链接,但仍然没有成功。如果有人有任何想法,请帮助我。 我也检查下面的链接。 how to access android files /data/anr/traces.txt and /data/tombstones/tombstones How to find this stack trace?

我也在尝试这个。 adb -s 0123456789ABCDEF shell # <<< 这将为您的设备打开一个 shell

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' has corrupt installation.”

最佳答案

您可以使用 adb 做同样的事情:

adb pull /data/anr/traces.txt

关于android - 如何从 android 设备获取 android 应用程序 traces.txt 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21523999/

相关文章:

java - 操作栏选项卡必须有回调 addTab 错误

java - 如何使用 RecyclerView 创建滚动返回顶部按钮

android - 首选项不会显示在数据/数据中,我也无法使用代码访问它们

android - 无法让加速度计感应震动事件

android - 如何从网站向 Android 发送 Firebase 通知

java - 是否有任何工具可以将 Objective C 代码转换为适用于 Android 的 java

android - android中的简单单选按钮 Action

Android:Firebase:Digits: 属性 io.fabric.ApiKey 也存在于 firebase-ui-auth

android - 为什么我不能使用 python 在 android 上创建文件

android - 创建syncml客户端和服务器