logcat - Read logs from all apps on android from within an app for android 4.2+ -
i believe there have been changes ways apps can read logs in android post 4.2. wanted know if can read logs including system logs logcat within app current versions of android? if yes need permission or not?
unless rooted cannot since jelly bean. see android bug report , related discussion. quote:
the change third party applications can no longer read logs permission, every app can read logs containing lines they have written, without needing permission.
keep in mind access logs has never been part of sdk, , still not part of sdk. if relying on then, after change, run risk of breaking in future. (and partly why got lost documentation, not part of sdk, there isn't place document it, in fact documenting kind-of make part of sdk don't want. :p)
also really hope developers don't take license further abuse system logs , spew increasing amounts of stuff app. log noise has been continual problem on android (not third party apps, struggle ship open source platform without lot of noise), , if things continue worse make further changes better control it.
edit: if got access device, can peek logs there or try grant said permission app:
adb shell pm grant <pkg> android.permission.read_logs
but other cases out of luck (unless find bug in framework)
Comments
Post a Comment