Ah whatever, I found some old project for the Kindle and reused that.
Source code and .azw2 are attached. READ ON BEFORE INSTALLING, though:
This will NOT work out of the box.
From within your Kindlet, you get a com.amazon.kindle.kindlet.KindletContext. The standard implementation of it, com.amazon.kindle.kindlet.internal.StandardKindlet Context, includes three additional methods beyond those defined in the interface: getOrientationController(), getToolbar(), and setScreenUpdateMode().
So while these methods are actually available in the implementation, they are not declared in the interface. This is probably a glitch.
Now, you can't just cast the instance to the actual class, because the Kindlet class loader does not allow you to access these. In fact, it'll simply give you a ClassNotFoundException. The (only) classes which you are allowed to access are listed in the resource com/amazon/kindle/kindlet/internal/security/whiteListedClassNames (contained in KindletImplementation-2.0.jar). You will have to break out of this classloader first in order to get full access to your device.
This is what the json_simple-1.1.jar is there for. It allows to escape the restrictive class loader, and also allows you to do other nifty things, like gaining additional permissions to write to the file system, read additional properties etc. You have to copy this one into /opt/amazon/ebook/lib as well.
This is actually a project which I did for the Kindle 3 about a year ago, but never released it. Now that I see it's actually required to get some fundamental stuff done on the K-Touch, I'll probably make it public.
PS: You can use the keystore from here: https://www.mobileread.com/forums/sho...d.php?t=152294