CatLog jives with Jelly Bean, goes open-source

CatLog

CatLog is an app I’ve always been immensely proud of. I wrote the initial version in the span of a weekend, and yet it grew to be my second-biggest Android app, after the now-defunct Pokédroid. Even though it’s a pretty esoteric app, and nobody except developers will find it very useful, I’m glad I could contribute something valuable to the Android community and help make Android development a bit less of a pain. It’s cool to see fan-made instructional videos on YouTube and all the forum posts where people say, “Just download CatLog and send me a log report.”

But lo, all is not well in CatLog Land. As of the newest version of Android (4.1 Jelly Bean), Android apps can no longer read each other’s logs using the READ_LOGS permission. You’re limited to your own logs, unless you’re a system app or you gain root privileges. Uh oh.

Now, this is a defensible position on Google’s part. After all, there was a pretty high-profile security hole found in the Facebook Android SDK due to developers carelessly writing sensitive information to the system log. And in general, most apps don’t need to read each other’s logs, so the change is understandable. Stay in your own sandbox and all that.

This change is going to have a big impact on certain varieties of apps, though. Not only will it affect log-reading apps (like CatLog and aLogcat), but also apps that rely on log-reading in some way. For instance, you can say goodbye to the various “app lock”-type programs that rely on reading the system log to determine when other apps are being launched. If you don’t believe me, check out the permissions page for those apps. See where it says “read sensitive log data”? That’s the death knell for these types of apps, unless somebody figures out a smarter way to detect when another app is launched. (My own AppTracker works in the same way. So it’s toast as well.)

So what does this mean for CatLog? Well, in the future, it means it will only work on rooted phones, which basically limits its appeal to developers and root-happy techies. Until now, it had also come in handy for end users, since it gave them a way to easily submit bug reports (in cases where, for whatever reason, the default reporting mechanism wasn’t available). But starting with Jelly Bean, CatLog will require root access, which means it’s basically worthless for Joe Android User now.

So given that this is more or less CatLog’s swan song, I’m taking a pretty radical step with it. I’m open-sourcing it. Yep, CatLog is now free to remix and re-use, released under the ultra-permissive WTFPL license, just like my other apps.

Why such a permissive license? Well, because I honestly don’t care. CatLog was always a free app, and although I’m grateful for the nice pocket change I make from the donate version (about $20 per month), I doubt open-sourcing it will affect the donations much, and anyway the app was never about making money for me. So there’s really no reason to lock down the source code. I mean, yeah, there are already some copycat apps out there that stand to benefit, but they’re not really doing anyone any harm hanging out in sixth or seventh place in the search results. CatLog’s main advantage is its reputation on the Google Play Store.

On the other hand, if you do want to re-use CatLog’s code, the only thing I ask for is attribution. Sure, the WTFPL doesn’t require it, but this is just one of those “don’t-be-a-jerk” requests.

I have another strong reason for wanting to open-source CatLog: I’m bored of it. Frankly, I haven’t been able to give it much attention lately, because I think 99% of its useful features are finished, and everything that’s left is just flourishes and fine-tuning. It needs a facelift and probably some tweaks to the filter syntax, but with the enthusiasm I’ve shown for the app lately, I’m obviously just not the one to do it.

Also, I find myself turning away from Android development in general. I started writing Android apps when the system was still in its infancy, with only two phones available – the HTC Dream and the Magic. I found it a lot more fun when Android was still simple and untamed, when the market wasn’t flooded with glitzy, polished apps all competing for users’ mind-share. Back in those days, you could even write a simple Pokémon app with an ugly UI and people would love you for it. Development was easy, and the exposure was fun.

Nowadays the Play Store is much more crowded, and Android development is more difficult in general, what with supporting hundreds of devices with multiple form factors (including tablets), and multiple Android versions stretching from 1.5 Cupcake to 4.1 Jelly Bean. The APIs have grown incredibly complicated, and I can’t count the number of times I’ve discovered bugs that only appeared on a certain Android version or on a certain phone. It’s a huge headache trying to maintain all this compatibility, which is why I still haven’t updated any of my apps to the new “Holo” theme from ICS.

However, my lack of enthusiasm shouldn’t limit CatLog’s potential. When you’ve lost interest in a software project, I think it’s your duty to make it open-source, so that somebody else has a chance to grab the baton and run with it. And that’s exactly what I’m doing with CatLog. So if you have any features or bugfixes you’d like to write, fork me on GitHub and go nuts!

