Using LogCat on JellyBean
Asked Answered
D

2

8

I have a bug that happens very randomly, so I rely on a LogCat monitoring app I bought off the Play Store, to see the exceptions thrown on my device when it happens. Since using Jelly Bean, I'm seeing no logging. I've read that, with Jelly Bean, an app can only see the LogCat output of itself.

So outside of rooting my device, is there any way to read the LogCat output of my app on my phone directly? I know I can use Eclipse, but, like I said, it happens so randomly and I can't manually recreate it.

Dermatome answered 13/9, 2012 at 13:48 Comment(3)
Install aLogcat to your device from google play...play.google.com/store/apps/details?id=org.jtb.alogcat&hl=enJacquesjacquet
@Priyank this app is not working on non rooted JB androidParthenos
Yea, that is the app I bought that isn't working anymore. I just think Google hates developers. ;)Dermatome
D
3

So outside of rooting my device, is there any way to read the LogCat output of my app on my phone directly?

Not really. You can read discussions on aLogcat bugtracker about this issue:

After doing some reading and some testing, I've found three ways to make aLogcat work, all of which use root.

More detailed discussion about READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

Deify answered 19/10, 2012 at 13:42 Comment(1)
Thanks for the link. Buried in there is a way for the user to send a log file/screenshot by holding down the power button, the volume up and volume down at the same time, then waiting about 30-60 seconds for an email prompt to show. Far from an ideal functionality, but it will work for me.Dermatome
M
2

What do you think about writing directly to the screen using a textView? Of course this would only be for a debug build.

This post contains code that prints logcat errors on the screen Write android logcat data to a file

Now all that's left to do is to put try/catch stmts in your code, where the try surrounds code you think is problematic. The catch delegates to writing the error message to your screen.

Madalene answered 5/1, 2014 at 1:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.