Tolino: Debug Mode, Hotel Mode, no Ads

With some time at my hands and a rooted adb on my Tolino Vision 4 HD (firmware 13.2.1), I had a look at the de.telekom.epub.apk ebook reading app source code.

Since I bought the reader I wanted to get rid of the unsolicited advertisements on the home screen and the "you finished reading the book" screens that the support told me I could not disable.

Removing advertisements

The recommendations appear once the Tolino has been given WiFi access, e.g. for a firmware update or to sync the time via NTP.

They are stored with other data in the SQLite database file at /data/data/de.telekom.epub/databases/pageplace.db. With the rooted adb is possible to download it to the PC, remove the recommendations and upload it back to the e-reader:

$ adb pull /data/data/de.telekom.epub/databases/pageplace.db
$ sqlite3 pageplace.db "DELETE FROM recommendation"
$ adb push pageplace.db /data/data/de.telekom.epub/databases/pageplace.db
$ adb shell chown system:system /data/data/de.telekom.epub/databases/ePub.xml
$ adb shell am force-stop de.telekom.epub

Table recommendations are the advertisements, and table comments are your own marked text areas.

The last command kills the ebook app, which is started automatically again. It is faster than rebooting the whole device.

Debug mode

If the right switch is set, the main Tolino ebook reading app de.telekom.epub shows additional information in the logs available at adb logcat.

The DEBUG switch cannot be activated directly. It is defined in the environment configuration, which in turn are stored as resource files inside the .apk at assets/environments/. The default environment is 0 and it loads application.properties.prod. There is another environment 2 called application.properties.prod.debug, which is a clone of the first environment, just with the debug flag enabled.

The environment can be selected by setting de.telekom.epub.PREFS_APP_PROPERTES (no, that is not a typo on my side) inside the configuration file /data/data/de.telekom.epub/shared_prefs/ePub.xml. Since there is no command line editor available on the Tolino, we again have to download the file to the PC, modify it and upload it back to the reader:

$ adb pull /data/data/de.telekom.epub/shared_prefs/ePub.xml
# now add this line to ePub.xml:
  <int name="de.telekom.epub.PREFS_APP_PROPERTES" value="2" />
$ adb push ePub.xml /data/data/de.telekom.epub/shared_prefs/ePub.xml
$ adb shell chown system:system ePub.xml
$ adb shell am force-stop de.telekom.epub

When debugging is enabled, adb logcat will show that line:

D/ApplicationEnviromentProperties( 2852): isATolino=true

Also, in -> Settings -> More Settings (German: Erweiterte Einstellungen) a new button appears: Open God-Settings. It simply shows the Android 4.4 standard settings.

"Open god-settings" button

Hotel Mode

The Tolino contains a special Hotel mode that shows your own logo on the start screen instead of the book shop ads and disables USB access.

It needs two prerequisites:

You can store your own logo file as hotelMode/hotelMode.png, but that is optional.

The book shop configuration is also stored in /data/data/de.telekom.epub/shared_prefs/ePub.xml as de.telekom.epub.PREFS_APPLICATION_PROPERTIES_JSON. Modify the file as described above. I simply renamed the name attribute by prefixing it with old- so that I can restore it later.

Then open the usb-connected Tolino drive and create the hotelMode directory, optionally putting a hotelMode.png file into it. You can do that via adb shell; the directory then would be /sdcard/hotelMode. Now reboot or restart the epub application, and hotel mode is active.

When hotel mode is active, the log shows the following line:

D/Globals ( 3017): Filesystem is locked!

That "lock" only influences the ability to access the Tolino files via USB. It still properly stores bookmarks and reading progress.

Hotel Mode showing my own logo on my Tolino

Reseller selection

If you want to switch the book shop (away from Thalia to buecher.de or so), modify ePub.xml the following way:

<boolean name="de.telekom.epub.PREFS_IS_REBRANDABLE_DEVICE" value="true" />

Now reboot/restart the reader app and the lower main screen will allow you to select the book shop.

Shop selection on the Tolino main screen

Written by Christian Weiske.

Comments? Please send an e-mail.