Forum account registration has been disabled for now due to large spammer volume. Please email me if you would like an account on the forum to chat with others or to set up a sync subscription.
READ_LOGS permission in Android
  • ddumontddumont
    Administrator
    I've gotten a few negative comments from users since introducing the feature to collect logs for troubleshooting. I think I'm going to wait it out and see how the general user-base feels about the permission. The need for this permission is often far less scandalous than most people think, though I'll admit there's potential for abuse in the hands of untrustworthy developers.


    I recently noticed that I was getting this error in the Google Play developer console:
    java.lang.NoClassDefFoundError: android.os.AsyncTask

    Now, that really doesn't make a whole lot of sense on face value, and I couldn't reproduce it manually on any of my test devices... until I did by accident. It turns out that certain errors involving the AsyncTask will cause all further interactions with it to fail like the device doesn't even know what it is. This was not apparent at all from the stack trace in the Google Play developer console.

    So I decided, rather than make my users install a separate app that they may not trust, I would include the READ_LOGS permission in my app and only use it when the user has clicked on a button in the settings screen. Like my other data collection (database troubleshooting) option, you have a chance to review the information being sent (draft email) before the data is ever sent.

    For those curious, this is the logcat command I'm using to read the logs:
    logcat -d -v long wwdiary-auth wwdiary-balance wwdiary wwdiary-prefs wwdiary-prefs-widget wwdiary-sync wwdiary-weight-widget *:W

    It basically collects the log for all of the wwdiary logging tags that I use in the program, as well as any other logs that throw a serious warning or exception, incase there is some interaction with wwdiary that is causing an issue.

    I then take this info, compose an email and present it to the user to send.

    It would be fantastic if Google were to fine tune this logging permission and allow a system service that would return at least the logs for my own app without requesting more permissions.

    I may be able to work around the permission in the future by setting up my own logging service to capture all the places that I write out to logs and also save it myself. TBH, I was expecting that device logs for my own program would be readily available, so I've only been using the built in logging mechanism. Converting it all would take time, and that's something I'm not sure that I want to do unless a significant amount of my userbase is upset about this change...

    The comment section here is a perfect place to voice your concern :). Please let me know what you think.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Tagged