1. Check Settings > Device information to make sure your Kobo ereader is already running firmware version 4.8.10956 (daee2c4220). If not, then you need to upgrade before applying this patch.
2. Check that your battery is well charged.
Patching from Windows, Linux (i386/x86_64/ARM), or Mac (OS X 10.8-10.9, i386/x86_64):
1. Download and extract patch_kobo_40810956.zip (attached).
2. Download the Kobo firmware archive version 4.8.10956 for your device (See this post for links) and copy it into the 4.8.10956_source/ subdirectory that was created in step 1. (Don't unzip the firmware archive.)
3. Read and edit all the *.patch files in the 4.8.10956_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.
4. In Windows run 4.8.10956.bat (double-click); For Linux/Mac run 4.8.10956.sh (double-click, or right-click + run, or execute 4.8.10956.sh from the command line, or drag 4.8.10956.sh into Terminal, depending on your particular OS/desktop.)
5. If there were no errors, a new 4.8.10956_target/ subdirectory will be created. Copy the KoboRoot.tgz file from this 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 4.8.10956_source/*.patch files to disable all patches (i.e. set patch_enable = `no` for every patch).
2. Repeat steps 4-6 of the procedure above.
GeoffR
04-24-2018 07:46 AM
Notes and other patches
Notes:
There is a new patch:
* `Default ePub serif font (Georgia)` (in librmsdk.so.1.0.0.patch)
Kobo have changed the default fonts in the ePub reader, which might cause some problems for some books and some devices when selecting the "Publisher Default" font or when reading or processing ePub books where the publisher forced use of the generic "serif" or "san-serif" fonts. Enable the following patches to return to the fonts used in previous firmware versions, which appears to solve the problem:
* `Default ePub serif font (Georgia)` (in librmsdk.so.1.0.0.patch)
* `Default ePub sans-serif font (Avenir)` (in librmsdk.so.1.0.0.patch)
(Edit: Kobo have now stopped the rollout of this firmware version, perhaps because of the above problem.)
There may be a problem with the `Allow searches on Extra dictionaries` patch in this version. See discussion starting with post #15 and post #16
Here is a list of the patches in each .patch file. Where there is a group number to the left, only one patch from each numbered group can be enabled:
Spoiler:
Code:
libadobe.so.patch:
------------------
`Remove PDF map widget shown during panning`
libnickel.so.1.0.0.patch:
-------------------------
1 `My 10 line spacing values`
1 `My 24 line spacing values`
`Custom left & right margins`
`Custom font sizes`
`Freedom to advanced fonts control`
2 `ePub fixed/adjustable top/bottom margins`
2 `ePub fixed top/bottom margins`
2 `ePub disable built-in body padding-bottom`
`Custom kepub default margins`
`Block WiFi firmware upgrade`
`Custom footer (page number text)`
`Custom Sleep/Power-off timeouts`
`Set KePub hyphenation`
`Fix three KePub fullScreenReading bugs`
`Force user line spacing in KePubs`
`Force user line spacing in ePubs (part 1 of 2)`
3 `Un-force font-family override p tags (std epubs)`
3 `Force user font-family in ePubs (Part 1 of 2)`
`ePub constant font sharpness`
`KePub constant font sharpness`
`Un-Force user text-align in div,p tags in KePubs`
`Always display chapter name on navigation menu`
`Un-Force user font-family in KePubs`
`Un-force link decoration in KePubs`
`KePub stylesheet additions`
`Change dicthtml strings to micthtml`
`Allow searches on Extra dictionaries`
`Ignore .otf fonts`
`Brightness fine control`
`Dictionary text font-family/font-size/line-height - beta`
`Clock display duration`
4 `Keyboard template (Mini/Touch/Glo/Aura)`
4 `Keyboard template (AuraHD/H2O)`
4 `Keyboard template (GloHD/AuraOne/H2O2)`
4 `Cyrillic keyboard (Mini/Touch/Glo/Aura/AuraHD/H2O)`
4 `Cyrillic Keyboard (GloHD/AuraOne/H2O2)`
4 `Arabic keyboard (Mini/Touch/Glo/Aura/AuraHD/H2O)`
4 `Hebrew keyboard (Mini/Touch/Glo/Aura)`
4 `Hebrew keyboard (AuraHD/H2O)`
4 `Hebrew keyboard (GloHD/AuraOne/H2O2)`
4 `Greek Keyboard (GloHD/AuraOne/H2O2)`
librmsdk.so.1.0.0.patch:
------------------------
`Disable orphans/widows avoidance`
`Default ePub monospace font (Courier)`
`Default ePub serif font (Georgia)`
`Default ePub sans-serif font (Avenir)`
`Default ePub symbol font (Symbol)`
`Force user line spacing in ePubs (Part 2 of 2)`
`Force user font-family in ePubs (Part 2 of 2)`
`Ignore ePub book Adobe XPGT stylesheet (page-template.xpgt)`
`Ignore ePub book CSS and Adobe XPGT stylesheets`
`Ignore ePub TOC navpoints`
nickel.patch:
-------------
5 `Disable reading footer`
5 `Custom reading footer style`
`Custom synopsis/details line spacing`
`Custom synopsis/font size`
6 `Custom Header menubar - reduce height by 33%`
6 `Custom Header menubar - reduce height by 50%`
`Dictionary pop-up frame size increase`
7 `Changing the info panel in full size screensaver (upper left corner)`
7 `Changing the info panel in full size screensaver (lower left corner)`
`Increase The Cover Size In Library`
`Increasing The View Details Container`
`New home screen increasing cover size`
`Reading stats/Author name cut when the series is showing bug fix`
`Increase size of Kepub chapter progress chart`
`Custom font to Collection and Authors names`
<Patch>
patch_name = `New home screen footer rename`
patch_enable = `yes`
#
##Multi-version patch: 4.4.9344 - 4.7.10413+
#
# Rename the left footer button.
#
#
# The lenght of the replace string must be 25 for example:
# ` ` - replace with space show as empty
# `FirstName LastName `
# `If lost call:123456789012`
#
find_base_address = `Find your next great read`
replace_string = 0000, `Find your next great read`, `Test, text length 25 char`
#
#replace_string = 0000, `Find your next great read`, ` `
#replace_string = 0000, `Find your next great read`, `FirstName LastName `
#replace_string = 0000, `Find your next great read`, `If lost call:123456789012`
#
#
# Kobo Aura One text
find_base_address = `Buy, borrow, or preview books`
replace_string = 0000, `Buy, borrow, or preview books`, `Testing, text length 29 chars`
#
#
# The lenght of the replace string must be 9 char.
#
#find_base_address = `SHOP KOBO`
#replace_string = 0000, `SHOP KOBO`, `--9char--`
#replace_string = 0000, `SHOP KOBO`, `4.8.10956`
# 10 char text
#replace_string = 0000, `SHOP KOBO\0`, `1234567890`
</Patch>
Terisa de morgan
04-24-2018 09:29 AM
Thank you very much, Geoff and oren64.
anacreon
04-24-2018 01:15 PM
Quote:
Originally Posted by oren64
(Post 3686193)
Missing patches from nickel.patch:
I don't understand why you separated in two blocks with identical title "nickel.patch". Should one be nickel.patch and the other libnickel. patch for instance, or do I add them all those I choose to nickel.patch?
Thank you and Geoffr for your invaluable (and prompt) work.
EDIT: I just realized, reading the subtitle to the initial post, that the first part has been added to the patch by Geoffr. I'm reassured by your info about the dispatch between nickel and libnickel. Thanks.
oren64
04-24-2018 01:36 PM
Quote:
Originally Posted by anacreon
(Post 3686294)
I don't understand why you separated in two blocks with identical title "nickel.patch". Should one be nickel.patch and the other libnickel. patch for instance, or do I add them all those I choose to nickel.patch?
All the patches are nickel.patch file except from the patch `New home screen footer rename` libnickel.so.1.0.0.patch.
The patches `Increase The Books Cover Size In The Library` and `Increasing The View Details Container` where missing from the attachment in post #1, I needed to make new ones that will work on this firmware, GeoffR add them to the attachment.
GlenRunciter
04-24-2018 02:28 PM
THX GeoffR!
Gesendet von meinem G3221 mit Tapatalk
drjd
04-24-2018 02:47 PM
Thanks GeoffR and oren64! All patches work fine on my Glo.
Martina Schein
04-24-2018 02:51 PM
The patches works very fine on my Kobo Aura H2O (1.Gen). Thanks to all the diligent helpers.
anacreon
04-24-2018 03:47 PM
Bottom margin problem
I updated my One, and after applying patches, there was practically no margin left between the bottom of the page (with chapter name - I only read kepubs) and the black border. I much prefer a decent margin all around, and what's more it looks unbalanced now that only the bottom is marginless.
I then updated the Glo HD too, and looked at it before patches. The margin at the bottom is as it was in the previous version. And it disappeared after I applied the patches. I don't understand since I applied the usual patches, which shouldn't have had this effect, and didn't in previous versions: 24 line spacing values, custom left & right margins and font sizes, freedom to advanced fonts control, kepub hyphenation, always display chapter name on navigation menu, ignore .otf fonts, brightness fine control, custom synopsis detail line spacing and font size, dictionary pop-up size increase, increase cover size in library and view details container, and new home screen removing footer and increasing cover size.
taos
04-24-2018 05:13 PM
It's possible that the libnickel patch `Allow searches on Extra dictionaries` doesn't work anymore.
You can still replace the space after "Extra:" with the patch but the "Extra:_" in front of the dictionary name is not shown anymore when you look up a word from an epub. Instead of e.g. "Extra:_da - English" now "Dansk - English" is shown in the drop-down menu (depends on what you used in the database). However, as soon as you choose it, the name changes to "English - English" and the well-known error message is shown: "You don't have an English dictionary installed." (the same as on an unpatched system).
jackie_w
04-24-2018 06:33 PM
Quote:
Originally Posted by taos
(Post 3686381)
It's possible that the libnickel patch `Allow searches on Extra dictionaries` doesn't work anymore.
You can still replace the space after "Extra:" with the patch but the "Extra:_" in front of the dictionary name is not shown anymore when you look up a word from an epub. Instead of e.g. "Extra:_da - English" now "Dansk - English" is shown in the drop-down menu (depends on what you used in the database). However, as soon as you choose it, the name changes to "English - English" and the well-known error message is shown: "You don't have an English dictionary installed." (the same as on an unpatched system).
I have quite a lot of "Extra:_" dictionaries installed, but all mine are single language Eng-Eng dictionaries rather than translation dictionaries.
I was able to get all mine working again by manually editing the Name column of the Dictionary table in the Kobo SQLite database. In the hope that you'll be able to extrapolate a similar solution for your translation dictionaries here is an example of the minor change I made for one of mine:
Before edit:
Suffix: -oc
Name: Eng_OxfordConcise
After edit:
Suffix: -oc
Name: Extra:_oc
You might need to do a full power off/on after changing the database.
After the change my dictionary drop-down menu shows Extra:_oc as one of the items (just like it did in fw 4.7.10413) and selecting it accesses the physical dictionary file .kobo/dict/dicthtml-oc.zip
Hope this helps :)
geek1011
04-24-2018 06:44 PM
Thanks Geoff, oren64, and everyone else who helped! Everything works well.
taos
04-24-2018 07:55 PM
Quote:
Originally Posted by jackie_w
(Post 3686413)
I was able to get all mine working again by manually editing the Name column of the Dictionary table in the Kobo SQLite database. In the hope that you'll be able to extrapolate a similar solution for your translation dictionaries here is an example of the minor change I made for one of mine:
Before edit:
Suffix: -oc
Name: Eng_OxfordConcise
After edit:
Suffix: -oc
Name: Extra:_oc
Thanks! That works for translation dictionaries, too.
Before: Dansk - English
After: Extra:_da - English
BTW, it seems that it also partially works for something like "Extra:_Dansk - English" (with "Dansk" instead of "da" in the ExtraLocales line of Kobo.conf) - as long as you don't mind that "English - English" is displayed in the header of the dictionary window (the definition that is shown is from the chosen dictionary).
Unfortunately, using a non-breaking space instead of "_" doesn't work anymore but this could be due to the application I use for manipulating the database. I'm not sure if it actually inserts a non-breaking space or if just falls back to a "normal" space.
GeoffR
04-24-2018 10:50 PM
Quote:
Originally Posted by anacreon
(Post 3686356)
I updated my One, and after applying patches, there was practically no margin left between the bottom of the page (with chapter name - I only read kepubs) and the black border. I much prefer a decent margin all around, and what's more it looks unbalanced now that only the bottom is marginless.
I then updated the Glo HD too, and looked at it before patches. The margin at the bottom is as it was in the previous version. And it disappeared after I applied the patches. I don't understand since I applied the usual patches, which shouldn't have had this effect, and didn't in previous versions: 24 line spacing values, custom left & right margins and font sizes, freedom to advanced fonts control, kepub hyphenation, always display chapter name on navigation menu, ignore .otf fonts, brightness fine control, custom synopsis detail line spacing and font size, dictionary pop-up size increase, increase cover size in library and view details container, and new home screen removing footer and increasing cover size.
I haven't noticed any difference in the space between KePub page number and bezel on my Glo, but I am not using any of the nickel patches you list except for `Custom synopsis/details line spacing`. (I am using all of the libnickel patches you list except for `Brightness fine control`.)
I'd check that you haven't accidentally enabled `Custom reading footer style`, which is the only one I can think that would cause what you describe. But if not that then it might just be trial and error to find which patch is causing the problem.
geek1011
04-24-2018 11:27 PM
GeoffR, right now I'm working on an improved version of patch32lsb which will have many improvements (it's listed on the README). I've finished the core stuff (and unit tests for it), but will not be done the rest until another 2 weeks at the earliest.
Basically, it will still support the same patch format, but will also support another one which I'll make based on YAML (or maybe JS). It will be able to do everything in one binary (which will be able to run on anything Go runs on and will not require additional tools to be included. It will also support zlib replacement and a few other useful things. It may also be able to make sure the right version of the firmware is being used. It's also way more readable than C code.
anacreon
04-25-2018 03:16 AM
Quote:
Originally Posted by GeoffR
(Post 3686499)
I haven't noticed any difference in the space between KePub page number and bezel on my Glo, but I am not using any of the nickel patches you list except for `Custom synopsis/details line spacing`. (I am using all of the libnickel patches you list except for `Brightness fine control`.)
I'd check that you haven't accidentally enabled `Custom reading footer style`, which is the only one I can think that would cause what you describe. But if not that then it might just be trial and error to find which patch is causing the problem.
You were right I did - and it looks ok now. Thank you.
the.Mtn.Man
04-25-2018 01:00 PM
Thanks for the patch, guys! Everything is working perfectly on my first-generation Aura.
GeoffR
04-25-2018 11:03 PM
Quote:
Originally Posted by geek1011
(Post 3686505)
GeoffR, right now I'm working on an improved version of patch32lsb which will have many improvements (it's listed on the README). I've finished the core stuff (and unit tests for it), but will not be done the rest until another 2 weeks at the earliest.
Basically, it will still support the same patch format, but will also support another one which I'll make based on YAML (or maybe JS). It will be able to do everything in one binary (which will be able to run on anything Go runs on and will not require additional tools to be included. It will also support zlib replacement and a few other useful things. It may also be able to make sure the right version of the firmware is being used. It's also way more readable than C code.
That sounds great. Thanks.
geek1011
04-26-2018 12:46 AM
Quote:
Originally Posted by GeoffR
(Post 3686942)
That sounds great. Thanks.
No problem. I just finished a drop-in replacement for patch32lsb for testing (don't actually use it yet). I already do preliminary checks for some of the patches, as my version should have identical results, but it would be nice if you could test it a bit (especially if you know any edge cases). It should have feature parity with the original patch32lsb (and it's about 30% the lines of code). The binaries are here: https://github.com/geek1011/kobopatc...ses/tag/v0.1.0
Once this is perfected, I'll work on the all-in-one version and zlib support. DO NOT USE THIS ON AN ACTUAL DEVICE YET (there are known issues). It will probably be ready in a few weeks.
BTW, the keyboard patch is broken at the line which is like: replace_string = FFFFFFD4, `ƒ\0`, `ƒ`
GeoffR
04-26-2018 06:19 AM
Quote:
Originally Posted by geek1011
(Post 3686957)
BTW, the keyboard patch is broken at the line which is like: replace_string = FFFFFFD4, `ƒ\0`, `ƒ`
Do you mean the FFFFFFD4? The addresses/offsets have 32-bits, so that should give the same result as writing a negative:
Code:
replace_string = -2C, `ƒ\0`, `ƒ`
geek1011
04-26-2018 08:59 AM
Quote:
Originally Posted by GeoffR
(Post 3687019)
Do you mean the FFFFFFD4? The addresses/offsets have 32-bits, so that should give the same result as writing a negative:
Code:
replace_string = -2C, `ƒ\0`, `ƒ`
It does not work even in the original patch32lsb. I'm also reading into a 64-bit integer, so I'll change that and see, but I cannot find the string even using a hex editor.
geek1011
04-26-2018 05:54 PM
Quote:
Originally Posted by GeoffR
(Post 3687019)
Do you mean the FFFFFFD4? The addresses/offsets have 32-bits, so that should give the same result as writing a negative:
It should now have perfect compatibility with the original patch32lsb. I've tested it with most of the patches enabled on multiple versions and the output matches.
It would be nice if it could be tested by other people (by comparing the output, NOT actually installing the patched firmware) with patches which may include edge cases which I might have missed.
GeoffR
04-26-2018 11:48 PM
Quote:
Originally Posted by geek1011
(Post 3687072)
It does not work even in the original patch32lsb. I'm also reading into a 64-bit integer, so I'll change that and see, but I cannot find the string even using a hex editor.
The letter `ƒ` is a script-f (U+0192). In libnickel.so.1.0.0:
This patch disables the new QuickTurn feature. (Edit: Where a touch-and-hold near the bottom of the screen in KePub books causes pages to keep turning until the hold is released.)
I've now finished my new patch format. See a demo (with documentation and a list of the format's advantages) of it here and a sample patch here. Please tell me what you think of it, and if I could make it better in any way.
I'll also make a conversion utility to convert from the old format later.
I've also finished a working POC (I haven't uploaded binaries yet) of the all-in-one patcher. I even tried patching my kobo with it and it worked! The directory structure and config files looks like this (minus README.md and oldpatches). You would then place the kobopatch binary in the same dir along with the update file, and then all you need to do is run the kobopatch binary. It already does things faster and more reliably (e.g. it keeps all file attributes, it has more error checking) than the shell script. I'll upload binaries once I finish the log file, patch group checking, and add some unit tests. Please tell me what you think of it so far.
Also, keep in mind that I won't be comfortable to release this as stable until I test it more (and wait another few weeks for any bug reports to surface). Once I upload binaries, you can still try it if you are comfortable with the (small) possibility of needing to reimage your SD card.
sherman
04-27-2018 12:53 AM
Hi geek1011
A couple of thoughts on your new patch format.
Why not include the patch description as part of each patch, instead of outside in comments? It would make parsing the description easier.
Also, have you thought about more defined versioning information (with regards to firmware version etc), rather than specifying the version in a comment somewhere?
Cheers,
Sherman
geek1011
04-27-2018 01:15 AM
Quote:
Originally Posted by sherman
(Post 3687347)
Hi geek1011
A couple of thoughts on your new patch format.
Why not include the patch description as part of each patch, instead of outside in comments? It would make parsing the description easier.
Also, have you thought about more defined versioning information (with regards to firmware version etc), rather than specifying the version in a comment somewhere?
Cheers,
Sherman
That's actually a great idea about the description. I'll implement it this weekend.
As for the versioning, I was considering it, but decided against it. Firstly, the patches will most likely fail if applied to the wrong version. Secondly, it is very difficult to extract the version info from the binary, and thirdly, it is hard to represent things like ranges in an concise way.
jackie_w
04-27-2018 08:04 AM
@geek1011,
As an occasional patch contributor I'll be happy to test your new system if I can do the testing on Windows. Is this possible at the moment?
Also a comment about Offset/Find/Replace…
I like the new option which places each of these on its own line rather than combining into a single line. It should be less confusing for new users who want to tweak the defaults. For me the single line of the current system is what makes it more awkward to ensure that the before/after strings are the same length.
I'm looking forward to being able to patch nickel zlib css in a more user-friendly way. I'm hoping it will make it possible for users to fine-tune them.
oren64
04-27-2018 08:16 AM
Quote:
Originally Posted by jackie_w
(Post 3687419)
@geek1011,
As an occasional patch contributor I'll be happy to test your new system if I can do the testing on Windows. Is this possible at the moment?
You need to replace the file tools/pa32lsb.exe with the "patch32lsb-windows-32bit.exe" or "patch32lsb-windows-64bit.exe" and rename it to "pa32lsb.exe".
@geek1011 it works ok, what the difference between the old and new file.
Edit: never mind I read the README.md, I'm waiting for the zlib support.
One thing that stands out in some of these examples is repeating the search string in the FindBaseAddress and ReplaceString instructions. Is it possible to write the above as
omitting the Find parameter and the default being the value passed to the FindBaseAddress?
jackie_w
04-27-2018 10:07 AM
Quote:
Originally Posted by oren64
(Post 3687426)
You need to replace the file tools/pa32lsb.exe with the "patch32lsb-windows-32bit.exe" or "patch32lsb-windows-64bit.exe" and rename it to "pa32lsb.exe".
I should have been more specific in my question. I saw a couple of linux files (testalllibnickel.sh and testallnickel.sh) which I thought (perhaps wrongly) were needed to check old-result vs. new-result.
One thing that stands out in some of these examples is repeating the search string in the FindBaseAddress and ReplaceString instructions. Is it possible to write the above as
omitting the Find parameter and the default being the value passed to the FindBaseAddress?
Wouldn't that be less flexible? The FindBaseAddress is used to get you to the vicinity of where the patching needs to happen and needs to be unique. Depending on the specific patch, using the Offset value, the Find/Replace values may (sometimes) be much shorter strings and more specific
jackie_w
04-27-2018 10:29 AM
@geek1011,
I can't help thinking that discussion about your proposed new patching method deserves a new thread of its own. Most of the people coming to this thread aren't interested in the inner workings of a future patching system, they just want help with the current system on the latest firmware.
makara
04-27-2018 12:58 PM
Removed.
geek1011
04-27-2018 02:49 PM
Quote:
Originally Posted by jackie_w
(Post 3687459)
@geek1011,
I can't help thinking that discussion about your proposed new patching method deserves a new thread of its own. Most of the people coming to this thread aren't interested in the inner workings of a future patching system, they just want help with the current system on the latest firmware.