Skip to content

How to install KOReader on DPT RP1

HappyZ edited this page Mar 27, 2019 · 10 revisions

Introduction

KOReader is a document viewer application, originally created for Kindle e-ink readers. It currently runs on Kindle, Kobo, PocketBook, Ubuntu Touch and Android devices. The supported document formats include PDF, DjVu, CBT, CBZ, ePub, fb2, mobi, doc, chm and plain text.

Download and Install

Check this link and find the latest koreader-android-arm-linux-androideabi apk (must be newer than v2019.01.1). Nightly build like this one or newer versions would also work.

Make sure adb deamon running on your DPT-RP1, connect it to your computer through USB. run

adb install -r koreader-android-arm-linux-androideabi-v2019.01.1-3-gab09ded_2019-01-11.apk

The output should be like this:

koreader-android-arm-linux-androideabi...d. 5.6 MB/s (31220939 bytes in 5.289s)
	pkg: /data/local/tmp/koreader-android-arm-linux-androideabi-v2019.01.1-3-gab09ded_2019-01-11.apk
Success

Modify DPT-RP1 Launcher

This is optional, as you can install the launcher and directly find the app from the launcher.

Refer to DIY Launcher App, ADB Tricks about DPT-RP1 launcher. Here are the steps specific to KOReader.

Re-mount your system to be writable (requiring sudo), and then use NoteCreator as a template:

> adb shell
$ su
# mount -o rw,remount /system
# cd /etc/dp_extensions
# cp -R NoteCreator KOReader
# cd KOReader

Then we need to change the filenames:

# for xml in NoteCreator_*.xml; do mv ${xml} KOReader_${xml#NoteCreator_}; done
# mv ic_homemenu_createnote.png ic_homemenu_koreader.png

Finally, we need to edit each file (use busybox vi file/path/filename):

  1. Edit the file KOReader_extension.xml:
<?xml version="1.0" encoding="utf-8"?>

<Application name="NoteCreator" type="System" version="2">
    <LauncherEntry name="KOReader" category="Launcher" uri="intent:#Intent;launchFlags=0x10000000;component=org.koreader.launcher/.MainActivity;end" string="STR_ICONMENU_9999" icon="ic_homemenu_koreader.png" order="999"/>
</Application>
  1. Edit each KOReader_strings-****.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <string name="STR_ICONMENU_9999">KOReader</string>
</resources>
  1. You can upload a different png for icon ic_homemenu_koreader.png (must be 220x120 size)
  2. Make sure the files under KOReader are all permission 0644 (ls -la /etc/dp_extensions/KOReader/* and chmod 0644 /etc/dp_extensions/KOReader/*).
  3. (do so only if you reboot and applauncher crashed:) Remove the database (cache) from the Extension Manager and allow it to rebuild the database:
# cd /data/system
# mv ExtMgr.db ExtMgr.db_bak
# mv ExtMgr.db-journal ExtMgr.db-journal_bak
  1. Reboot

After these steps, push the top button of DPT-RP1 and you should see the KOReader item in the launchpad.

Adjust KOReader for DPT-RP1

Launch KOReader, tap the topmost part of the screen to invoke the setup menu.

  1. Select the Screen item, make sure Color rendering not selected and Keep screen on selected.

Setup > Screen

  1. Select the Screen > Screen DPI, hold the Custom DPI item and set it to 200.

Setup > Screen > Screen DPI

  1. When open a PDF file for the first time, the default view mode is scroll, switch it to page.

View mode