View Single Post
Old 10-21-2014, 06:04 AM   #1
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Instructions for patching firmware 3.11.0

Before starting:

1. Make sure your Kobo ereader is already running firmware version 3.11.0 (4d8eac1207).

2. Check that your battery is well charged.

3. Note that in Windows 8 the instructions below might require the batch file to be run in admistrator mode. (See the end of this thread for discussion.)


Patching from Windows, Linux (i386/x86_64), or Mac (OS X 10.8-10.9, i386/x86_64):

1. Download and extract patch_kobo_3110.zip (attached). [WARNING: If using Windows, make sure the path to the extracted files does not contain any '&' characters.]

2. Download the Kobo firmware archive version 3.11.0 for your device (See this thread) into the 3.11.0_source subdirectory. (Don't extract.)

3. Read and edit all the *.patch files in the 3.11.0_source subdirectory in order to: choose which patches to enable (patch_enable=`yes`) or disable (patch_enable=`no`); and to change some of the replacement values to suit your device and preferences. (See the section below on customising the patches.)

4. In Windows double-click 3.11.0.bat; For Linux/Mac open a terminal, change to the patch_kobo_3110 directory, and run ./3.11.0.sh from the command line.

5. If there were no errors, copy the resulting KoboRoot.tgz from the 3.11.0_target subdirectory to the .kobo directory on your ereader.

6. Safely eject and unplug the device, which will then update and restart.


To return your ereader to its original unpatched state:

1. Edit all the 3.11.0_source/*.patch files to disable all patches (set patch_enable = `no` for every patch).

2. Repeat steps 4-6 of the procedure above.


Customising the patches to suit your preferences and device

Some patches require no customisation, you can choose simply to enable them or not. But the following patches allow more customisation and their initial values should be considered examples only.

1. Custom reading footer style: There are three example styles, comment out the styles you don't want by adding a "#" character at the beginning of the line beginning with replace_, and leave the style you want uncommented.

More complex customisation is possible by editing the replacement css text, see this post or the Kobo Patcher thread for examples.

2. My 15 line spacing values: Change the lines of the enabled patch starting with replace_float: the middle number is the original spacing value, the number to change is on the right.

The values are the line spacings set by the adjustment slider. The actual spacing depends on the font used, but for most fonts a value of 0.7 gives very tight spacing with ascenders/descenders overlapping, a value of about 0.9 gives a spacing similar to that of a mass-market paperback. The smallest value available in the unpatched firmware is 1.0.

3. Custom font sizes: Change the lines starting with replace_int. The middle number is the original value, the number to change is on the right.

The values are the font sizes set by the adjustment slider, they are in pixels so the absolute size depends on the device: size 20 on the Glo is about the same as size 25 on the AuraHD. Some books change the base font size, so you may need font sizes that are larger or smaller than your normal reading size to allow for adjusting such books.

4. Custom left & right margins: Change the lines starting with replace_int. The middle number is the original value, the number to change is on the right.

The values are the margin widths (in units of about 1% screen width I think) set by the adjustment slider. The margin size is added to whatever margin is fixed in the book (if any) and in reading software (The kepub reader has a base margin of about 2 units, the epub reader has a base margin of zero).

5. Brightness fine control: Change the lines starting with replace_int. The middle number is the original value, the number to change is on the right.

The values are the percentage amounts that the brightness slider changes when the small or large sun symbols are tapped. (Both should probably be set to the same value).

6. ePub adjustable top/bottom margin (disabled by default): Comment out one of the replace_string lines (i.e. add a '#' character to the beginning of the line) and leave the other uncommented to select whether both top and bottom, or just the top margin, should be made adjustable. Change the right-most number of the replace_int line to set the size of the top/bottom margins relative to the left/right margins, depending on your device. (The suggested values should make the top/bottom margins roughly equal to the left/right margins).

7. ePub fixed top/bottom margin (disabled by default): Comment out one of the replace_string lines (i.e. add a '#' character to the beginning of the line) and leave the other uncommented to select whether to increase both top and bottom, or just the top margin. The replacement value is the size (in pixels) of the increased margin, seperated by \x00. For example, to fix the margin at 40 pixels instead of 25 pixels, change the replacement value from 2\x005 to 4\x000
Attached Files
File Type: zip patch_kobo_3110.zip (464.7 KB, 1469 views)

Last edited by GeoffR; 11-17-2014 at 04:35 PM. Reason: Warning about '&' characters in path in Windows
GeoffR is offline   Reply With Quote