# 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](https://www.e-reader-forum.de/t/eigene-apps-installieren-firmware-14-2-0.157645/) - if the tolino is on system version 15, search for code `1123581321` [source](https://forum.alles-ebook.de/threads/tolino-update-15-2-0.7480/post-90541) - if the tolino is on system version 16, search for code `112358132fb` [source](https://www.e-reader-forum.de/t/tolino-firmware-16-x-debug-optionen.160297/) 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: The install most likely will say `Well, that did not work! Wrong apk?`, but the app will still be installed, though the installed app may not be accessable without a launcher. (after installing the launcher, reboot the device for the `Select launcher` prompt) ### 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)