gpt4 book ai didi

android - 如何在没有生根的情况下从用户那里获取 Android 4.1 的 android 日志?

转载 作者:行者123 更新时间:2023-11-29 00:32:25 25 4
gpt4 key购买 nike

从Android 4.1开始获取android日志需要ROOT权限,所以现在无法要求用户使用 LogCollector 等应用程序发送日志,它只获取 android 日志并将其发送到电子邮件。可以使用Android SDK中的ddms应用程序查看Android日志,但要求用户安装Android SDK是不好的。

那么,如何在不root的情况下获取Android 4.1用户的android日志呢?

最佳答案

您现在可以在未经许可的情况下获取您自己的应用程序的日志。无论是否获得许可,您都无法阅读其他应用的日志。

这有点记录here .仅引用 Diane Hackborn 的回复:

The change is that third party applications can no longer get the read logs permission, however every app can read the logs containing only the lines they have written, without needing any permission.

Keep in mind that access to the logs has never been part of the SDK, and is still not part of the SDK. If you are relying on it then, even after this change, you run the risk of breaking in the future. (And that is partly why this got lost for documentation, it is not part of the SDK, so there isn't really a place to document it, in fact documenting it would kind-of make it a part of the SDK which we don't want. :p)

关于android - 如何在没有生根的情况下从用户那里获取 Android 4.1 的 android 日志?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14641063/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com