Reading ActivityManager-logs on a Jelly Bean device?

后端 未结 2 828
盖世英雄少女心
盖世英雄少女心 2020-12-31 23:39

Jelly Bean has removed the ability to read the logs of other apps (according to this I/O talk), which is a sensible security improvement. However, I need to read Activ

2条回答
  •  悲&欢浪女
    2020-12-31 23:51

    There is an extensive discussion of this issue going on here. Unfortunately, it's "expected behavior" and as such won't be fixed. The only current solution (for reading the logs from within an application on JB and above) is to manually grant the permission to the app through adb:

    adb shell pm grant android.permission.READ_LOGS

    A such-granted permission:

    • survives reboots
    • survives application updates (i.e. "adb install -r")
    • does not survive if the application was uninstalled and then installed again

    It's obvious that this isn't something that a normal user can be expected to do. A GUI-solution (where users can grant this permission from the Settingsmenu of their device) is promised by the Android team, but unfortunately the functionality was removed before the "fix" was implemented.

提交回复
热议问题