4

How to read System logcat on android jelly bean?

I know it will possible on rooted devices but how to achieve on non rooted device?

Please suggest

Thanks in advance.

PrvN
  • 2,385
  • 6
  • 28
  • 30

2 Answers2

4

if you need to read the logs of your own app, you don't need any kind of permission, especially not root.

however, if you need to read all logs, you can check out this post:

https://stackoverflow.com/a/12642918/878126

if you don't have root and you wish to read all logs, you can't (or maybe the app can do it if it's a system app).

Community
  • 1
  • 1
android developer
  • 114,585
  • 152
  • 739
  • 1,270
  • Thanks for reply. I implemented this code on my app.It fire toast "Failed to obtain READ_LOGS permission". – PrvN Jun 08 '13 at 11:37
  • is your device rooted? it only works on rooted devices (and maybe if the app is a system app, but i'm not sure about it) . – android developer Jun 08 '13 at 17:09
  • it won't work, and they talked about it on one of their lectures - the permission cannot be obtained for normal apps. – android developer Jun 10 '13 at 11:49
  • please suggest to get this for non rooted device. Agenda is to make app locker. – PrvN Jun 18 '13 at 12:52
  • app locker ? what's an app locker? do you mean what is shown when the screen is turned on ? if so, that's something that is totally different. if not, and i guess you mean something that blocks other apps from launching, google already answered about using the logs for this purpose, and it's against their "rules" (don't remember the exact words) for such a thing to exist. if you want to have something that doesn't allow simple launching of apps, you can create a launcher. it will usually work (won't work for notifications, but for app icons it will work). – android developer Jun 18 '13 at 13:40
  • i'm not sure, but maybe this is the lecture i've watched that they say it's against their "rules" : https://developers.google.com/events/io/2012/sessions/gooio2012/102/ . i think a woman has answered to this question. – android developer Jun 18 '13 at 13:42
0

It is possible to access all logs without root using remote debugging. Here is an app that does it:

https://github.com/tananaev/rootless-logcat

Anton Tananaev
  • 2,458
  • 1
  • 25
  • 48