As many people have noted, my Android application alogcat does not work correctly on Jellybean devices. The reason is that applications can no longer read log entries created by other applications. They can still read log entries created by themselves, but obviously that doesn’t help alogcat.

The logic makes sense I suppose. A poorly written application may log sensitive information. Allowing other applications to read this is a bad thing.

For alogcat, there is a workaround. You must explicitly grant alogcat the READ_LOGS permission from the command line. From the Android shell,

shell@android:/ $ pm grant org.jtb.alogcat android.permission.READ_LOGS    

Or if you have ADB installed, from your computer’s terminal with your device connected,

$ adb shell pm grant org.jtb.alogcat android.permission.READ_LOGS    

This of course requires that you install an Android terminal emulator, or have ADB installed on your computer. Android Terminal Emulator is a good choice for an Android terminal. The Android SDK, which includes ADB can be downloaded here.

11 Responses to

  1. Jeffrey Blattman says:

    Note that the same solution applies for my app alogrec, just replace “org.jtb.alogcat” with “org.jtb.alogrec” in the commands.

  2. Why not just add the permission to the manifest like everyone else does? Along with the new android.permission.ACCESS_SUPERUSER permission?

    I’d do it myself, but aLogCat is closed source.

  3. Jeffrey Blattman says:

    yeah unlikely 🙂 SVN works.

  4. franc walter says:

    Yes, I agree with Paul, why not (easily?) add these permissions?
    Is it a big deal?
    Sounds so easy though.


    • Jeffrey Blattman says:

      not a big deal. it’s matter of testing it across multiple OS versions of rooted and non-rooted devices to make sure it works correctly.

  5. Andong Zhan says:

    Hi guys,

    Is it possible to make alogcat work well on JellyBeans? Any idea?


  6. Andong Zhan says:

    I found pm grant pkt android.permission.READ_LOGS works for me. But I don’t know why this is ok. Any idea?

  7. I’m fairly new to this. I found that someone had already cloned it over to git and forked that. I added the new permissions and that was fine. However the one thing that’s missing is that I need to get alogcat to request superuser on launch and I’m a bit confused about that. I wondered if you could point me in the right direction, if it’s not too much trouble?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: