Free Libre command-line tools for Kindle development
C JavaScript Perl HTML Shell Makefile Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
KindleTool @ 3cb332f
documents
etc/network
k3flasher
kindle/mupdf
launchpad
myts
root-password
.gitmodules
KindleTool-info.sh
README
fb2pgm.pl
insertKeystroke.sh
liberate-kindle.txt
pdf2fb.sh
pdr-dump.pl
pgm2fb.pl
root-password.py
ssh-screenshot.sh

README

Goal of this project is liberation of Kindle 3 (and older) devices, so users
can do things for which they are not originally designed.

Steps required to get root shell over usb networking and
local terminal on your Kindle are described in:

liberate-kindle.txt


e-ink framebuffer

Kindle's e-ink display is exposed as framebuffer /dev/fb0 under linux. For now,
we have two tools to deal with it:

  # create dump.fb0.pgm file from framebuffer data
  fb2pgm.pl dump.fb0

  # convert pgm page to framebuffer format
  pgm2fb.pl data.pgm > data.fb0


/opt/eink/scripts/diags script on Kindle is best documentation how to use e-ink

  # example of eink refresh
  echo 1 > /proc/eink_fb/update_display


keyboard and fiveway

You can see status of lock on keyboard and fiveway using:

  [root@kindle test]# cat /proc/keypad /proc/fiveway 
  keypad is unlocked
  fiveway is unlocked

  # example of keypad unlock
  [root@kindle root]# echo unlock > /proc/keypad


Reseting Kinde

When you get stuck in state where you are no longer running Amazon framework
and you need to somehow connect to your kindle again, press and hold power button
for 20 seconds. It's important to note that your Kindle should be disconnected
from USB while you are doing it. Wait 5-10 seconds and screen will blink
white-black-white and it will re-boot.


Screen rotation from command line

  lipc-send-event -r 3 com.lab126.hal orientationUp
  lipc-send-event -r 3 com.lab126.hal orientationLeft
  lipc-send-event -r 3 com.lab126.hal orientationDown
  lipc-send-event -r 3 com.lab126.hal orientationRight

You can get current rotation using

  cat /sys/module/eink_fb_hal_broads/parameters/bs_orientation

It will return 0 for portrait and 1 for landscape orientation


Screen saver disable/enable

  lipc-set-prop com.lab126.powerd preventScreenSaver 1
  lipc-set-prop com.lab126.powerd preventScreenSaver 0


Development

For development and compiling binaries, I would recommend getting Debian
lenny armel and running it under qemu using kernel, initrd and rootfs from:

http://people.debian.org/~aurel32/qemu/armel/

To run Debian armel under armhf kernel, you have to add following so apt-get
will fetch armel packages on armhf architecture:

dpavlin@ac100$ cat /etc/apt/apt.conf.d/00arch 
APT::Architecture=armel;