36 responses to this post.

  1. Is it that Android development is more difficult? Or that user’s expectations are way higher?

    I agree that single-device bugs are very frustrating. What kinds of bugs have you seen with CatLog?

    Reply

    • Android development is definitely more difficult now. The fact that developers have to write stuff like GreenDroid and ActionBarSherlock just to bridge the gap between pre-ICS and post-ICS speaks volumes. What these libraries really represent is the “missing” compatibility APIs.

      As for your second question, for me it’s not really about user expectations being higher – it’s more about glut in the Play Store. When you write an app nowadays, you’re competing against a lot of entrenched incumbent players that are boosted highly in the search results, so it’s much harder to get exposure. When I wrote my first app, Japanese Name Converter, I remember it got 5,000 downloads in about a month, because back then users would download just about anything. You could write a “hello world” and people would actually download it. It was fun. I suppose it’s natural that Android has grown out of that era, but I still remember the Wild West with a lot of fondness.

      CatLog had tons of one-of-a-kind bugs. For example, there was a regex I had to modify just for a single phone model (ZTE Blade): https://github.com/nolanlawson/Catlog/blob/master/Catlog/src/com/nolanlawson/logcat/data/LogLine.java#L28 . And with all my apps, I’ve banged my head against lots of bugs that were Cupcake-only, Eclair-only, Honeycomb-only, ICS-only, etc. This is why serious Android devs (read: not me) set up Jenkins servers with the Android Emulator Plugin to test multiple API levels simultaneously.

      Reply

      • Thanks for the reply. You’re right about the wild west! I think Play Store SEO and discoverability is particularly painful for developers. You’d love my app, but only if you could find em!

  2. Posted by dEcmir on September 3, 2012 at 3:29 PM

    Oh it’s a bit sad. Android développement can’t be done alone anymore I guess.

    Reply

  3. Posted by Joe on September 4, 2012 at 2:44 AM

    Could one work around the need to root your device by simply doing a ‘chmod 644’ on a couple of files? Or would that be more problematic?

    Reply

  4. Posted by Joe on September 4, 2012 at 2:52 AM

    Or ‘chmod 755’ or whatever the appropriate permissions should be.

    Reply

    • It’s not about file permissions; it’s about Android permissions. The permission READ_LOGS simply doesn’t work anymore. Some have reported that you can manually grant the permission on the command line (http://forum.xda-developers.com/showthread.php?t=1847541), however, it didn’t work on my phone (Galaxy Nexus GSM running a nightly CyanogenMod 10), and anyway it requires root. You can also move the app to the /system/app directory, but again that requires root.

      So basically, the only way you could get this to work on non-rooted phones is if CatLog were baked into the ROM itself, which I doubt anybody is going to do. Although I’d be flattered if they did!

      Reply

      • Thanks for the feedback. I haven’t done any Android development per-se but have done development on Xnix for years. Just wondered if there was a simple work-around.
        Joe

      • Since you have now open-sourced CatLog, ROM builders are free to include it and may very well do so if encouraged.

        Titanium Backup makes it easy to convert apps to system apps, but does still require root privs… Though I wouldn’t dream of having an Android device without root.

      • Posted by vishal on January 10, 2013 at 10:22 AM

        Hello. Could you help me please regarding HTC Devices set? In fact i have downloaded catlog and i wish to record the logs but i dont know where is the record option. Thank you .

        vishal

  5. Posted by Axle on December 21, 2012 at 9:10 PM

    I have a hard time understanding what catlog is and what it does exactly, everything i read about it and the app itself is like a foreign language to me, i initially installed it because it was recommended because a game i play keeps crashing without warning recently and i have no idea why, i thought it could target what the problem is and help me fix it. Do you have any user friendly advice or any ways i could better understand it or if it would even help with the problem im having. thankyou.

    Reply

    • Yeah, I really need to make CatLog more friendly to non-geeks. :) I’m 99% sure that what you’re being asked to do is this:

      1) Start up CatLog, hit Menu, then “Record.”

      2) Start up your game, and do whatever made it crash.

      3) Go back into CatLog, hit Menu, then “Stop Recording.”

      4) Now hit Menu, then “Send,” then type in the game developer’s email address.

      That’s all. Basically, you’ll be making the world a better place by giving the game developer some information on why the app crashed. :)

      Reply

  6. Posted by vishal on January 10, 2013 at 10:56 AM

    Hello everybody. i have downloaded “Catlog”: https://play.google.com/store/apps/details?id=com.nolanlawson.logcat&hl=en_GB from Google Play. When i ran the application, i could not see the menus at the bottom. Could someone help me please ? thank you

    Reply

    • Hi there,

      On post-Gingerbread devices, you’ll have to use the “overflow” button. It usually looks like three dots arranged vertically, and it’s typically in the lower right-hand corner of the screen.

      Reply

  7. As per https://groups.google.com/forum/?fromgroups=#!topic/android-developers/6U4A5irWang, you can actually enable this permission post-install through adb (“adb shell pm grant android.permission.READ_LOGS”), even on Jelly Bean devices. Since you still need adb to do it, it’s somewhat out of reach for the average Android user, but at least devs aren’t completely locked out of this feature.

    Reply

  8. Posted by hrj on July 13, 2013 at 1:20 PM

    I have come up with a desktop utility that can collect logs from user’s device. It’s Java based, so should run on any OS:
    http://gist.io/5983971

    Reply

  9. Posted by Jean Brunelle on July 19, 2013 at 1:51 AM

    IHi If i have Jeally bean 4.1.3 and I use Catlog the info I log is it complete log for the developper to check problem with app or do I need the Root to have the complete log information?ON application it says it gives only log journal and that it needs Root PLease explain
    Thank you

    Reply

    • If you are using Jelly Bean, CatLog can only read CatLog’s logs. So unless you have root, you will be unable to send anything useful to this developer, unfortunately.

      Reply

    • Posted by hrjet on July 21, 2013 at 8:13 PM

      @Nolan and @Jean, this is exactly what I am trying to solve with logshark. It is a desktop application that can fetch the user logs from the Android device and then you can email them to the developer.

      Reply

      • Nice work on LogShark! Seems promising, although some of the steps might still be daunting for non-techies. (Heck, some people even complained that CatLog was confusing…)

  10. Posted by lever on September 26, 2013 at 1:50 PM

    Is there a simple way for me to filter CatLog info before sending it to a developer, to exclude info not related to their specific app? Being ignorant of coding, I’m unsure how revealing the logs are from a privacy perspective. I’d prefer not to share info about the other apps I’m using.

    I guess my ignorance of coding might mean I’m not aware that my question makes no sense at all and that the totality of the data is essential for a dev to make sense of anything. I just kinda imagined when I installed it that I’d be able to filter a list of installed apps and grab the events related to specific apps.

    Reply

    • Yep, you can do that. Just long-press on a log line from the target app, then choose “filter by process id.” Then, only the logs from that app will appear in the results.

      Reply

      • Posted by lever on December 31, 2013 at 5:35 AM

        Thanks for that.

        Another question – how can I filter on more than one app? I’m able in this case to filter on Citymapper, but the problem I’m having is related to its interactions with the Android Download Manager.

        I’ve been able to filter on the process ID for Citymapper, and CatLog suggested DownloadManager as another filter when I started to search for it. Can I filter on both to exclude everything else, and if so, how? Is there a way of combining terms in the search?

        thanks again.

      • No, unfortunately you can’t. CatLog’s query syntax just ANDs everything rather than ORing it.

  11. Posted by James on September 28, 2013 at 4:33 PM

    Thankyou Nolan for all your contributions to the Android dev community.

    Reply

  12. Posted by Kathy on November 14, 2013 at 10:31 PM

    How do l email my report to someone?

    Reply

  13. Hi Nolan,

    Is there still no way to view the logs on an Android 4.2 device using the CatLog or aLogCat or such similar applications.

    One of our application has failed on an Android 4.2.2 device. We need to receive logs from a customer on whose device the app failed.

    Is there any way for us to view the logs from him.

    Reply

  14. Hi Nolan,

    The LogShark gave a huge list of logs but didnt give the logs i had written in my application using android.util.Log.

    Any ideas ?

    Also, Merry Christmas :)

    Reply

  15. I’m trying to unlock my phone from the current network. A friend told me about this app it’s kinda late here in the Mo to call him can someone help me out???

    Reply

  16. I have recently been getting error ‘ 24 ‘ when I try to install catlog. I never had this problem before, then one day I noticed catlog had been uninstalled ( not by me! ) & when I attempted to reinstall I got the error message. I have tried browsing the forums for a solution but so far nothing has worked.
    Can you help? It would be greatly appreciated.

    Regards Scoville Lacasse

    Reply

  17. […] applications, they can only read their own log. This has broken most (all?) system log readers, here’s a blog post from a developer of such an application talking about how it has affected his […]

    Reply

  18. Posted by NIL on July 25, 2015 at 8:29 PM

    Hi,

    Thank you very much for this nice tool! I will make my way “into” Android a easier way.

    i am just right at the beginning of Android development (I had some experience in embedded systems and software development
    though), so I have a very basic question:
    These logs are they stored on the internal flash memory and read by CatLog from there? Or (hopefully) temporarily put into
    tmpfs or something like that (RAM-based)?

    I am asking because if Android is “hammering” that lot of data onto a flash memory, it will become soon weared out.

    NIL

    Reply

  19. It is no good telling yourself that you are a personal trainer not a
    salesperson, if you don’t promote yourself and get into fitness selling then no one is going to do it for you.

    Reply

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

%d bloggers like this: