Skip to content

Instantly share code, notes, and snippets.

@hasezoey
Last active April 5, 2024 10:15
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save hasezoey/d16ba0f980f00cd2193132afe4714c7c to your computer and use it in GitHub Desktop.
Save hasezoey/d16ba0f980f00cd2193132afe4714c7c to your computer and use it in GitHub Desktop.
Install KOReader on a Tolino device (Vision 5)

Install KOReader on a Tolino Device

Tolino Debug Menu codes

For KOReader (or any other APK) to be installed on a Tolino device, the debug menu has to be enabled:

  • if the tolino is on system version 14, search for code 124816 source
  • if the tolino is on system version 15, search for code 1123581321 source
  • if the tolino is on system version 16, search for code 112358132fb source

Note: "searching" as in the search for books on the tolino itself (the magnifying glass in the top bar)

Enable Debug-Menu Settings

Once in the Debug Menu, do the following things (may be named differently based on software version):

  • Change the Environment to prod (debuggable) (optional)
  • Change usb debugging to be enabled (enables ADB)
  • if not wanting to ever put the debug code ever in again, enable show debug dialog quick access button (the button can be found in the search when not having put in anything yet)

Additional Notes about the debug menu:

  • On a separate page the AOSP Settings can be accessed, through which WIFI, APPs and Developer settings can be accessed (like a normal phone)

Note: the pages in the Debug Menu can be switched by swiping the direction you want or clicking either < or > in the top of the dialog

Install

Install the APK through the Debug menu

When wanting to install the KOReader APK without ADB, then follow these steps:

  • connect your tolino with your PC
  • put the koreader (or any other apk) directly in the root directory for the tolino device (make sure the file end in .apk)
  • switch the page in the debug menu until seeing Next, Install & Uninstall buttons
  • select the APK you want to install with Next if not already selected
  • install the APK with Install

Note: if the APK does not show up, try restarting the tolino and try again

Install through ADB

When wanting to install the KOReader APK through ADB, then follow these steps:

  • ensure you have ADB installed on your PC
  • connect your tolino with your PC
  • run adb devices to check that the tolino is visible
  • if any Allow this device dialog shows up on the tolino, accept it
  • run adb install ./koreader.apk (replace ./koreader.apk with the path to the APK)
  • wait for the command to finish and KOReader is installed

Tolino System Updates while KOReader is installed

Due to how Tolino is set-up (at least in Vision 5), there are 2 important partitions:

  • System, ~500mb - stores the system and extra apps
  • Data, ~5GB (on a Vision 5)

Tolino's base system consumes ~200mb and update packages are commonly ~100-170mb only are getting downloaded to the system partition, but this can get close to the limit already, but with KOReader installed and unpacked which is around ~40mb apk size and ~100mb unpackaged extra size, this can result in too low space for a update, so the workaround is to Clean Data of KOReader App before installing. This will not delete any configuration or books (with default paths) and will only delete the unpacked files from KOReader.

Extra Notes

  • it is recommended to install a separate APK for a Home Screen, because KOReader itself is not a Home Screen and Tolino does not start other apps, so the only other way would be through ADB
  • it is recommended to install a separate APK for Buttons, because the tolino system does not have the android navigation buttons enabled (and can also not be done through settings on system 15)
  • F-Droid could once also be installed on the tolino as a APK, but currently (September 2022) it seems like F-Droid upgraded the version requirement and so cannot be installed on the android 4.4 versions anymore that tolino (Vision 5 and below) use

Bricked System

In case there should ever be a bricked tolino, you can go to https://mytolino.de/software-updates-tolino-ereader/ and download the version for your device and fully reset your system through recovery.

The steps would be as follows:

  • shutdown your tolino while having it connect to a PC OR use adb reboot recovery
  • run watch -n 1 adb devices in a terminal on your PC (or run adb devices manually until a device shows up)
  • hold the POWER-button on the Tolino device until the command from watch (or manual commands) show a device in recovery
  • if the output should not show anything related to recovery or the device should start-up normally, re-try from step 1
  • run adb sideload ./path/to/update.zip
  • wait for it to finish and reboot the device (for example with adb reboot)

Note: the USB has to be connected while shutting down, because otherwise the device will start itself up again on connection (like it unlocks / starts the lockscreen just by plugging it into power)

The guide above is meant to be generally generic, and in this file i will provide some things i had done for myself:

As the extra apps i have used:

  • for a Home Screen: SmartLauncher
  • for the buttons: ButtionSavior (non root)

Personally i have also enabled the runtime ART in developer-settings and think the performance is better than before, though i dont have any comparison.
Note that switching to ART will reboot the device (or at least require a reboot) and the next boot can take very long, for me it took ~30 minutes.

