It
was much less cumbersome than getting the booklet to work. I had to put the jar directly at /opt/amazon/ebook/booklet/testBook.jar as the security policies didn't allow the symlinked jar to work and I didn't feel like changing them.
I added some code that sends a QUIT signal to HackedUpReader when the booklet's stop() method gets called. So far I've only seen that when you press the home button. Also when you quit HackedUpReader the booklet sends the same event as when you press the back button.
I did this by calling the command line program ("lipc-set-prop com.lab126.appmgrd backward 0") as I didn't find out easily how you would do that within the Java framework.
It works fine so far although sometimes it hangs for a second or two while starting or stopping. I suspect some memory shortage and it has to discard some cached stuff first.
I don't think this is good enough for the general non-developing end user but it is good enough for me.
I've also put
the source code onto github.