Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-19-2014, 03:17 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.1.1

Before starting:

1. Make sure your Kobo ereader is running firmware version 3.1.1 (761b066420). These patches work only for this specific firmware version and no other.


Windows (or other OS using a Windows emulator):

1. Download mz_koboreaderpatch_11.exe (self-extracting archive) from http://rghost.net/50558386. Extract kpg.exe only (ignore the other files).

2. Download kobo-update-3.1.1.zip from http://download.kobobooks.com/firmwa...date-3.1.1.zip. Inside kobo-update-3.1.1.zip is a tar archive KoboRoot.tgz. Inside KoboRoot.tgz is a file usr/local/Kobo/libnickel.so.1.0.0. Extract libnickel.so.1.0.0 only (ignore the other files).

3. Download kpg_conf_3_1_1.zip attached and extract kpg.conf.

4. Edit kpg.conf to: enable the patches you want (set patch_enable = `yes`) and disable the patches you don't want (set patch_enable = `no`); change the replacement values for the patches to suit your preferences. (See the section below on editing kpg.conf.)

5. Put kpg.exe, libnickel.so.1.0.0, and the edited kpg.conf together in the same directory and run kpg.exe.

6. If there are no problems then a file KoboRoot.tgz will be created. Copy this file to the .kobo directory on your ereader. Safely eject then unplug the ereader. Once unplugged the ereader will update and restart.


Linux (or other OS with GCC and GLIBC):

1. Download patch32lsb-v0.6.zip attached, extract patch32lsb.c, and compile with the following command (there should be no errors or warnings):
gcc -Wall -o patch32lsb patch32lsb.c

2. Download kobo-update-3.1.1.zip from http://download.kobobooks.com/firmwa...date-3.1.1.zip. Inside kobo-update-3.1.1.zip is a tar archive KoboRoot.tgz. Inside KoboRoot.tgz is a file usr/local/Kobo/libnickel.so.1.0.0. Extract libnickel.so.1.0.0 only (ignore the other files). You can use the following command to do this:
unzip -p kobo-update-3.1.1.zip KoboRoot.tgz | tar xz --strip-components=4 ./usr/local/Kobo/libnickel.so.1.0.0

3. Download patch32lsb_conf_3_1_1.zip attached and extract patch32lsb.conf.

4. Edit patch32lsb.conf to: enable the patches you want (set patch_enable = `yes`) and disable the patches you don't want (set patch_enable = `no`); change the replacement values for the patches to suit your preferences. (See the section below on editing kpg.conf.)

5. Put patch32lsb, libnickel.so.1.0.0, and patch32lsb.conf together in the current directory and run the following commands:
mkdir -p usr/local/Kobo
./patch32lsb -p patch32lsb.conf -i libnickel.so.1.0.0 -o usr/local/Kobo/libnickel.so.1.0.0
tar czf KoboRoot.tgz ./usr/local/Kobo/libnickel.so.1.0.0

6. If there are no problems then a file KoboRoot.tgz will be created. Copy this file to the .kobo directory on your ereader. Safely eject then unplug the ereader. Once unplugged the ereader will update and restart.


To return your ereader to its original unpatched state:

1. Edit kpg.conf or patch32lsb.conf to disable all patches (set patch_enable = `no` for every patch).

2. Delete the old KoboRoot.tgz, then repeat steps 5-6 of the procedure for your OS above.


Editing kpg.conf to suit to 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 existing values in kpg.conf 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 the Kobo Patcher thread for examples.

2. My line spacing values: Change the lines starting with replace_float. The middle number is the original value, the number on the right is the new value that can be changed.

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 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 on the right is the new value that can be changed.

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 on the right is the new value that can be changed.

The values are the margin widths (in units of 1/16 inch 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 on the right is the new value that can be changed.

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).

Last edited by GeoffR; 01-26-2014 at 02:53 AM. Reason: Added section on editing kpg.conf to suit preferences and device.
GeoffR is offline   Reply With Quote
Old 01-19-2014, 03:38 AM   #2
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
More patches

If anyone has any other patches for firmware 3.1.1, post them in this thread and I'll add a link to them here. To use these patches, just copy and paste them into your kpg.conf (or patch32lsb.conf).


A replacement for the standard line spacing patch which allows all 15 spacing values to be changed:
Spoiler:
Code:
<Patch>
patch_name = `My 15 line spacing values` 
patch_enable = `yes`
# save regs, load val1 from new table
replace_bytes = 73FA38, 00 22 00 23 06 F1 48 05, B0 46 06 F1 48 05 3C A3
replace_bytes = 73FA40, C3 F6 F0 73, D3 E9 00 23
# load val5 from new table
replace_bytes = 73FA88, 4F F0 33 32 43 F2 33 33, 2B A3 D3 E9 00 23 00 46
replace_bytes = 73FA90, C3 F6 F3 73, 00 46 00 46
# load val7 from new table
replace_bytes = 73FAB2, 00 22 00 23 C3 F6 F8 73, 23 A3 D3 E9 00 23 00 46
# load val10 from new table
replace_bytes = 73FAEA, 00 22 4F F0 80 43, 17 A3 D3 E9 00 23
# load val11-val14 from old table in a loop to make room for new table
replace_bytes = 73FAFC, 32 A3 D3 E9 00 23 1E A9, 32 A7 00 26 D7 E9 00 23
replace_bytes = 73FB04, 28 46 61 E9 0A 23 35 F6, 1E A9 31 44 61 E9 0A 23
replace_bytes = 73FB0C, 60 EB 30 A3 D3 E9 00 23, 28 46 35 F6 5E EB 08 36
replace_bytes = 73FB14, 1E A9 28 46 61 E9, 08 37 20 2E F2 D1
# restore regs, load val15 from new table
replace_bytes = 73FB1A, 08 23 35 F6 56 EB 2D A3, 46 46 28 46 0C A3 D3 E9
replace_bytes = 73FB22, D3 E9 00 23 1E A9 28 46, 00 23 1E A9 61 E9 02 23
replace_bytes = 73FB2A, 61 E9 06 23 35 F6, 35 F6 50 EB 13 E0
# new table, inial values 1.0, 1.2, 1.5, 2.0, 3.0
replace_bytes = 73FB30, 4E EB 2B A3 D3 E9 00 23, 00 00 00 00 00 00 F0 3F
replace_bytes = 73FB38, 1E A9 28 46 61 E9 04 23, 33 33 33 33 33 33 F3 3F
replace_bytes = 73FB40, 35 F6 44 EB 00 23 00 22, 00 00 00 00 00 00 F8 3F
replace_bytes = 73FB48, C4 F2 08 03 1E A9 61 E9, 00 00 00 00 00 00 00 40
replace_bytes = 73FB50, 02 23 28 46 35 F6 3A EB, 00 00 00 00 00 00 08 40
#
# 15 values for replacement
replace_float = 73FB30, 1.0,  0.7
replace_float = 73FB98, 1.05, 0.75
replace_float = 73FBA0, 1.07, 0.8
replace_float = 73FBA8, 1.1,  0.825
replace_float = 73FB38, 1.2,  0.85
replace_float = 73FBB0, 1.35, 0.875
replace_float = 73FB40, 1.5,  0.9
replace_float = 73FBB8, 1.7,  0.925
replace_float = 73FBC0, 1.8,  0.95
replace_float = 73FB48, 2.0,  0.975
replace_float = 73FBC8, 2.2,  1.0
replace_float = 73FBD0, 2.4,  1.05
replace_float = 73FBD8, 2.6,  1.1
replace_float = 73FBE0, 2.8,  1.2
replace_float = 73FB50, 3.0,  1.5
</Patch>


A patch to prevent the AndroidBookLoadTablet_Aspect.parsed cover image file being downloaded or generated, which fixes a problem with the cover image for kepubs not being displayed on the book details screen if wifi is turned off.
(Note that recent versions of Calibre will copy the AndroidBookLoadTablet_Aspect.parsed image along wth other cover images if you have "Send covers" enabled, so this patch may no longer be needed.)
Spoiler:
Code:
<Patch>
patch_name = `Avoid generating/downloading redundant cover image`
patch_enable = `yes`
replace_string = 1104FA4, `AndroidBookLoadTablet_Aspect`, `N3_LIBRARY_FULL`
</Patch>



Patches to force the use of user selected font and line spacing for epubs:
https://www.mobileread.com/forums/sho...&postcount=641


Patches to ignore the book's internal CSS stylesheet and TOC navpoints:
Spoiler:
Code:
<Patch>
patch_name = `Ignore book internal CSS stylesheet`
patch_enable = `no`
replace_string = 14413CC, `s`, `_`
replace_string = 14413E4, `s`, `_`
</Patch>

<Patch>
patch_name = `Ignore book TOC navpoints`
patch_enable = `yes`
replace_string = 144388C, `n`, `_`
</Patch>



Block WiFi firmware upgrade: This patch should prevent the firmware being upgraded during WiFi sync. You can still upgrade by sideloading the new firmware or by syncing via the Kobo desktop program. See this thread for discussion.
Spoiler:
Code:
<Patch>
patch_name = `Block WiFi firmware upgrade`
patch_enable = `no`
replace_string = 1106BE1, `%3/%4/%5`, `k/99.9/5`
</Patch>

Last edited by GeoffR; 05-21-2014 at 01:24 PM. Reason: Updated `Block WiFi firmware upgrade` patch
GeoffR is offline   Reply With Quote
Advert
Old 01-19-2014, 06:53 AM   #3
giododa
Connoisseur
giododa can even cheer up an android equipped with a defective Genuine Personality Prototype.giododa can even cheer up an android equipped with a defective Genuine Personality Prototype.giododa can even cheer up an android equipped with a defective Genuine Personality Prototype.giododa can even cheer up an android equipped with a defective Genuine Personality Prototype.giododa can even cheer up an android equipped with a defective Genuine Personality Prototype.giododa can even cheer up an android equipped with a defective Genuine Personality Prototype.giododa can even cheer up an android equipped with a defective Genuine Personality Prototype.giododa can even cheer up an android equipped with a defective Genuine Personality Prototype.giododa can even cheer up an android equipped with a defective Genuine Personality Prototype.giododa can even cheer up an android equipped with a defective Genuine Personality Prototype.giododa can even cheer up an android equipped with a defective Genuine Personality Prototype.
 
giododa's Avatar
 
Posts: 70
Karma: 30702
Join Date: Jul 2010
Location: Italy
Device: Kobo Libra H2O
Very nice, thank you!
giododa is offline   Reply With Quote
Old 01-19-2014, 09:41 AM   #4
Martina Schein
eBook-Reader-Fan
Martina Schein ought to be getting tired of karma fortunes by now.Martina Schein ought to be getting tired of karma fortunes by now.Martina Schein ought to be getting tired of karma fortunes by now.Martina Schein ought to be getting tired of karma fortunes by now.Martina Schein ought to be getting tired of karma fortunes by now.Martina Schein ought to be getting tired of karma fortunes by now.Martina Schein ought to be getting tired of karma fortunes by now.Martina Schein ought to be getting tired of karma fortunes by now.Martina Schein ought to be getting tired of karma fortunes by now.Martina Schein ought to be getting tired of karma fortunes by now.Martina Schein ought to be getting tired of karma fortunes by now.
 
Martina Schein's Avatar
 
Posts: 175
Karma: 444178
Join Date: Sep 2012
Location: Saarbruecken / DE
Device: Kobo Aura H2O 2nd Edition
Thanks a lot.
Martina Schein is offline   Reply With Quote
Old 01-19-2014, 05:14 PM   #5
icallaci
Guru
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 766
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
Thanks, GeoffR. This makes things a whole lot easier. It would also be nice if, from now on, each new FW version gets its own "Instructions for patching firmware n.n.n" post. I spent many hours reading the other thread, trying to figure out what to do for 3.1.1.
icallaci is online now   Reply With Quote
Advert
Old 01-20-2014, 07:13 PM   #6
jandrew
Zealot
jandrew ought to be getting tired of karma fortunes by now.jandrew ought to be getting tired of karma fortunes by now.jandrew ought to be getting tired of karma fortunes by now.jandrew ought to be getting tired of karma fortunes by now.jandrew ought to be getting tired of karma fortunes by now.jandrew ought to be getting tired of karma fortunes by now.jandrew ought to be getting tired of karma fortunes by now.jandrew ought to be getting tired of karma fortunes by now.jandrew ought to be getting tired of karma fortunes by now.jandrew ought to be getting tired of karma fortunes by now.jandrew ought to be getting tired of karma fortunes by now.
 
jandrew's Avatar
 
Posts: 129
Karma: 2934438
Join Date: Jan 2014
Location: Winnipeg MB Canada
Device: aura hd
Alas, I followed the instructions and all I got was a full factory reset

Now re-populating it with all my content. Then I will just stick to reading with stock FW
jandrew is offline   Reply With Quote
Old 01-20-2014, 08:04 PM   #7
Danger
Evangelist
Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.
 
