在Android上读取网络活动日志 [英] Reading network activity logs on Android

查看:233
本文介绍了在Android上读取网络活动日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以在没有root访问权限的情况下以编程方式在Android上读取应用程序内部/内部网络活动日志吗?如果是,我们可以对设备上的所有应用程序这样做吗?

Can we read the app intra / inter net activity log on Android programmatically without having root access? If yes, can we do so for all apps on the device?

推荐答案

对于您的应用程序是可以的,但是您需要在HTTP请求中使用某些层来处理请求并记录信息.

For your application yes, it is possible, but you need to use some layer in the HTTP requests that handles the requests and logs the information.

例如,使用改造:

setLogLevel(LogLevel.FULL).setLog(new AndroidLog("YOUR_LOG_TAG"))

对于设备中的所有应用程序,您需要root用户或安装自定义代理,例如: http://www .charlesproxy.com/,但是使用查尔斯代理,您无法以编程方式执行此操作...

For all the applications in the device you need root, or install a custom proxy, for example: http://www.charlesproxy.com/ but with charles proxy you cannot do that programmatically...

这篇关于在Android上读取网络活动日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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