Qt and Sudoku! Free Edition for the Amazon Kindle 2 & DX
By Darron Black
January 30, 2010 at 12:39 AM
Get your apps for Kindle, right now! with this Kindle hack.
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 can be used with your own Kindle apps, personal or commercial.
HOSTING: Please do not re-host the install packages for the Qt platform except temporarily on the occasion that this site is not accessible. Refer people to this site instead. The uninstall packages can be re-hosted without limitations (to assist in any recovery, if it’s ever required).
Read these terms and click to download: I ACCEPT THE TERMS AND CONDITIONS
You must follow these steps:
- Plug in your Kindle to your computer and copy the Qt platform update package (update_install_kindleqt_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.
- 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
NOTE: once a hotkey is activated, you must wait 10 seconds before another hotkey will work.
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 driver 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 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 driver by default acts like a mouse… which so far is a pretty poor way to navigate on the Kindle. By passing in a “keypad” driver 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!
Comment from Donald Calloway: I’ve tried this Kindle 2 hack, and it really works! I also recommend you download the uninstall packages and store them somewhere on your PC just in case you run into problems down the road if and when Kindle pushes a firmware update to your Kindle that is incompatible with this Sudoku application.
Source: http://www.griffin.net/2010/01/hacking-the-amazon-kindle-dx-part-2-qt-and-sudoku.html









Hopefully you haven’t ignored the notifications about using the software may void your service and hardware warrenties on the Kindle 2.
Like or Dislike:
1
0 (+1)
Dan Calloway
1 Feb 10 at 6:11 am
It is really unfortunate that Amazon just isn’t getting to get the chance to continue the availability of present prices. In this overall economy it really is quite important to have the ability to choose entertainment available as an e-book for less than Ten greenbacks. All these publishing companies could be
Like or Dislike:
1
0 (+1)
Camelia Falck
3 Feb 10 at 7:47 am
Great article. There’s a lot of good information here, though I did want to let you know something – I am running Mac OS X with the latest beta of Firefox, and the design of your blog is kind of quirky for me. I can read the articles, but the navigation doesn’t work so great.
Like or Dislike:
1
0 (+1)
Maria Hrafn
3 Feb 10 at 11:59 pm
Hey there, I’ve been lurking around your blog for a few months. I love your article and your entire website! Looking forward to reading more!
Like or Dislike:
1
0 (+1)
klippel trenaunay syndrome
4 Feb 10 at 1:32 pm
Hey I just wanted to let you know, I actually like the piece of writing on your site. But I am utilising Flock on a machine running version 9.10 of Ubuntu and the design aren’t quite satisfying. Not a important deal, I can still basically read the articles and explore for information, but just wanted to inform you about that. The navigation bar is kind of challenging to apply with the config I’m running. Keep up the superb work!
Like or Dislike:
0
0 (0)
Jaylin Imram
13 Feb 10 at 9:56 pm
Hello! I have been reading some of your posts and am happy to see that your articles are actually informtive. I myself am a blog owner and have visited many blogs lately in order to meet some site owners who are interested in running blogs with high quality articles. The problem is that most blog owners these days steal their articles from other sites or other blogs. Many blogs I visit generally contain the same info. I see that your articles are original and you put a lot of work into your site. I mostly own blogs about pets. To be more specific, my blogs generally deal with dog health issues. I do run a huge vbulletin forum with hundreds of members. It is a community site ith a blog and many other functions. I do not want you to think that this message is spam because I would never do that to anyone. I myself know how annoying it is to have to filter my blogs for spam. With all that said, I will not bombard your website with all my links, but I would like to howeer post a link to the site that I just mentioned to you. I would really like it if you could visit my site and give me some feedback. Thank you for your time ad I will post mylink below. http://www.PetPedigreeDatabase.com/
Like or Dislike:
0
0 (0)
Jennifer Haynes
18 Feb 10 at 11:24 pm
The new Zune browser is surprisingly good, but not as good as the iPod’s. It works well, but isn’t as fast as Safari, and has a clunkier interface. If you occasionally plan on using the web browser that’s not an issue, but if you’re planning to browse the web alot from your PMP then the iPod’s larger screen and better browser may be important.
Like or Dislike:
0
0 (0)
Andrew A. Sailer
24 Feb 10 at 10:16 am