Finally after a lot of endless nights tingering around I decided to post about my newly acquired Amazon Kindle 3. Since I study presentations and books from PDF files I thought a device like this would be really useful, and after reading somewhere that it could run Ubuntu Linux and even with X11 I knew exactly what I needed. Without wasting time I went to the local electronics store to check their prices. To my surprise they offered the previous generation for 350 euros (really wtf?) when you could order the latest version from Amazon for barely 120 euros with DHL shipping.
Day one, I literally took it apart, jailbroken, changed the boring wallpapers to something more cool and installed SSH. But it wasn’t enough.. Although it runs natively on some basic Linux install, it is very limiting. After studying some guides and forums I was up and running!
Here are the steps I followed to installed a Debian chroot on my Kindle device and some network tools.
NOTE: This is not an expert how to guide, just what I did to make it work, so it is not the best or most safe way to do it, I can’t have any responsibility if you brick your device. Please if you want to follow the steps make sure you know what you are doing.
First we have to create a file system image, the following commands create a 512MB ext3 image and mounts it on /mnt. To make it larger just change the count parameter.
dd if=/dev/zero of=/tmp/wheezy.ext3 bs=1M count=512 mkfs.ext3 /tmp/wheezy.ext3 tune2fs -i 0 -c 0 /tmp/wheezy.ext3 sudo mount -o loop -t ext3 /tmp/wheezy.ext3 /mnt/
Now we have to install and configure multistrap, its a debootstrap like utility that installs a Debian base system plus you can specify extra repositories and packets to install in the configuration file.
sudo apt-get install multistrap nano wheezy-config
Here is a simple configuration I used, more can be found at the previous links.
[General] unpack=true arch=armel directory=/mnt/ debootstrap=Grip Updates aptsources=Debian Grip Updates [Grip] packages=ntpdate udev lrzsz netcat telnetd apt source=http://www.emdebian.org/grip keyring=emdebian-archive-keyring suite=wheezy [Updates] packages=apt source=http://ftp.uk.debian.org/debian keyring=debian-archive-keyring suite=wheezy-proposed-updates [Debian] packages= source=http://ftp.uk.debian.org/debian keyring=debian-archive-keyring suite=wheezy
Next step is to finally install the chroot on our image, this should take a while.
sudo multistrap -f wheezy-config
After everything is done, unmount the image and copy it to your Kindle. Now you are ready to mount it on your Kindle and chroot into it. To make things easier here is a script by Xkid you could use.
#!/bin/sh echo "[*] Mounting Rootfs..." mount -o loop,noatime -t ext3 /mnt/us/debian.ext3 /mnt/debian echo "[*] Preparing Filesystem..." mount -o bind /dev /mnt/debian/dev mount -o bind /proc /mnt/debian/proc mount -o bind /sys /mnt/debian/sys echo "[*] Preparing Network Connections..." cp /etc/hosts /mnt/debian/etc/hosts cp /etc/resolv.conf /mnt/debian/etc/resolv.conf echo "[*] Starting Shell..." chroot /mnt/debian /bin/bash echo "[*]Unmounting Rootfs..." umount /mnt/debian/dev umount /mnt/debian/proc umount /mnt/debian/sys umount /mnt/debian
After you have sucessfully chrooted into your image, you have to configure dpkg by running
dpkg --configure -a
By this stage you should have a working apt-get, from there you can install pretty much anything else you want. Here are some packets you might find interesting.
net-tools – A collection of network programs like ifconfig, arp, route etc
netcat – Networking utility which reads and writes data across network connections
gcc, g++ – GNU C/C++ compilers
links – Terminal web browser
nano – Text editor
Plus I compiled a lot of custom networking tools from source. Also I tried nmap and aircrack-ng though with little success so far.
PS: For more information check out these links: