如何以编程方式阅读其他应用程序的android log cat [英] How to read android log cat programmatically for other applications

查看:52
本文介绍了如何以编程方式阅读其他应用程序的android log cat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解到您无法读取其他应用程序的日志.此外,诸如App Lock之类的应用程序会不断读取日志以查找已启动的应用程序,然后显示其锁定屏幕.因此,它们必须完全读取日志.

I have read that you can't read logs of other apps.Also that apps like App Lock constantly read logs to find which apps have started and then present their lock screen.So they must be reading logs completely.

我想读取所有应用程序的日志. I/ActivityManager(585):开始活动:目的{action = android.intent.action ...}

I want to read logs like this for all apps. I/ActivityManager( 585): Starting activity: Intent { action=android.intent.action...}

我们是否必须是root用户才能读取日志.

Do we have to be root users to read logs.

推荐答案

从JellyBean开始,您可以不再读取您的应用程序未放置在LogCat中的任何内容.

As of JellyBean, you can no longer read anything in the LogCat that was not put there by your application.

在JellyBean之前,并为自己的应用发布JellyBean,您可以使用运行时执行命令行参数来检索日志猫

Prior to JellyBean, and post JellyBean for your own app, you can use the Runtime to execute command line arguments to retrieve the logcat

这篇关于如何以编程方式阅读其他应用程序的android log cat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