Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-14-2025, 12:33 PM   #1
Mino101
Member
Mino101 can extract oil from cheeseMino101 can extract oil from cheeseMino101 can extract oil from cheeseMino101 can extract oil from cheeseMino101 can extract oil from cheeseMino101 can extract oil from cheeseMino101 can extract oil from cheeseMino101 can extract oil from cheese
 
Posts: 15
Karma: 1028
Join Date: Jan 2025
Device: Kindle Basic 11th Gen
Cool [Showcase] ChatGPT and co. on default Kindle reader app

I replaced the wikipedia mini window in the default reader app, with Generative AI like ChatGPT and Gemini

- I injected custom classes in wikipedia.jar file that change the wikipedia url to a custom url. The url is set by editing a file.
- I wrote a simple cloudflare server that receives the Kindle's requests and forwards them to any API of my choice (ChatGPT, Gemini...). The prompt is set as an environment variable that I can edit from my phone / computer.



Development screenshots:
Spoiler:








I will document my discoveries and publish them, in the future when I have some free time.
Mino101 is offline   Reply With Quote
Old 01-14-2025, 02:43 PM   #2
BionicGecko
Fanatic
BionicGecko ought to be getting tired of karma fortunes by now.BionicGecko ought to be getting tired of karma fortunes by now.BionicGecko ought to be getting tired of karma fortunes by now.BionicGecko ought to be getting tired of karma fortunes by now.BionicGecko ought to be getting tired of karma fortunes by now.BionicGecko ought to be getting tired of karma fortunes by now.BionicGecko ought to be getting tired of karma fortunes by now.BionicGecko ought to be getting tired of karma fortunes by now.BionicGecko ought to be getting tired of karma fortunes by now.BionicGecko ought to be getting tired of karma fortunes by now.BionicGecko ought to be getting tired of karma fortunes by now.
 
BionicGecko's Avatar
 
Posts: 518
Karma: 5555555
Join Date: Aug 2016
Location: Czech Republic
Device: Voyage, Oasis, Scribe, Colorsoft, Libra Colour
This is awesome!
BionicGecko is offline   Reply With Quote
Advert
Old 01-14-2025, 03:47 PM   #3
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,516
Karma: 108666825
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
And appalling as ChatGPT and similar are environment destroying toys. Illegal scraped content and unreliable output. So parasites and also dishonestly promoted.
Quoth is offline   Reply With Quote
Old 01-14-2025, 05:11 PM   #4
cdhigh
Enthusiast
cdhigh ought to be getting tired of karma fortunes by now.cdhigh ought to be getting tired of karma fortunes by now.cdhigh ought to be getting tired of karma fortunes by now.cdhigh ought to be getting tired of karma fortunes by now.cdhigh ought to be getting tired of karma fortunes by now.cdhigh ought to be getting tired of karma fortunes by now.cdhigh ought to be getting tired of karma fortunes by now.cdhigh ought to be getting tired of karma fortunes by now.cdhigh ought to be getting tired of karma fortunes by now.cdhigh ought to be getting tired of karma fortunes by now.cdhigh ought to be getting tired of karma fortunes by now.
 
Posts: 41
Karma: 333334
Join Date: Oct 2011
Device: KINDLE 3
The next step should be adding an input textbox and implementing a multi-turn conversation feature.
cdhigh is offline   Reply With Quote
Old 01-14-2025, 09:25 PM   #5
briton
Junior Member
briton began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2025
Device: Kindle PaperWhite 4 (2018) WiFi+4G, 32GB
Quote:
Originally Posted by Mino101 View Post
I replaced the wikipedia mini window in the default reader app, with Generative AI like ChatGPT and Gemini

- I injected custom classes in wikipedia.jar file that change the wikipedia url to a custom url. The url is set by editing a file.
- I wrote a simple cloudflare server that receives the Kindle's requests and forwards them to any API of my choice (ChatGPT, Gemini...). The prompt is set as an environment variable that I can edit from my phone / computer.



Development screenshots:
Spoiler:








I will document my discoveries and publish them, in the future when I have some free time.
Cool! nice job
briton is offline   Reply With Quote
Advert
Old 01-26-2025, 03:46 PM   #6
qasim.ali97
Junior Member
qasim.ali97 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2025
Device: None
Quote:
Originally Posted by Mino101 View Post
I replaced the wikipedia mini window in the default reader app, with Generative AI like ChatGPT and Gemini

