A tiny hack to read white-on-black on Kobo ebook readers. Works only on the eInk series:
Since the update to firmware 2.6+ Kobo has moved to hardware float proccessing, requiring a new toolchain and partly breaking binary compatibility with older software. Currently this hack still works on firmwares below 2.6, but it is highly recommended to upgrade. If you need help or find a bug, check the mobileread thread, or create an issue on github.
There are two ways to contol nightmode:
/tmp/invertScreen
fifo-interface
y
to set nightmode to ONn
to set nightmode to OFFt
to toggleA sample script to toggle is provided in extra/nightmode.sh
.
As the Kobo Mini has no physical buttons, the fifo-interface is currently the only way to control nightmode when running and thus,
relies on external tools such as:
The configuration file called nightmode.ini
is located in your .kobo
folder:
# config file for kobo-nightmode
[state]
invertActiveOnStartup = no # yes / no
retainStateOverRestart = yes # yes / no
[control]
longPressDurationMS = 800 # time in milliseconds to toggle
[nightmode]
refreshScreenPages = 4 #force refresh every X pages
invertActiveOnStartup
determines whether nightmode is active after booting.
retainStateOverRestart
determines whether the state should be kept over a restart.
refreshScreenPages
sets the number of pages between screen refreshs when nightmode is active.
If you want to disable this feature, set it to 0.
In the installer/uninstaller directories, two KoboRoot.tgz
files are provided for automatic installation and removal.
Simply copy one of them into the .kobo folder on your device, safely remove, and wait for the reboot to finish.
This hack works by intercepting and modifying screen-update requests on-the-fly from the main reader application.
This is accomplished by interposing the ioctl()
function using LD_PRELOAD.
Therefore /etc/init.d/rcS
has to be modified to start nickel
, the main app with the screenInv.so
dynamic library.
For the Kobo Aura, the inverting has to be done in software due to a kernel bug. By interposing mmap()
, memory accesses to framebuffer can be redirected into a virtual buffer, from which the inverted data is pushed to the screen.
All you need can be found in Kobo's Kobo-Reader repository: