All the changes listed in this post can be made with a ZIP archiver. You do not need to use Apktool (yet) but of course it can be used for these modifications too.
Add Hyphenation for More Languages
Note: these files get extracted to the following directories on the user data partition:
- .tolino/assets/hyphenator/patterns/
- .tolino/assets/hyphenDicts/
I have not tested this but perhaps it's enough to just copy the files there, and the APK does not have to be modified.
Replace UI Font / Fix Accented Characters in Book Titles & Author Names
The Tolino app uses a typeface called
Bariol. According to the designers' description, it already supports practically all European languages written in the Latin script at no extra cost:
Spoiler:
Afrikaans, Albanian, Basque, Bosnian, Breton, Catalan, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Faroese, Finnish, French, Gaelic, Galician, German, Greenlandic, Hungarian, Icelandic, Irish, Italian, Latvian, Lithuanian, Luxembourgish, Malagasy, Norwegian, Polish, Portuguese, Slovak, Slovenian, Serbian Latin, Sorbian, Spanish, Swahili, Swedish, Turkish, Walloon, Welsh
Unfortunately it seems the support for some accented characters was cut of from the version bundled with the app. Even if you only use one of the supported languages, you might still be reading something like
The Good Soldier Švejk by Jaroslav Hašek, and the "š" will be displayed with the fallback font (Droid Sans), which makes both the title and the author name look quite ugly.
One way to fix this is to replace the
Bariol font with a version that supports the full character set, as it was supposed to in the first place. Yet another option would be to replace it with another font of your choice.
The files are:
- assets/fonts/bariol-bold.ttf
- assets/fonts/bariol-regular.ttf
Simply replace them with any other TrueType files of your choice.
You will want to use another typeface if you foresee using: (1) some non-European languages written in Latin script, for example Vietnamese; (2) Greek or Cyrillic and don't want them to revert to fallback font; (3) rare Latin characters used mostly by linguists. If you need to check which character sets are supported by a font, there's a utility called
BabelMap.
If you only want a different font to be available for book text, it can be simply copied to the
Fonts directory on the user data partition. The APK does not have to be modified for this.
Disable Calling Back Home / Automatic Update Check
If you do not use Tolino's online features and want to prevent it from unnecessarily calling back home, look at
assets/environments/app.properties.prod:
Replace all occurences of
bosh.pageplace.de with
0.0.0.0 (an invalid IP address so that any connection attempt fails immediately). I also set
REPORT_ERRORS=FALSE but left the
BOSH_TIME_URL intact so that the time is still synchronized.
In particular, using a customized firmware we only want to update to newer versions once we customize them, so perhaps it's especially worth it to disable
UPDATE_CHECK_URL.