- I injected custom classes in wikipedia.jar file that change the wikipedia url to a custom url. The url is set by editing a file.
- I wrote a simple cloudflare server that receives the Kindle's requests and forwards them to any API of my choice (ChatGPT, Gemini...). The prompt is set as an environment variable that I can edit from my phone / computer.



Development screenshots:
Spoiler:








I will document my discoveries and publish them, in the future when I have some free time.



How can I use Chatgpt on kindle. Please if u know any guide share so I can use it
qasim.ali97 is offline   Reply With Quote
Old 01-26-2025, 03:50 PM   #7
qasim.ali97
Junior Member
qasim.ali97 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2025
Device: None
Quote:
Originally Posted by cdhigh View Post
The next step should be adding an input textbox and implementing a multi-turn conversation feature.

Hey I read your post from 2023 where you said you integrated Chatgpt with your kindle. I need help regarding that. Firstly which ereader should I buy so I can jailbreak it and how to install Chatgpt afterwards. Thankyou
qasim.ali97 is offline   Reply With Quote
Old 01-27-2025, 09:38 AM   #8
Sanctuary_L
Junior Member
Sanctuary_L began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2025
Device: KT6
Are you interested in exploring page flip animation? KT6 uses MT8110 CPU, the same as PW5, and it also supports page turning animation, but Amazon does not seem to enable it on FW, so we can see that it works after enabling page turning animation on KOReader. I think it should be possible to enable it by modifying the system file, but since I don't understand the code of Kindle firmware, I have no way to do this. If this is feasible, it would give us another option when buying a Kindle.
Sanctuary_L is offline   Reply With Quote
Old 01-27-2025, 09:51 AM   #9
shamanNS
Wizard
shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.
 
Posts: 1,128
Karma: 12345678
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW5, Kobo Libra 2, Kindle PW1
@Sanctuary_L You could maybe check if availability of that page turn animation functionality is controlled by the content of
"/etc/deviceConfig.conf" / by devcap-get-feature? Similarly to how someone managed to do this "waterproof" mod on Kindle Voyage:

https://www.mobileread.com/forums/sh...d.php?t=343353
shamanNS is offline   Reply With Quote
Old 01-27-2025, 12:52 PM   #10
Sanctuary_L
Junior Member
Sanctuary_L began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2025
Device: KT6
Quote:
Originally Posted by shamanNS View Post
@Sanctuary_L You could maybe check if availability of that page turn animation functionality is controlled by the content of
"/etc/deviceConfig.conf" / by devcap-get-feature? Similarly to how someone managed to do this "waterproof" mod on Kindle Voyage:

https://www.mobileread.com/forums/sh...d.php?t=343353
Unfortunately, I did find a suspected configuration: swipeMode.available, but it didn't work after changing it. Maybe this is not the right way.
Sanctuary_L is offline   Reply With Quote
Old 01-27-2025, 09:54 PM   #11
Sanctuary_L
Junior Member
Sanctuary_L began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2025
Device: KT6
Quote:
Originally Posted by shamanNS View Post
@Sanctuary_L You could maybe check if availability of that page turn animation functionality is controlled by the content of
"/etc/deviceConfig.conf" / by devcap-get-feature? Similarly to how someone managed to do this "waterproof" mod on Kindle Voyage:

https://www.mobileread.com/forums/sh...d.php?t=343353
I found out that I was wrong, it was actually enabled, but I traditionally thought it should be turned on in the comic book settings, it should actually be enabled in the text book, and when I checked I found that there was an extra page turning animation effect switch in the text book settings, yes, I now have the page turning animation turned on on 24 basic. Thank you very much for your enlightenment. I thought I should make a post to let more people who need it know how to do it.

Damn Amazon, they might use the page-turning animation as a selling point in the update of Basic in two or three years, but in fact 24 Basic already supports it, they didn't do anything, just changed a configuration.
Sanctuary_L is offline   Reply With Quote
Old Yesterday, 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
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone develop a chatGPT app/client for Kindle? cdhigh Kindle Developer's Corner 6 06-23-2023 04:09 PM
How to set my default reader app in CC? nano5 Calibre Companion 0 06-17-2021 03:14 AM
[Android App] Default reader app selection? Mousebumples Devices 12 11-13-2012 12:12 PM
Calibre default reader vs. Kindle app question robbw Calibre 3 05-23-2012 09:22 AM


All times are GMT -4. The time now is 05:19 PM.


MobileRead.com is a privately owned, operated and funded community.