H@cking the Kindle Touch (KT2)

hacking-the-kindle-touch-2

So, when I first bought my Kindle Touch 2 [early 2015], I wanted to read more, and maybe learn some new English words. It had, after-all, been a while since my last General Paper lesson (we had an awesome teacher who came with new words each lesson!) The reading went well, although I’d later on get lost in the day job stress and ‘lend’ my Kindle to a close friend who had time to read. Let’s just say he read for the both of us 😀
I had done a few searches on the Internets on any interesting hacks for the Kindle line of products, and as always, the world never disappointed! There were jailbreaks available that allowed greater functionality, and additional modification lee-way for you to change everything from the wallpaper to the font displayed while you read books. As always, most of these are enthusiast perks and usually don’t appeal much to the regular user. There was a little problem, though! Because my Kindle was [i think] fairly new, it’s jailbreak was not available. I was devastated! A good part of my desire to purchase new tech is always the possibility of hacking, tinkering, pwning (and possibly bricking) said tech, so you can imagine how this news brought tears to my eyes (I had to reduce the opacity of the tears though because, apparently, real men don’t cry).

Fast forward this year, and I have another Kindle [same type] and I’m back to kick-starting my reading culture. Well, to be honest, i’d been reading hard copy books and I was short on cash to buy physical books so I figured it was time to read the thousands of e-books I already have collecting binary dust somewhere in the shiny spinning plates of my hard-drive (No, I don’t own an SSD [yet]. I’m ancient, I know. Let’s move on, shall we?). As always, when I got the Kindle, it was just a matter of time till my mind led me back to the Internets searching for a jailbreak.

I had bought a ‘Special Offers’ Kindle (mbu to save money – $30 of money) and had ended up with a dope Kindle with goddamn ads! F@&#$n ads, man!!! As a person who can’t function without ad-block extensions on my internet browsers, you can imagine how the Kindle ads frustrated me. I needed a jailbreak quick so I could remove the ads and be able to slap on a pretty wallpaper that would display when I wasn’t reading.

That was when I landed on the good people over at mobileread. There was a jailbreak thread and it had all the info I needed (you’ll want to first know what Kindle model you have). After a couple of MBs and hours, I was ready to break into the organized tranny of Amazon and free my damsel from the capitalist hands of her current captor (In short, I was trying to be cheap – buy with ads and hack the ads away). I spent most of the night jailbreaking and being excited at how easy it was. I was also shocked at how an update package for a device as ‘simple’ as a Kindle was upwards of 500MB! Anywho, I jailbroke and even added a nifty app called KUAL (Kindle Unified Application Launcher) which works a lot like Cydia did for the jailbroken iPhones, but without the repo framework. It cannot be empathized enough how life-saving ‘gateway’ apps like these are, particularly in situations where the end-user is trying to ‘expand’ the horizons of the tech manufacturer’s ecosystem.

I installed a ScreenSavers hack and was super excited at the possibility of not having to look at that default Kindle screensaver every again 😀 I was so excited that I missed reading a special note they’d written at the top of the post;

Note for Kindle Special Offers Users:

This doesn’t, and won’t ever, help you bypass something you agreed to (screensaver ads), so please stop asking.

Needless to say, the ScreenSavers hack didn’t work. I was frustrated, but I had a jalibreak, and that meant that I had (or could get) root access. That meant that I just had to find an SSH or similar app and go straight to the device’s internals, where I could manually delete/replace the ScreenSaver image. That was plan B. It was time to execute!

Where do I get an SSH app?

I needed an SSH app to grant me a remote shell to the Kindle’s base system where I could edit what I wanted when I wanted to. I found one (usbnet) and installed it.

I also had to get PuTTY for the PC to leverage my SSH abilities. When I plugged the Kindle in, it no longer was showing up as a removable device. I went to Network and Sharing center and did some stuff (see here and look at the part after he enters Diagnostics mode) so that it could talk to my SSH client, PuTTY.

How do I remove the Amazon ads?
So, first of all, removing the ads is a moral gray-area and I won’t pretend that I support it one bit (I am ashamed to admit I wanted to remove them). It is unfair to the people at amazon, and $30 is a very small amount to pay for a clean ad-free Kindle. To that end, I will not share how ads are removed, but I’ll only tell you what I would have done had I wanted to remove them.
First, I’d need to locate where on the Kindle the ads are downloaded and stored to. For mine (KT2), that location is

system/.assets/
Then, I’d need to delete that folder and replace it with a blank file to fill the gap left over. There’s a guy who talks about it at length if you’re interested in checking it out.

Where are the Screensaver images located?

My first assumption (I’d done a bunch of research) led me to
/usr/share/blanket/

I found there a couple of folders (as seen in the screenshot above), with some interesting content!
There are 5 folders and 1 image there. The folders are:
  • ota which I assume is where some downloaded content goes. Not sure what content, though.
  • screensaver which is usually empty, but occasionally appeared to be symlinked with the /mnt/us/linkss/screensavers/ folder (from the mounted ‘USB root’ of the device)
  • shutdown which contains some images
  • splash which also contains some images
  • usb which (yes, you guessed it) also contains some images

How do I know which one to replace for what?

Below is a breakdown of the directory and what hacks can be gotten from it.

A simple deduction from that directory tree shows that:
  1. shutdown/bg_reboot.png can be replaced with an image you want to see whenever the Kindle shuts down during a restart.
  2. splash/bg_default.png can be replaced with an image you want to see whenever the Kindle is switching on / booting up.
  3. usb/bg_connect.png can be modified to show something you’d want to see everytime you connect the Kindle to a PC. I use the word ‘modified’ because that image is designed to leave space for text and therefore, you don’t want to draw or design over the WHOLE of it.
Below is an example of what I’m talking about:

Final findings

I was able to swap those 3 images for ones I’d created earlier and everything runs awesome now! When my Kindle boots up, I see a picture of my beautiful girlfriend 😉
I was not able to get the screensaver, though. I failed to find its location. I originally assumed it was in /ota/ because I’d found an exact copy of the screensaver image there, but I was mistaken.
I had also located another directory
/var/local/blanket/low_level_screens/images/
This directory contains splash.png that is one of the opening screens when the Kindle is booting (where there’s a person seated under a tree). I swapped it out and every image I placed there was warped when it displayed, until I put back the original one (which worked like a charm). I ended up conceding on that front, although I was successful on pretty much all the rest.
Now, I will live happily ever after with my slightly-modded Kindle until I can afford to throw some money at the Paperwhite Oasis (which you can read in the evening/night)

As a goodbye, here’s a screenshot of me navigating most all of the folders starting from root (because I have all the time in the world), searching for that still-elusive screensaver image.
Lemme know if you find it 😉