-
Notifications
You must be signed in to change notification settings - Fork 13
Hacking and development notes
Useful notes for tweaking or debugging okreader installs.
- Hold down the power switch for about thirty seconds to turn your Kobo off.
- Wait about five seconds
- Slide the powerswitch again to boot the Kobo.
Don't use the "reset" switch (the small hole on the bottom of the kobo, near the micro USB port). On at least the Kobo Glo, this will corrupt your okreader install!
In the built-in terminal editor (tools menu, second page), enter these commands, substitution yourpasswordhere
with your password of choice:
echo 'root:yourpasswordhere' | chpasswd
reboot
The Kobo will take about 30 seconds or so to restart (watch for the light near the powerswitch to cycle).
Once set, the password will be retained across reboots.
- Set a root password as above.
- Turn on WiFi (settings menu, network, check WiFi connection).
- Obtain your IP address (settings menu, network, network info; or run
ifconfig
in the terminal emulator) ssh [email protected]
Be aware that the Kobo (or just its wlan card?) will go into powersave after a few minutes of no keypresses on its screen, at which point your SSH connection will drop.
You need to be connected over SSH to do this, as the terminal emulator is part of koreader.
- Set a root password and connect via SSH (as above)
- You need to kill the existing
koreader
instance, and theokreader.sh
shell script that spawns it. - Kill
okreader.sh
first, as it will otherwise re-spawnkoreader
so long as it is running:-
ps aux | grep okreader.sh
to find the PID of the bash instance running the script -
kill <PID>
to terminate that process.
-
- Now kill koreader itself. koreader is a Lua program run by the
luajit
executable. So:-
ps aux | grep luajit
, then kill all PIDs for LUA JIT processes running./reader.lua
: kill <PID>
-
- At this point, the existing KOReader instance is dead, and your Kobo's touchscreen should be non-responsive. To start a new instance, with debugging enabled:
cd /opt/koreader
./reader.lua -d
- You should see some output as koreader starts up, and be left with a working touchscreen.
When finished debugging, you can Ctrl+C to stop koreader, and use the reboot
command to restart your kobo.
Edit /etc/rc.local
, and change the line that reads
modprobe g_file_storage file=$DATA_PART
to
modprobe g_file_storage file=$DATA_PART removable=y