View Single Post
Old 09-11-2025, 02:31 PM   #12
am174744
Junior Member
am174744 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2025
Device: Kindle Paperwhite 7th gen
Successful replication

I managed to replicate this hack with a little bit of help from the OP. This is an old post but I'm adding more details in case someone stumbles upon it like I did and could use more help (like I did).

- The first step is of course to hack your kindle, install KUAL and USBNetwork. These are described in detail in other posts.

- Next you connect to your kindle via USBNetwork and ssh. Find the wikipedia.jar file which is located in "/opt/amazon/ebook/lib" and copy it to your local drive (I used Cyberduck for that).

- Use a java bytcode editor (OP recommended https://github.com/Col-E/Recaf) to edit the wikipedia.jar (I ran it in the GUI version "java -jar recaf-gui-0.8.8.jar")

- In the bytcode editor find the Classes directory and navigate to "com.amazon.ebook.booklet.reader.plugin.wikipedia. service.UriLocator". Find the "https://wiki-acx.amazon.com" string - you will need to replace it with the url of your own service.

- Set up your own simple server. OP used Cloudflare but I used Pipedream as it is easy to set up and free for this use case. Just a simple trigger with code is enough. I've never used Pipedream before but it was strightforward enough with help from AI.
Here is the code I used to interpret requests from kindle and forward them to my AI endpoint: https://pastebin.com/hzj5SW7f. The code has the expected request and response format (I found it in wikipedia.jar but you don't have to).
Few notes:
-- I used OpenRouter but you can obviously change that. You'll need your own API key.
-- The AI model has to be pretty fast (e.g. gemini flash) or the request will time out.
-- Modify the prompt to get the behavior you want.

- Replace the "https://wiki-acx.amazon.com" with the address of your server. If using Recaf GUI, left click on the method containing the string, click edit in assembler, replace the string, save your change, go back to the UriLocator.class to make sure the change is reflected. Once done export the application to a new jar.

- SSH in to your kindle via USBNetwork again, enable write mode ("mntroot rw"), rename wikipedia.jar to something else and copy your new jar as wikipedia.jar.

- Restart the kindle and try it out. It may work. It only took me 5 tries but I'm exceptionally gifted.

Feel free to ping me with questions.
am174744 is offline   Reply With Quote