View Single Post
Old 08-09-2015, 07:24 PM   #87
sstuardo
Junior Member
sstuardo began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2015
Device: kindle keyboard
Finally managed to do it. Here is what I did:

Target file is /opt/amazon/ebook/lib/booklet.jar
Class: com.amazon.ebook.common.gui.overlay.l
method ZrB

That method gathers the text-to-speech strings when you press the Aa button and returns them, so it says "Text-to-speech Turn On Turn Off" or "Texto-to-speech Turn off Pause" etc, depending on the situation . When tts is off, It also sets wether the menu is enabled or disabled (visible but gray)
If you explore (I used JD-gui) the file I mentioned, you'll find the last line of the method contains an "if (...) then a.setEnabled(false)". That's the line to avoid.

So I tried to fix it the "elegant" way: make a jbpatch, so needed to install eclipse and jadclipse and jbpatch and make a project and compile it and after 2 days of hard work... I failed miserably (and realized I'm no programmer)

So unzipped the jar, searched for the class file, grabbed JBE and edited the method. Replaced the bytecode instruction iconst_0 to iconst_m1 (equivalent to changing a.setEnabled(false) to a.setEnabled(true)), saved the file, zipped the jar, copied to my kindle the standard way (to user root directory), mount --bind the modified jar to cover-instead-of-replacing the original file and Bingo!

Well... I know... ugliest solution, but it works for me. Now I can tts any book. If any newbie as me is going to try this my way, I strongly recommend disabling kindle's automatic OTA updates, as I guess the file may get corrupted.

Also, dsmid, could you add a little note on this on your first post?

For the record, I own a Kindle Keyboard wifi (B008), firmware version 3.4.2 (2687240004)

(Cannot post the modified file because it's amazons copyrighted.)

Last edited by sstuardo; 08-10-2015 at 09:22 AM. Reason: remove Amazon-copyrighted IP / text clarity
sstuardo is offline   Reply With Quote