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.

About these ads

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.

    franc

    • 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?

    Thanks
    Andong

  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?

  8. Milind says:

    Also, you may want to mention how to work around this in the app’s description and perhaps display a message when running the app on JellyBean.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: