Collect logs from system classes

一世执手 提交于 2019-12-02 10:25:54

So how am I supposed to collect those logs?

Generally, unless you are working for a device manufacturer, you don't collect those logs.

First, accessing LogCat at runtime has never been officially supported; hence, the clunky "fork logcat" approach that you have to take.

Beyond that, you need the READ_LOGS permission to get more than what you are. That permission has signature|privileged|development for the protectionLevel, meaning that ordinary apps cannot hold that permission.

This is for privacy reasons. READ_LOGS gives you access to all of LogCat, and lots of apps (and some system processes) log information that may be sensitive.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!