Leider habe ich nicht zurückverfolgen können, was eigentlich den Auslöser davon darstellte, gefühlt schien das K9 - Mail meines android zu spinnen: neu angelegte Unterordner auf dem imap-Server wurden da nicht angezeigt und beim Abruf neuer Nachrichten gab es oft reihenweise Fehlermeldungen (ssl-handshake fail). Alle Versuche, K9 mit veränderten Einstellungen zu heilen, schlugen fehl. 
Bis ich mir dann mal die Zeit nahm, auf den Server zu schauen und dort im mail.log viele Fehlermeldungen wie diese fand:

imapd-ssl: Maximum connection limit reached for (und die IP)

Wobei an dem Server nicht eben viele Clienten hingen, sondern genau zwei: ein Thunderbird und eben K9 auf dem Androiden. Die in den Fehlermeldungen gelisteten IPs liessen sich ohne Zweifel und Ausnahme auf das Android-Telefon zurückführen.
Google lieferte mir einen vergleichbaren Problembericht von jmd., dermit Thunderbird und einem OSX Mail auch diesen Fehler sah und ihn dort auf Mail zurückführte, wie bei mir tauchte die IP des Rechners mit Thunderbird nie auf. Auch dort kam nicht heraus, warum eine anfangs funktionierende Einrichtung dann diese Fehler warf, aber eine Abhilfe habe ich gefunden.

In /etc/imapd-ssl habe ich diese beiden Einträge angefügt:


noch ein /etc/init.d/courier-imap-ssl restart und seither ist Ruhe und K9 kommt auch wieder klar.

Android k9-mail with a different Icon

Monday, February 21. 2011

My Android mobile (HTC desire) runs k9-mail, a dilligently updated, configurable, imap-capable application well prepared to handle lots of mail but struck with an esthetically challenged icon. The head of a robot dog featured in a british cult tv series from the sixties - let's say you either love it or hate it. Judging by the number of hits this article gets I'm not alone with my irritation.

The little pic caused many discussions and every now and then someone creates a more suitable alternative and dares to propose it to the development team, but apparently this is like chewing rocks

OK, so either you leave it as it is or you change it yourself. But it is not completly trivial to change the icon of an android app, simply using an ressource editor and paste another icon into the file won't do. This is because Android apps are signed and if you change them after the signing they stop running.

On the other hand: it's open source, isn't it? So, create a project folder and on the command line type:
git clone https://github.com/k9mail/k-9.git
That done we follow the steps of 'How to build K-9 Mail' and if you happen to have set up an Android-Development Environment already, it takes but minutes and you see k9 running in the emulator. Nice, now for the icons. 

Our friend, the lovely dog, lives in two places within the ressources, at  
k-9/res/drawable/icon.png and k-9/res/drawable-hdpi/icon.png respectively.
In both places we replace it (.png, 72x72) with an image of our choice and proceed to create a new k9mail.apk with eclipse's File/Export/Android/Export android Application.

Now don't try to install the freshly built and signed k9-mail over the existing one, cause it won't. The AppInstaller starts up, displays the loading-grphs for a moment but it soon stops with nothing but a laconic message: Not installed. Searching the logs on my android didn't make me any wiser as to what was happening. 

So I tried adb which was far more eloquent. Started it as root:
sudo su
cd /opt/android-sdk-linux_86/platform-tools
./adb kill-server
./adb start-server
./adb devices

and it outputs:
List of devices attached 
emulator-5554   device
HT03ZPL02277    device

I closed the emulator with a click to make sure adb doesn't get confused about where to install in the next step and then input at the command line:
 ./adb install -r /path/to/git/proj/k9/apk/k9mail.apk

and it tells me all I need to know about the nature of the problem:
304 KB/s (2591136 bytes in 8.312s)
        pkg: /data/local/tmp/k9mail.apk

Doh! The original app was signed with a totally different keys than my own built all that signing serves to keep some bad guy to silently change an app - of course it wouldn't install. Somewhat incomfortable but I had to uninstall the original app in order to install my own built. Don't forget to backup your settings! 

Sort of breaking the dog on a wheel but it works and is a nice exercise, too. There is a con though: it probably breaks the updating so you'll need to check for new versions and build them manually. Alternative approaches do exist though I didn't try them.

Addendum re: k9 and documentation: it is rather sporadic and they are in search of people to help them writing it. But there is a Wiki a FAQ and a much needed explanation re: folder classes and how to use them

And another addendum, not that related to the above but I wanted to put the link somewhere: About installing Certificates

Oh, and then there is Kaiten Email. Dogless Icon included in the feature set, costs about 4€.


(Page 1 of 1, totaling 2 entries)