opportunity__cost

http://live.prokhorenko.us
Oct 14 2010

Jailbreaking Kindle

* Jailbreak

Download the attached kindle-jailbreak-0.3.N.zip file, and unpack it. In here, you'll find a bunch of .bin files, and a src directory.
Leave the directory alone, and upload the correct update_*_install.bin file for your kindle to the root directory of your Kindle.
(As always, k2 means K2 US, k2i means K2 GW, dx means KDX US, dxi means KDX GW, dxg means KDX Graphite, k3g means K3 3G (US [B006]), k3w means K3 WiFi [B008] and k3gb means K3 3G (UK [B00A]).
For a Kindle 2 International, that would be update_jailbreak_k2i_install.bin for example.

Now, eject your Kindle, and go to [HOME] -> [MENU] > Settings -> [MENU] > Update Your Kindle. It should be quick, and it should FAIL (With a U004 error on fw 3.x or with a U006 error on fw 2.x, in the bottom left corner of the screen). It's completely normal, intended, and harmless.

And that's it, your Kindle is now ready to install custom hacks!

* ScreenSavers

Download the attached kindle-ss-0.15.N.zip file, and unpack it. In here, you'll find a bunch of .bin files, and a src directory.

First, upload the correct update_*_install.bin file for your kindle to the root directory of your Kindle.
For a Kindle 2 International, that would be update_ss_0.15.N_k2i_install.bin for example.

Now, eject your Kindle, and go to [HOME] -> [MENU] > Settings -> [MENU] > Update Your Kindle. It should take a couple dozen of seconds.

You shouldn't even need to do a full restart after that .

To change your custom screensavers, plug your Kindle to your computer via USB, and upload them to the linkss/screensavers folder that has been created by the hack. You'll have to restart your Kindle in order to take your new screensavers into account. To that effect, you can either use the autoreboot feature, or simply do a full restart of your Kindle.

To use the autoreboot feature: Just drop a blank file named reboot in the linkss folder (by copying and renaming the already existing "autoreboot" blank file, for example) (or in the linkfonts folder if you also have the fonts hack installed!), and your Kindle will do a quick reboot 10s after you've unplugged it!

If you want to randomize the sequence in which your screensavers will be shown, create a blank file named random in the linkss folder (right alongside the "auto" file), and then do a full restart of your Kindle! This will shuffle your screensavers around on each boot.

* Fonts

Download the attached kindle-fonts-3.9.N.zip file, and unpack it. In here, you'll find a bunch of .bin files, and a src directory.
NOTE: Since v3.9.N, this package has been split in two (solely because we were over the attachment size limit ).
The K2, K2I, DX, DXI and DXG packages are in the kindle-fonts-3.9.N-k2.zip archive, and the K3G, K3W and K3GB packages are in the kindle-fonts-3.9.N-k3.zip archive.

First, upload the correct update_*_install.bin file for your kindle to the root directory of your Kindle.
For a Kindle 2 International, that would be update_fonts_3.9.N_k2i_install.bin for example.

Now, eject your Kindle, and go to [HOME] -> [MENU] > Settings -> [MENU] > Update Your Kindle. It should take a few dozen of seconds. If you're on FW 3.x, and this is your first install, it may seem to hang for about a minute or two on the "Update successful, Your Kindle is restarting..." screen, that's okay.

You shouldn't even need to do a full restart after that .

If you want to change the fonts used by the hack, you'll have to upload them in the linkfonts/fonts directory, strictly following the usual naming scheme. (Type_Style.ttf) (for details on where each font is used, please see this post). The default fonts installed by the hack are the usual non-cjk unicode fonts (Droid Sans, Droid Serif & DejaVu Sans Mono), with the addition of the CJK-aware Droid Fallback if you're on FW 3.x. You'll find a bunch of other prepackaged, ready to use, font sets here, and in the next few replies:

* Droid_Sans.zip > Same as the default, only use Droid Sans instead of Droid Serif.

You'll have to restart your Kindle in order to properly take your new fonts into account.

By default, the autoreboot feature is enabled. If you wish to make use of it, don't forget to drop a blank file named reboot in the linkfonts folder (right alongside the "autoreboot" file, by copying and renaming it, for example). When that file is present, your Kindle should automatically do a quick reboot 10s after you've unplugged it.

FW 3.x: If you chose to handle the browser fonts, this will add a considerable overhead to this process (We need to regenerate FontConfig's config & cache). That can take more than a couple of minutes! It'll happen each time you update your fonts, either during the framework startup if you did a full restart, or before the framework restart when using the autoreboot feature!. So, if you're switching fonts on a K3, and you have enabled the browser fonts handling (more on that later), and you use the autoreboot feature, don't be surprised if it takes considerably more than 10s before the framework restarts!

Another thing to take into account with the FW 3.x is that the settings of the rendering engine have changed a bit. It now makes use of the TrueType bytecode hinting instructions of your fonts, and uses them to hint at the most aggressive level. (In terms of FT/FC settings: hinting=true, hintstyle=hintfull, autohint=false). What this means is that fonts without hinting instructions (or with crappy code) will look considerably fuzzier than they did before. It's especially noticeable at small sizes, and in the browser.

If you really want to be able to tweak the browser fonts, and don't care about the overhead involved, just remove the nobrowser file in the linkfonts folder, and Restart your Kindle, and wait. A lot. NOTE: Because regenerating the cache takes so much time, we won't try to handle the browser fonts by default, in order not to waste 5 minutes each font switch.

There's also two new custom fonts used for rendering non-latin scripts. CJK.ttf, like the name implies, is used to render Chinese/Japanese/Korean scripts. After that, there's I18N.ttf, which is used as a fallback. By default, the hack uses the DejaVu Sans font. While it's far more pretty than the vanilla fallback font usually used (code2000), it does seem to support a lot less different types of scripts. Long story short, if you have weird non-latin rendering issues, those are the two fonts you should look at .

If you don't use the autoreboot feature (for exemple if you removed the autoreboot file in the linkfonts folder), you'll have to do at least a framework restart each time you change the fonts. If you have no means of doing a framework restart (ie. via usbnetwork), you'll have to do a full restart via the Settings menu, or by holding the power switch for ~15 seconds). Do note that the autoreboot & Restart methods are both way cleaner (and possibly safer) than the physical hard-reboot (which basically just plugs the battery off for a little while, which explains why your Kindle needs to be unplugged from any power source for this to work).

/!\ Be careful, if you miss a font, the hack won't be applied, so you shouldn't have any problem, but if for some reason, the Kindle software doesn't like one of your custom font, they'll be garbled, or invisible. Also, it may prevent you from actually _seeing_ the Settings page to do the restart. (And actually reading any books, also.) If that happens to you, try one of the three methods described earlier to reboot your Kindle. If you want to avoid this kind of issue, use the autoreboot feature Also, don't remove the other fonts found in the linkfonts/fonts folder. We need them, and the hack won't be applied if they're missing.

FW 3.x: Apparently, even when using the autoreboot feature, some of you are still encountering some of these weird issues (on FW 3.x only!). To workaround this, I have packaged some of these fonts as an update file. Check this post for more details.

If you have some trouble with by briefs instructions, the MR wiki has been updated (with some screenshots):
Fonts Hack: http://wiki.mobileread.com/wiki/Kind...nd_3.x_Kindles
SS Hack: http://wiki.mobileread.com/wiki/Kind...nd_3.x_Kindles

NogDog also wrote several blog posts about these hacks (also with screenshots):
Fonts Hack: http://www.kindleminds.net/2010/06/2...e-version-2-5/.
SS Hack: http://www.kindleminds.net/2010/07/0...eensaver-hack/

NOTES:
Some people reported losing their collections when installing these hacks... It shouldn't happen, but apparently it's a bug in the vanilla 2.5 firmware, so make sure you do a Whispernet Sync and/or that you make a backup of your system/collections.json file before doing anything .

Don't try to force a custom update by rebooting your Kindle. You should *always* install custom hacks via the Settings page. If the 'Update Your Kindle' link is greyed out, it's because you uploaded the wrong binfile for your device. Don't try to force an install by rebooting. It'll, at best, fail, and at worst, force you to start your Kindle in recovery mode to delete the offending update.

Also note that, while there is a zipfile for the usbnetwok hack attached here, I won't provide any support for it, and I strongly discourage anyone not well versed in bare-bone Linux CLI system administration to even try it. It's far too easy to brick your device/mess up the software with that thing.

It might be an old news, but I recently came by this guide to jailbreaking your Kindle. Normally, you do not need that, as far as I remember, the majority of hacks already embedded with jailbreak, but if you want - you can have it.

In addition to this blog, I also run a Startup Product newsletter.

To subscribe, enter your email address:      

Delivered by TinyLetter

May 4 2010

Hackers playground

Want to beat the hackers at their own game?

  • Learn how hackers find security vulnerabilities!
  • Learn how hackers exploit web applications!
  • Learn how to stop them!

This codelab shows how web application vulnerabilities can be exploited and how to defend against these attacks. The best way to learn things is by doing, so you'll get a chance to do some real penetration testing, actually exploiting a real application. Specifically, you'll learn the following:

  • How an application can be attacked using common web security vulnerabilities, like cross-site scripting vulnerabilities (XSS) and cross-site request forgery (XSRF).
  • How to find, fix, and avoid these common vulnerabilities and other bugs that have a security impact, such as denial-of-service, information disclosure, or remote code execution.

To get the most out of this lab, you should have some familiarity with how a web application works (e.g., general knowledge of HTML, templates, cookies, AJAX, etc.).

Google, you just don't get it. It's not interesting to mess with something that you're allowed to. :) You should kept your disclaimer notes hidden, so once somebody gets in there, he can read and then PR is all yours.

In addition to this blog, I also run a Startup Product newsletter.

To subscribe, enter your email address:      

Delivered by TinyLetter

Feb 13 2010

Amazon Associates Bookmarklet

Amazon Associates Bookmarklet

A bookmarklet to convert any Amazon product page into a page 'tagged' with your Amazon Associates ID

Amazon Associates Bookmarklet v1.1

To use this bookmarklet, follow these steps:

  1. Drag the above link to your browser's toolbar.
  2. Edit the JavaScript to reflect your Amazon Associates ID (i.e., change "justinblanton-20" to your ID).
  3. Click the bookmarklet while you are on any Amazon product page.
  4. Wait for the page to refresh and then, depending on your intended use, either do nothing or copy/paste the URI that's now in the address bar.

I've tested this only on Firefox and Safari, but it should work with most any web browser.

*Disclaimer*: I love Amazon. And I have Amazon Associates account that gives me a chance to send people to Amazon thru my referral links and get paid. I usually generate about 10 bucks in 6 months, so this is more like fun rather than a business. :)

Anyways, after getting tired of Firefox slowness on my Mac laptop and moving to Safari, I found that I missing the Amazon Affiliates plugin more than I thought I would. Even after Amazon has added a site bar on the top of the page, it still needs too much of clicks and keystrokes.

So I thought that I would do a quick bookmarklet to make a proper affiliates link for Amazon pages. However, Googling first, I found this link and it was working fine.

With one little issue - the link was still too long. Well, it's much shorter than what Amazon gives to me, but still long. So I tweaked the Javascript code a little bit to make it produce a better links:

Was:

http://www.amazon.com/exec/obidos/ASIN/B0015T963C/iwhite-20/ref=nosim/

Now:

http://www.amazon.com/dp/B0015T963C/?tag=iwhite-20

You can probably do well without URL shortener now.

Here is the code:

javascript:aid='iwhite-20';asin='';if(document.getElementById('ASIN')){asin=document.getElementById('ASIN').value;document.location='http://www.amazon.com/dp/'+asin+'/\?tag='+aid}else{alert('I\'m%20sorry,%20but%20an%20ASIN%20can\'t%20be%20found.%20Please%20make%20sure%20you\'re%20on%20an%20individual%20product%20page.')}

Sorry if it doesn't read well - I don't know all the tricks of Posterous' bookmarklet, yet, too. :) Enjoy.

In addition to this blog, I also run a Startup Product newsletter.

To subscribe, enter your email address:      

Delivered by TinyLetter

Dec 22 2009

Amazon's Kindle DRM is broken

According to a translated writeup of the Kindle hack here, Amazon engineers went to considerable lengths to prevent their DRM from being tampered with. The Kindle for PC uses a separate session key to encrypt and decrypt each book "and they seem to have done a reasonable job on the obfuscation," the author says.

The crack comes courtesy of a piece of software titled unswindle, and it's available here. Once installed, proprietary Amazon ebooks can be converted into the open Mobi format.

Media_httpfarm1staticflickrcom217447876598e5de70be31jpgv0_eeefalfbycuekch

Personally, I think that DRM is only a headache. Amazon is probably making enough money on selling e-books, so why not allow them to be portable anywhere? Making books more available would make a bigger impact on shrinking the size of market of illegal ebooks floating around, instead of adding new protections here.

In addition to this blog, I also run a Startup Product newsletter.

To subscribe, enter your email address:      

Delivered by TinyLetter

Sep 25 2009

Safe-rm to fight with your bad habits

Safe-rm is a safety tool intended to prevent the accidental deletion of important files by replacing /bin/rm with a wrapper, which checks the given arguments against a configurable blacklist of files and directories that should never be removed.

Well...

Media_httpwwwredbloodedthingcomblogpicscolocalltoplesstitssysadminnuderackjpg_wbdqaddawgakdxw

While I absolutely agree that the idea is really nice and would safe a lot of asses from big pain, personally, I would never use it.

You know, there are some things in this world that cannot be taught. They need either to be fully understood and burned deeply or learned by your own pain. Sometimes a lot of pain.

Whenever I'm typing rm -r I'm already nervous. Whenever I see rm -f I'm freaking scared. This is just my gut feeling, I can't do much with it and I don't need to. I had a few painful lessons in the beginning and now I'm so thankful for that.

You know what, try rm -rf / yourself. It's not just one lesson. It's a set of lessons about working as root instead of regular user, keeping regular and proper backups, thinking before act and whatever not. You'll not forget that and you wouldn't need safe-rm anymore. :)

The same with molly-guard that prevents accidental reboots. Come on, this one is really fun. Why do you need that at all? If you server reboot is painful, you're already in danger. If your services doesn't boot well, doh, go fix it. If you don't have any load balancing and fault tolerance policy, go implement one. But don't go for the hack to save your ass from not doing anything else.

P.S. Don't get offended, just my 5 cents. :) Have fun.

In addition to this blog, I also run a Startup Product newsletter.

To subscribe, enter your email address:      

Delivered by TinyLetter

About Olexandr Prokhorenko

My name is Olexandr Prokhorenko. I am passionate about building products that users *love*.

My LinkedIn profile is www.linkedin.com/in/white.


TwitterFacebookLinkedInFriendfeedPicasaFlickrYoutubeVimeoDeliciousLivejournalBloggerScribd

Search Blog

@iwhite   

Tags