Get your apps for Kindle, right now!
I've compiled the Qt software platform for the Kindle... and I've written plugins for the e-ink display, the keyboard, and the fiveway.
On this platform, I've created a great little sample app: Sudoku! Free Edition.
- 5 difficulty levels (easy, medium, hard, fiendish, and diabolical)
- 250 pregenerated boards (in the free edition)
- Custom mode to add your own game (from your local newspaper, for instance)
- Optional autofill of scratch marks
- Strategy view mode to easily see potential locations for each number
- Save and load as often as you want (keep that hard one for later)
- Automatically saves where you were when you last played
DISCLAIMER: This software is released AS-IS with ABSOLUTELY NO WARRANTY OF ANY KIND. Use of this software (and the Qt environment) may violate the terms of your Kindle service and/or warranty. Also, the Qt environment may interfere with future Kindle software updates from Amazon. The installation of this software indicates your knowledge and acceptance of these risks.
The Qt environment and Sudoku only add new features not previously present in the Kindle platform-- they do not replace or supercede standard Kindle functionality. They are not derivative works but are instead transformative in nature.ACCEPTABLE USES: The Sudoku! Free Edition game is for personal use only, do not redistribute it. The Qt platform proof-of-concept plugins are LGPL licensed and can therefore be used with your own Kindle apps, personal or commercial. (as long as you follow the terms of that license)
Read these terms and click to download: I ACCEPT THE TERMS AND CONDITIONS
UPDATE:I've made the LGPL-licensed source code available, as well as a build folder for building the packages themselves (based on others' great packager work). There is also a new set of packages available on the download page linked to above that may work with the newer firmware versions. (Let me know if they work, and if there's no trouble I'll remove the older packages)
You must follow these steps:
- Plug in your Kindle to your computer and copy the Qt platform update package (update_install_qt_xxx.bin, for example) to it's top level folder. Eject and disconnect the Kindle.
- Go to the settings page, and choose "Update your Kindle" from the menu. Press OK if a warning dialog pops up.
- Plug in your Kindle again and copy the plugins package to your Kindle (update_install_kindleqtplugins_xxx.bin). Eject and disconnect the Kindle.
- Go to the settings page again and choose "Update your Kindle" from the menu. Press OK on the warning dialog to do the install.
- Once this is done, RESTART YOUR KINDLE. The "restart" after the update isn't good enough. Go back to the settings page, and choose "Restart". This is necessary to get the hotkey manager running normally.
- Now copy the Sudoku install package (update_install_sudoku_xxx.bin, for example) the same way you did the Qt platform package in step 1.
- Run the "Update your Kindle" process from the settings page again.
- You're done! Try the hotkeys:
- S + U to play Sudoku (shuts down the framework, then restarts it when done)
- R + S + T reboots the Kindle
- N + F shuts down the normal Kindle framework
- F + W restarts the normal Kindle framework
- U + D runs a little update display script that may not appear to do anything
- S + C captures the screen and saves it in a folder called screenshots as screenN.jpg
Background
Once I received my Kindle DX, I quickly discovered that it is actually a Linux device with a ~533Mhz ARM processor. (It's actually a little embarrassing I didn't know that beforehand). To me, that just screamed Qt/Embedded. I was really itching to write some plugins ever since I saw the base classes in the Qt docs. It's good practice... I'll probably need to do something similar on a future embedded project.
Compiling Qt for the Kindle
After about a day of work, I figured out how to get Qt compiled. Most of that time was just getting Scratchbox set up properly with the right toolchain. I also had to create a VirtualBox VM with Ubuntu 9.10 x86 (32bit), since I run 64bit on the laptop. (as a bonus, using VMs keeps your main system nice and clean)
Once the cross-compiling environment was set up, it was actually easier to compile Qt for the Kindle than to do the same for VS2005.
Qt Platform Package Overview
After being compiled, the Qt libs were copied it over to the Kindle. They're a little too big for the small system partitions on the Kindle, so they were placed on the /mnt/us partition. That makes it visible when the Kindle is plugged in USB, which isn't ideal. It works, though.
The hotkey manager was added as the main way to run apps using the Qt platform. This will look for any multi-key combinations and run any existing scripts in the hotkey-scripts folder. The script names must have the keys in alphabetic order. It also won't trigger more than one script every 10 seconds.
The screenshot utility is just dumping the framebuffer at /proc/eink_fb/virtual_fb with the standard Linux dd command, and converting that raw data into JPEG with a simple command- line Qt app. Please don't abuse this utility. I find it very useful, and I hope developers who may end up using this Qt platform will use it to demonstrate what they've accomplished.
The fiveway plugin by default acts like a mouse... which so far is a pretty poor way to navigate on the Kindle. By passing in a "keypad" plugin option (Sudoku! uses this), it transitions over to cursor key mode. There's a script called fivewayspeedup which takes one parameter: either on or off. When enabled, it will tweak the auto-repeat settings for the fiveway to act a little more like a mouse. It's still a last resort interface.
Rationale
This is about using my favorite software platform everywhere I can. It's a gorgeous library, and I hope it does well.
Qt Everywhere!
@A Facebook User: Sorry, I've moved on from the Kindle at this point. The virtual machine I used for compiling for Kindle has been updated for WebOS and LTIB ARM targets. The "right toolchain" link above in the "Compiling Qt for the Kindle" section is what you need, along with a recent Scratchbox 1 install.
Posted by: darron | 09/07/2011 at 09:49 AM
Hi Darron, great work!
I want to compile QT for Kindle3. Please can you send more detailed readme how to get QT successfully compiled on Ubuntu to save time?
Each line of detail will be usefull...
Thanks in advance.
Posted by: A Facebook User | 09/06/2011 at 12:44 AM
Great project!
I'm currently trying to design a remote pushbutton/microcontroller interface for the Kindle DX (graphite) for my dad who is a quadriplegic. DO you know if it would it be possible to send simple commands to the serial port to navigate the Kindle? I'm just looking for next/previous page commands for now. Thanks!
Posted by: Rob Hamersma | 04/17/2011 at 04:10 PM
Please make a K3 version too :)
Posted by: Account Deleted | 11/23/2010 at 01:03 AM
It is working on Kindle 3 ?
Posted by: Account Deleted | 09/22/2010 at 04:57 AM
Okay, I've put up plugin source, my build folder and scripts for building the packages, and a new set of packages to test. Let me know if they work!
Posted by: darron | 08/27/2010 at 09:44 AM
@h1uke: great, thanks! I can host rebuilt packages if you want (what name would you want shown as a credit for the update?). I do plan to release code, but I've been absolutely swamped with work for a few months now. (It is easing up a little)
Posted by: darron | 08/27/2010 at 08:02 AM
Great job!
After repackaging I was able to install the Qt platform/QT plugins on my KDX Gray and it worked for me well.
Would you consider to host the re-built installation packages
for Kindle DXG/fw 2.5.5 to avoid re-hosting?
Also, do you have any plans to open the kindle-specific pluging you wrote?
Thanks,
h1uke
Posted by: h1uke | 08/24/2010 at 03:34 PM
my kindle runs 2.5.5 DX2 type. This install does not work on it, probably some updated security from amazon?
The Update your Kindle option is never highlighted. If I do a restart, it tries to install the software update and is unsuccessful.
I hope someone finds a workaround for the dx2??
Posted by: Theuns | 08/05/2010 at 08:58 AM
Hi all,
Great hacking there.
How easy would it be to change the 20 minute time before switching off the kindle? or disable it completely?
Posted by: Theuns | 07/23/2010 at 04:41 AM
Great project!
I tried to compile KindleSampleQt with my Ubuntu9.10 + maemo SDK (Diablo) immediately.
But following error occurred when execute on Kindle.
symbol lookup error: ./KindleSampleQt: undefined symbol: _ZN7QWidget8x11EventEP7_XEvent
If it's permitted, Please tell me your proper way to set up develop environment.
Posted by: Hitoriblog | 02/05/2010 at 10:27 PM
Try re-installing the Sudoku package, by copying the update_install_sudoku_???.bin to your Kindle, then running "Update your Kindle" from the settings menu. It sounds like it didn't install for some reason.
Posted by: darron | 02/02/2010 at 08:50 PM
Pushing the NF and the FW does it's things, but that's it. None of the other shortcuts work.
I've restarted a couple of times. No dice...
Posted by: Jack Lesshafft | 02/02/2010 at 08:17 PM
Excellent work! Going to try out on my DX tonight :)
Posted by: Hunter Davis | 02/01/2010 at 04:48 PM
Darron, excellent job! Easily installed and now playing the game. I had thought the Kindle was app-unfriendly, bu this opens up lots of possibilities...
Posted by: Capitolglow | 01/30/2010 at 06:59 PM
update: needed a restart, now it works fine thanks
Posted by: Adrian De los Santos | 01/30/2010 at 05:04 PM
Installed QT and sodoku.. restarted on each update, now.. how do i access sodoku ? tried pushing s and u but nothing happens ..
?
Posted by: Adrian De los Santos | 01/30/2010 at 04:40 PM