Danger's Avatar
 
Posts: 490
Karma: 1665031
Join Date: Nov 2010
Location: Vancouver Island, Nanaimo
Device: K2 (retired), Kobo Touch (passed to the wife), KGlo, Galaxy TabPro
Excellent, thank you. Worked like a charm on my Glo.
Danger is offline   Reply With Quote
Old 01-22-2014, 02:25 AM   #8
sdiox
Member
sdiox can differentiate black from dark navy bluesdiox can differentiate black from dark navy bluesdiox can differentiate black from dark navy bluesdiox can differentiate black from dark navy bluesdiox can differentiate black from dark navy bluesdiox can differentiate black from dark navy bluesdiox can differentiate black from dark navy bluesdiox can differentiate black from dark navy bluesdiox can differentiate black from dark navy bluesdiox can differentiate black from dark navy bluesdiox can differentiate black from dark navy blue
 
Posts: 14
Karma: 13124
Join Date: May 2013
Location: Thailand
Device: Kobo Aura HD, Sony PRS-650
Thank you so much for the instruction. It does work!
sdiox is offline   Reply With Quote
Old 01-22-2014, 10:34 PM   #9
Bill_D
Nameless Being
 
Quote:
Originally Posted by icallaci View Post
Thanks, GeoffR. This makes things a whole lot easier. It would also be nice if, from now on, each new FW version gets its own "Instructions for patching firmware n.n.n" post. I spent many hours reading the other thread, trying to figure out what to do for 3.1.1.

Icallaci,
Sorry, I asked you a question but I did so before I read the entire thread...Thanks,

Last edited by Bill_D; 01-22-2014 at 11:09 PM.
  Reply With Quote
Old 01-22-2014, 10:47 PM   #10
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Bill_D View Post
icallici,
I recently purchased an aura HD w/3.1.1 on it and would really like to patch it but cant for the life of me figure out how to make it happen. Do you think you could put together some sort of instructions? I'd sure appreciate it.
Did you read the first post in this thread?
davidfor is offline   Reply With Quote
Old 01-22-2014, 11:58 PM   #11
Bill_D
Nameless Being
 
Dave,
No, like an idiot, I didn't. I spent literally hours and hours researching last weekend (to no avail). Today I started again and when I came across this thread I posted without reading the whole thing. Now I'm feeling a bit sheepish but STOKED!

GeoffR,
Worked like a champ....Thanks a million!!
  Reply With Quote
Old 01-23-2014, 12:39 AM   #12
Bill_D
Nameless Being
 
One quick question....is there a kpg.conf edit that will disable the book title from being displayed? Or mabe decrease the header to nothing? Not many people need to be reminded of what book they are reading with every page turn.
Thanks in advance.
  Reply With Quote
Old 01-23-2014, 01:23 AM   #13
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Firstly, the book title is only shown for kepubs. If you read epubs the title isn't shown.

For kepubs, I don't remember seeing a patch. But if you add "showPageHeader=false" into the "Reading" section of the "Kobo eReader.conf" file, the titles are not shown. Unfortunately, it doesn't reclaim all the space.
davidfor is offline   Reply With Quote
Old 01-23-2014, 01:37 AM   #14
Bill_D
Nameless Being
 
Thanks for the info Dave,

I read mobi's because I like to know how many pages I have left in a book regardless of the font size (total pages remain the same with epubs when font size is changed). Unfortunately, mobi's also show the title (at least the ones I have do).
  Reply With Quote
Old 01-23-2014, 01:55 AM   #15
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I haven't tried a mobi for a while and I hadn't noticed the title or the page numbering. I usually found problems with them and converting to epub solved them.

Kepubs use do page numbering per screen but it is per chapter rather than the whole book. There are advantages especially if the book has footnotes or pictures. But it shows the title at the top of the screen. There is a calibre plugin to sideload as kepub if you want to experiment.
davidfor is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Firmware Update Instructions and the latest Firmware Versions mitchwah Ectaco jetBook 113 10-24-2023 09:02 PM
Touch Patching nickel to leave the wifi active schlecky Kobo Developer's Corner 4 01-23-2017 11:46 AM
Automatically patching custom recipies with updates to built-in recipies squigish Development 4 10-13-2013 03:48 AM


All times are GMT -4. The time now is 09:50 AM.


MobileRead.com is a privately owned, operated and funded community.