Amazon’s Kindle 4 comes in two flavors, one that is ad supported ($79) and one that isn’t ($109, price difference of $30). If you have the ad supported one, at any point in time Amazon allows you to pay the difference of $30 and remove the ads. In this article I will explain not only how you can remove the ads at no cost, but also how you can replace them with your own screensaver images. Very cool stuff! This procedure should also work for the Kindle 3, but I haven’t tried it. Recently I had confirmation that it works for the Kindle Touch.
I will first explain how to simply remove the ads (and keep the default screensaver images provided by Amazon) because this is the easiest method. If you are up for the challenge I will then explain how you can also replace the default screensaver images with your own ones! It’s not that much more difficult but it does require a few extra steps. The screenshots and instructions are for Windows users but the same operations can be done on OSX or Linux.
Before we get started: backup your stuff!
If you have books, notes and whatsoever on your Kindle, you should backup your stuff before proceeding. Amazon’s whispersync is pretty good at synching your stuff, but it’s better to make a copy of your own! Connect your Kindle via USB and make a copy of the documents, and .active-content-data folder. Save it somewhere on your Desktop.
Method 1: Remove the ads
From your Kindle, press the menu button (the one on the left of the home button) and select the “Settings” menu. From there press the “Reset to Factory Defaults” button.
You will be asked to confirm your choice, select “OK”. Press the home button and wait for your Kindle to restart.
Once restarted, select your language but DO NOT connect the Kindle to WiFi yet. Leave the Kindle at the connect to WiFi screen and plug it to your USB port.
From there, navigate to your Kindle drive, into the system directory (this might be hidden if you haven’t set Windows Explorer to show hidden files and folders) and create an empty text file. Then from a console prompt rename the file into “.assets”. Knowing that many people would struggle with these steps, I made a nice program that does it all for you (Windows users only). So you can simply download my Kindle4Free script, extract it on your Desktop and double click the Kindle4Free.bat file. The script will detect where your Kindle drive’s is and do the steps for you.
OSX/Linux users instead can simply type this in a Terminal window:
$ touch /mnt/Kindle/system/.assets
Where /mnt/Kindle is the mount point of your device.
Connect to WiFi, log-in into your Amazon’s account and enjoy your Ad Free Kindle. Simply copy back your documents and .active-content-data folder to restore your backup.
Method 2: Remove the ads AND replace them with images of your choice
Amazon’s default screensavers are OK, but they get boring after a while (plus there are some awesome ones on kindlewallpapers.tumblr.com that are worth checking out). Let’s see how it’s done.
When the Kindle connects to the internet, it first checks whether you have purchased the $30 dollar difference to find out if ads need to be downloaded.
Curious fact: if you never log-in with your account by skipping the log-in step during the first time setup, you will never see any ads.
If you haven’t paid the difference, the Kindle connects to a server (specifically, adpublisher.s3.amazonaws.com), downloads the ads and displays them to the user. Every ad has a start date, an expiration date and a priority. The process of replacing the ads with our own images goes as follow:
- We first trick the Kindle into believing that the ad server is located in our local network instead of the internet.
- We run a “fake” advertisement server on our local network that will serve the Kindle with our own “ads” (images) that will have top priority and will never expire (in fact they will, in 2024 but we won’t worry about it just yet). This will guarantee that even if new ads will be downloaded by the real ad server, they will not be displayed because their priority will be lower.
The process is explained in this simple picture:
- Ruby 1.9 (Windows, OSX and Linux). This is required to run the ad server. Version 1.8 will NOT work.
- k4freeserver (Windows, OSX and Linux). It’s my version of the ad server.
If your router allows you to add DNS entries you do not need these additional items, you can simply configure it to resolve all requests for adpublisher.s3.amazonaws.com to the address where you will run the ad server. If your router does not support this feature or if you didn’t understand what I just wrote, please download this additional program.
- Simple DNS Plus (Windows users, it’s a 14 days trial but you only need it once, after you’re done you can uninstall it).
- dnsmasq (OSX and Linux users)
Find out your network configuration
Since we will manually type the network configuration of the Kindle, we need to find out a few things. On Windows, click on the icon in the system tray where you can select your WiFi connections. Then right click the network you are currently connected to and press “Status”.
From the newly opened window, press the “Details” button.
Write down on a piece of paper the following information from the Details window:
- IPv4 Address
- IPv4 Subnet Mask
- IPv4 Default Gateway
Also take the the last set of digits from the IPv4 Address and add 50 to it. Then write down on your piece of paper Kindle IPv4 Address and note down the new address. For example, if my IPv4 Address is 192.168.1.107 I take the last set of digits (107), add 50 (107 + 50 = 157) and write my Kindle IPv4 Address as 192.168.1.157. This has a good chance of being a valid and unused address for your network. If that address is already being used by another device you should pick another one.
Configure the DNS server
Open Simple DNS Plus. From the toolbar press the “New” button, then “New Zone”.
Choose “Primary Zone”.
Choose “Forward Zone”.
From the toolbar, press the “New” button and click on the “New A-Record (Host Address)” button.
Type your IPv4 Address into the box. Leave the other options unchanged.
Press OK. Make sure you press the “Save” button to apply the changes done so far. At the end your screen should look like this:
You can close the window. The program will continue running in the background.
If you are using OSX/Linux, after you have installed dnsmasq add the following line to your /etc/dnsmasq.conf, then simply restart the service (or if you don’t know how to do that, simply reboot your computer):
Of course replace IPv4 Address with the proper value.
Start the Ad Server
Open the directory where you extracted k4freeserver.
- If you have a Kindle 4, open the k4freeserver/Ads/Kindle/Screensavers folder. Remember that you will place .GIF images here.
- If you have a Kindle Touch, open the k4freeserver/Ads/KindleTouch/Screensavers folder. Remember that you will place .PNG images here.
These are the locations where you can put your screensavers! The images will be fed to the Kindle in random order whenever there’s a request for an ad! Search on the internet for some cool screensavers and save them into this folder. You can also create your own images as long as they are of 600×800 dimensions (in .gif format if you have a Kindle 4 or .png if you have a Kindle Touch). Keep in mind that the number of screensavers you can put depends on the number of ads that Amazon decides to request when you start-up your Kindle. Saying that at least 5 ads will be requested is a pretty safe assumption, so try to limit your number of screensavers to 5-10. You can place more images than that in the folder, but there’s a chance that some of them will never make it to the Kindle.
When you’re done selecting your awesome soon-to-be screensavers, double click “startServer.bat”. (OSX and Linux users can open a Terminal and launch it with a ./k4freeserver.rb –v). Keep in mind that you need administrative privileges to run the program. You should be greeted by an output that looks like this:
Launching k4freeserver... k4free server 0.3 What device are you using? 1) Kindle 4 2) Kindle Touch [1-2]:
Select the choice that best suits your case. You should see the following message:
1 Choosing Kindle as device Images found: ./Ads/Kindle/Screensavers/pierotofy.gif INFO WEBrick 1.3.1 INFO ruby 1.9.2 (2011-07-09) [i386-mingw32] INFO WEBrick::HTTPServer#start: pid=3688 port=80
We’re on! The program will now listen for incoming requests and reply with nicely packed ads! Make sure you keep the k4freeserver window open while you setup the Kindle; closing it will shutdown the server.
Troubleshooting the Ad Server
If you see the following warning message in the console window:
WARN TCPServer Error Only one usage of each socket address (protocol/network address/port) is normally permitted. - bind(2)
It means that a program running on your computer is already using port 80 where the Ad Server tries to bind to. Programs that are known to occupy the port include Skype and the Microsoft SQL Reporting Service. Make sure you close any program that is potentially occupying port 80, then restart k4freeserver.
Setup your Kindle
If you have read through the first part of this article you have already made a backup of your device. Reset to Factory Default your Kindle, wait for restart, select your language and follow the procedure below to connect to WiFi. Do NOT press the name of your network to connect. When the network screen appears, move the cursor down to “Enter other Wi-Fi network” (or “Join” in the case of a Kindle Touch) and select “Advanced” from the popup window.
Fill the Network Information window with the following parameters (refer to the piece of paper where you wrote the configuration of your network):
- Network Name: Type the name of your WiFi connection (which is displayed on the list of available networks when you try to connect to WiFi, for example chinanet in the screenshot)
- Connection type: Static
- IP Address: Kindle IPv4 Address
- Subnet Mask: IPv4 Subnet Mask
- Router: IPv4 Default Gateway
- DNS: IPv4 Address
- Security Type: This depends on the configuration of your network. If you have a passcode to connect to your WiFi you probably have WPA2 or WPA (WEP is more unlikely). If you do not have a passcode then choose None.
- Password: This is where you put your passcode, if you have one.
Press Connect. Then log-in with your Amazon’s account. After a few seconds you should see some activity going on on the ad server window. This is a good sign! If after a while nothing happens and the normal Amazon’s ads appear, something probably went wrong with the configuration of your DNS server. If Amazon’s ads do not appear but no activity happens on the ad server window, you might have mistyped the network configuration. You can always start over anytime by resetting the Kindle to factory defaults. Now it’s time to press the sleep button on your Kindle and admire the result of your hard work! Phew!
Cleanup & Restore
You can now uninstall Simple DNS Plus, close the window for k4freeserver and move it to the trash. It’s OK, you can always download it again later. Also restore your Kindle backup by copying the documents and .active-content-data folder from the Desktop back to your device. Enjoy!
Last edited on 1/5/2012
Follow me @pierotofy and don't forget to