Does anyone have any suggestions as to how I can see the full text of the errors which are occurring when trying to sync my K9 folders?
It seems that there is no way to see these log messages on the device without root access, but if you do have root access, there are a couple of options, either grant the required permissions to aLogcat or consider using a horrible hackTM to view them directly.
View the log files on your PC or workstation via
If you can connect your Android device to a PC or workstation, then you can access the logs via the
To do this on Windows, first you will need to install the Android SDK (which will require the Java SE SDK) and add the
android-sdk\platform-tools to the system path. Then enable USB debugging on your Nexus 7, plug it in via USB, and install the Android Composite ADB Interface from
android-sdk\extras\google\usb_driver (I had to force Windows XP to look here, it wouldn't find the drivers on it's own).
For details of how to get
adb up and running without the full Android SDK install, or on Mac or Linux machines, see Izzy's excellent answer to
Is there a minimal installation of ADB?
Then you can open a shell (i.e. a
cmd window) and run the command:
adb logcat k9:V *:S AndroidRuntime:E
- I have confirmed that this works on my non-rooted Nexus 7.
Grant permissions to aLogcat
If you have root access, you could consider granting the
READ_LOGS permission to aLogcat, as suggested in this post aLogcat/CatLog/Lumberjack not working? Do this ... on the xda-developers forum:
pm grant <pkg> android.permission.READ_LOGS
To grant this permission to
alogcat.donate, you would use one of the following commands, depending on whether you are running the donate version or not:
pm grant org.jtb.alogcat.donate android.permission.READ_LOGS
pm grant org.jtb.alogcat android.permission.READ_LOGS
According to one post on android-developers and the ticket, the permission grant survives reboot and update, but not uninstall/reinstall.
Sadly since this requires root access, whether I run this on the device or on my PC (prefixed by
adb shell) I just get the error:
Neither user 12345 nor current process has android.permission.GRANT_REVOKE_PERMISSION
- I cannot confirm that this works, since my Nexus 7 has not been rooted.
Consider using a horrible hackTM
If you have root access, you could consider making
logcat setuid root and running logcat from the device shell, as suggested in this answer to my How can I access android log files on my Nexus 7 without root access?question:
chmod 04755 /system/bin/logcat
logcat k9:V *:S AndroidRuntime:E
- Again, I cannot confirm that this works and I would probably only use it as a last resort, given the security implications.
Why are no log messages from K9 appearing in the aLogcat log viewer?
Could something have changed in Jelly Bean which lead K9's logging to stop working?
Since there seem to be remarkably few messages being shown by aLogcat in general, has something has changed in Jelly Bean which could mean that it is no longer able to access all messages?
This appears to be a change in Jelly Bean which affects all applications which may try to read the log files.
Apparently READ_LOGS permission is not granted to 3rd party applications in Jelly Bean. Since this link seems to be unreliable:
Today I've tested my application on newest (api 16) emulator before releasing it to Google Play. It turned out that Android now refuses to grant this permission to 3rd party applications. This is weird because I've looked through all Jelly Bean's documented changes and couldn't find anything that mentions READ_LOGS permission.
The protectionLevel for READ_LOGS is now "signature|system|development". The new pipe syntax for protectionLevel is also undocumented (see http://code.google.com/p/android/issues/detail?id=34785).
My suspicion is that aLogcat is only seeing messages generated by itself and it's vm.
For further information, see Flow answer's to my question How active should I expect my Jelly Bean system log file to be?