View Single Post
Old 12-18-2011, 09:41 PM   #7
yifanlu
Kindle Dissector
yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.
 
Posts: 662
Karma: 475607
Join Date: Jul 2010
Device: Amazon Kindle 3
Ok, the launcher thing is 99% done. The last thing to do is to create a startup/shutdown loader system. So far, it requires one file to be patched (for the launcher menu to show up in the home screen). It uses the readersdk to hook onto the menu when you're reading. I won't be able to release it until I finish writing the new updater system. It doesn't seem like there's much interest in this, so I may put it off for a while. Meanwhile, it's great for my personal use. I wrote some nice tweaks for the Touch (rotate screen, enable/disable screensaver, enable/disable usbnet, etc) that I can access easily.

If anyone wants to know how I patched the home screen's menu system. I took JBE (Java Bytecode Editor) and opened up "com.
amazon.kindle.home.view.browse.BrowseDisplayContro ller.$BrowseMenuManager" (found in /opt/amazon/ebook/booklet/home.jar) and under the initMenu() method, I added the following bytecode after line 25:
Code:
aload_0
getfield com/amazon/kindle/home/view/browse/BrowseDisplayController$BrowseMenuManager/B Lcom/amazon/agui/swing/MenuDialog;
invokestatic com/yifanlu/Kindle/KindleLauncher/getInstance()Ljavax/swing/Action;
invokevirtual com/amazon/agui/swing/MenuDialog/addActionWithIndicator(Ljavax/swing/Action;)Ljavax/swing/AbstractButton;
pop
Then I made sure all the gotos and jumps afterwards were corrected with the new line numbers.
I saved the class and added it into my KindleLauncher.jar and added that jar into /opt/amazon/ebook/lib, since it's in the lib folder it gets loaded before home.jar.
Then I edited /opt/amazon/ebook/config/reader_plugins.xml and added my reader plugin in it.

Last edited by yifanlu; 12-18-2011 at 10:51 PM.
yifanlu is offline   Reply With Quote