Rooting is also possible (at least adbd rooting), though it requires a custom adb and i have personally only used it for debugging and would not recommend to go through the hassle.

I had also wrote the guide for users wanting to customize their tolino without having to scavenge forums (especially when most are german) and outdated information, so i tried to include the most important information for various versions and devices.

If there should be any questions or outdated information, i will try to keep this updated, though i only have a Vision 5 and it seems unlikely to change much anymore, seeing that a Vision 6 is released with a upgraded system.

@paolafont
Copy link

What about the Tolino version 16? The code 1123581321 does not work. Thank you.

@hasezoey
Copy link
Author

What about the Tolino version 16?

i am not aware of a debug code for firmware version 16 yet, your only options are:

  • downgrade your firmware if possible to a 15 and try again
  • if possible update /data/data/de.telekom.epub/shared_prefs/ePub.xml with some debug code (search for what exactly in your search engine of choice)
  • boot a rooted image (which can be done temporarily without flashing via fastboot) and install the apps there (or do the update of the mentioned file there) (the rooted image you probably need to download from somewhere or have the know-how to create a modded one (with a rooted adbd)

@paolafont
Copy link

paolafont commented Jan 3, 2023 via email

@krammarkro
Copy link

I saw that you worked on Koreader for inverting the buttons when the book is rotated does that now work if yes can you tell me how to do it.

@hasezoey
Copy link
Author

hasezoey commented Apr 27, 2023

I saw that you worked on Koreader for inverting the buttons when the book is rotated does that now work if yes can you tell me how to do it.

it does not work automatically (from what i know), it is for me bound to the corner buttons:

  1. pull up the top menu by swiping down
  2. go to the "gear" tab
  3. click "Taps and gestures"
  4. click "Gesture manager"
  5. click "Tap corner"(or any other gesture you want to use)
  6. <select which corner you want to setup actions for> (for me i bound the same actions to both top-left and top-right)
    1. click "Device" (not the checkbox)
    2. click "Invert rotation"
    3. go back once
    4. click "Reader"
    5. go to page 3 (may vary on device)
    6. select "Invert page turn buttons"
  7. you are now done (you can also repeat the above steps for however often you want)

note that those corner buttons only work while being in a document, not in the file-browser (or settings) and if you are rotated and go to one of the mentioned things (like the file-browser), then the rotation stays as in the document, but you cannot change the orientation until being back in a document

also note that when rotation is inverted, top-left and top-right are also automatically in the new rotated top-left and top-right

@krammarkro
Copy link

Thank you very much you helped me a lot ^^

@AaronDewes
Copy link

@hasezoey The code for the debug menu on 16.x is 112358132fb.

@hasezoey
Copy link
Author

hasezoey commented Aug 9, 2023

@AaronDewes could you provide a source for this?

@AaronDewes
Copy link

No, but I can confirm it works on my Tolino. I found it from reverse engineering the firmware, which contained a hash of this.

If this is enough proof for you: I am the person who first discovered the menu in 14.x (I posted it on this German forum), and also just posted this code there, you can see it's from the same account.

@hasezoey
Copy link
Author

hasezoey commented Aug 9, 2023

thanks for pointing this out, though i will wait a bit for other confirmations that it works (i currently dont wanna test on my device, because i have set it up just right and dont wanna re-setup everything (like after a reinstall of a downgrade))

@wonbinbk
Copy link

wonbinbk commented Aug 13, 2023

thanks for pointing this out, though i will wait a bit for other confirmations that it works (i currently dont wanna test on my device, because i have set it up just right and dont wanna re-setup everything (like after a reinstall of a downgrade))

I confirmed that it worked. My device is Tolino Vision 4 HD with firmware 16.x.
Thanks a lot @hasezoey and @AaronDewes !!!

When I installed Koreader by copying the apk to its USB root folder, the debug menu found it and I pressed Install button. After a while it said incorrect binary. But the same apk while used to install via adb method worked fine.

I installed also a launcher so now I can launch Koreader after boot (manually). I'm considering installing a button app like you said but not sure if I need it.

@RedStylzZ
Copy link

RedStylzZ commented Aug 25, 2023

Hey, can someone tell me which APK I should use to install KOReader? I have an Tolino Vision 6 Running Version 16.
For some reason I can't install 2022 version, neither 2023 versions of KOReader.
I tried it via debug menu and via adb, nothing works.
Via ADB I get the error "Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]"
I tried the version 2022.10, 2023.6 and 2023.6.1

@hasezoey
Copy link
Author

hasezoey commented Aug 25, 2023

@RedStylzZ are you installing koreader-android-arm-v2023.06.1.apk(32bit arm) or koreader-android-arm64-v2023.06.1.apk(64bit arm)? at least on the tolino vision 5 the 32bit one works (and i cannot find online what tolino vision 5 or 6 are)

Note: there is also koreader-android-x86-v2023.06.1.apk but that is for x86_64 (mostly for a android emulator or desktop android)

@RedStylzZ
Copy link

@hasezoey I tried both of them, but neither of them worked. When I am using the 32bit one it tells me something like “Version downgrade failed” and on the 64bit the message from the upper comment.

@AaronDewes
Copy link

@hasezoey I tried both of them, but neither of them worked. When I am using the 32bit one it tells me something like “Version downgrade failed” and on the 64bit the message from the upper comment.

Please check if the KoReader app already appears in the android settings under installed apps, if yes, uninstall it, then try installing the 32bit one.

@RedStylzZ
Copy link

Oh wow yeah that worked… thank you!
And how can I start it now without a launcher? Is there an adb command for that?

@hasezoey
Copy link
Author

And how can I start it now without a launcher? Is there an adb command for that?

there is one, but i recommend you add a launcher, because if the app crashes (which could happen) or just hangs or you need to restart your device, you will have to somehow restart the app

# inside adb shell
am start -n org.koreader.launcher/org.koreader.launcher.MainActivity

Note: i have not tested this command and assembled it from what i found about koreader online

@RedStylzZ
Copy link

Do you maybe have an Link to an tutorial on how to install a Launcher?
I found this one http://retinal.dehy.de/docs/doku.php?id=technotes:tolino_epos
Can you recommend that or an other?

@hasezoey
Copy link
Author

hasezoey commented Aug 26, 2023

I found this one http://retinal.dehy.de/docs/doku.php?id=technotes:tolino_epos

you could use nova launcher, personally i currently use smartlauncher(but i cannot find the download / blog post anymore from where i got it), now quickly searching for that blog post lead me to allesebook blog post using simple eink launcher, which you could also try. (or direct download, go to c_adb and look for file z_simple.ink.launcher.1.2.apk or build it yourself)

Note: the mentioned allesebook blog post is about rooting the device, but that is not necessary to just install the launcher (at least on tolino vision 5)

EDIT: i have now found the blog post again (direct download), path 3_adb -> z_smartlauncher.apk

@RedStylzZ
Copy link

Ah alright, it just needed to be installed like KOReader, thank you very much!

Copy link

ghost commented Feb 7, 2024

Would this work on a Tolino Page 2 ? I dont wanna risk my device by just trying it out.
@hasezoey

@hasezoey
Copy link
Author

hasezoey commented Feb 7, 2024

@ElryWeeb i cant verify as i only have a Tolino Vision 5, but from my reading the Page 2 runs the same software, so the codes should work and the app installs too:

Screenshot_20240207_121020
(context: all of the listed devices have the same firmware)
source

PS: though note that i am still running my tolino with firmware 15, as i had no reason to upgrade yet (to my knowledge firmware 16 on the vision 5 basically only updates the app, not the system)

Copy link

ghost commented Feb 7, 2024

Well im in the debug and have the apks in the root (launcher and koreader, but it says "Well, that did not work! Wrong apk?" and idk what to do now.

@ElryWeeb i cant verify as i only have a Tolino Vision 5, but from my reading the Page 2 runs the same software, so the codes should work and the app installs too:

Screenshot_20240207_121020 (context: all of the listed devices have the same firmware) source

PS: though note that i am still running my tolino with firmware 15, as i had no reason to upgrade yet (to my knowledge firmware 16 on the vision 5 basically only updates the app, not the system)

Copy link

ghost commented Feb 7, 2024

Nevermind it installed but threw an error for no reason

@ercoodeperco
Copy link

ercoodeperco commented Apr 4, 2024

Hi. I managed to get the koreader-android-arm-v2024.03.1.apk. on my tolino vision5 (FW 16.1)
I too get the message "well, that did not work! wrong apk?" during installation.
in the debug options, if I go to "open aosp settings" , and then to Apps, I do see the KOReader as the only app, but I don't know if it is properly installed or how to use/activate it ? I did (manually) restart the tolino after this, no difference

@hasezoey
Copy link
Author

hasezoey commented Apr 4, 2024

@ercoodeperco it is likely installed, but to open it you either need to go through a adb command or install some kind of launcher

@ercoodeperco
Copy link

ercoodeperco commented Apr 4, 2024

IMG_1

did this, got error on the Tolino while it ran : "an error hs occurred and all actions have been aborted. Please try again..."

IMG_2

but if I look at this screenshot , app seems active now ? (since button to Force Stop is highlighted). But apart from this, nothing changed on the tolino. Manual reboot after this : no effect.

@ercoodeperco
Copy link

I copied the smartlauncher.apk in the root dir , and restarted the tolino. This worked, and I can run KOReader now.
Thanks. Working (on firmware 16.2 now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment