MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Kobo Developer's Corner (https://www.mobileread.com/forums/forumdisplay.php?f=247)
-   -   Instructions for patching firmware 4.15.12920 (https://www.mobileread.com/forums/showthread.php?t=320410)

geek1011 05-28-2019 06:45 PM

Instructions for patching firmware 4.15.12920
 
This patch thread is for firmware 4.15.12920 (b231bfea368f4d641c17a337e80e9ee4219d55be).

Instructions for patching on Windows, Linux, or macOS with kobopatch:
  1. Download the firmware from here.
  2. Download and unzip kobopatch_4.15.12920.zip from here.
  3. Copy the original firmware you just downloaded into the kobopatch src folder.
  4. Install the firmware on your kobo BEFORE proceeding with the next steps.
  5. Enable patches in the files in the src folder (or use the overrides in kobopatch.yaml to keep your options separate).
  6. Run kobopatch.bat on Windows, or kobopatch.sh on Linux.
  7. If the patching succeeded, a file named KoboRoot.tgz will be created in the out folder. Copy it to the .kobo folder of your device.
  8. Safely remove your device.

Download

See the kobopatch - An improved patching system thread for more details.

geek1011 05-28-2019 06:46 PM

Changes to the kobopatch zip:
v51 (2019-07-17): Updated kobopatch to v0.14.0 (geek1011).
v50 (2019-06-20): New "Set font scale factor" patch (GeoffR), improved automatic build scripts (geek1011).
v49 (2019-06-09): New "ePub uniform font scale" patch (GeoffR).
v48 (2019-05-29): Updated missing 24 line spacing values fixed/adjustable margins patches (GeoffR).
v47 (2019-05-28): Initial release for 4.15.12920, 2 new TOC indentation patches (geek1011).

Missing patches:
- Disable wishlist (causes really unusual side effects)

Patches for other files:
- None yet

Notes about this firmware version:
- Parental controls is now an official feature
- New indented TOC level feature (but it's buggy and hard to see, see the new patches to fix this).

New patches in this version:
- Increase TOC level indentation (@geek1011)
- Increase TOC level indentation and fix extra indentation bug (@geek1011)
- ePub uniform font scale (@GeoffR)

jackie_w 05-28-2019 08:58 PM

Quote:

Originally Posted by geek1011 (Post 3850330)
New patches in this version:
- Increase TOC level indentation and fix extra indentation bug (@geek1011)

Hi, geek1011,

Thanks for your speedy work. I've done a test drive on the above new patch and it seems to work fine. There's always a BUT ... :) I would prefer an even bigger indent if that is possible - maybe multiply by 8 rather than 4? - if the indents are going to be space-characters. I'm assuming this is the patch line which would need to be customised but I don't have a clue what to change it to. Or is it not as simple as that?

Code:

  - ReplaceBytes: {Offset: 2, FindH: 00 20, ReplaceH: 82 00}  # shift level by 2 (multiply by 4) into r2

geek1011 05-28-2019 10:26 PM

Quote:

Originally Posted by jackie_w (Post 3850385)
I would prefer an even bigger indent if that is possible - maybe multiply by 8 rather than 4? - if the indents are going to be space-characters. I'm assuming this is the patch line which would need to be customised but I don't have a clue what to change it to. Or is it not as simple as that?

You can multiply it by any power of 2. You'd want to replace that replacement with a LSL instruction like: LSL r2, r0, #x , where x is the power of 2 (2^x) to multiply it by. To make it multiply by 8, you'd want 3 to be the power, which gives you C2 00. You can compile the instruction online using http://armconverter.com/, and taking the Thumb Hex output.

Semwize 05-29-2019 05:54 AM

Quote:

Originally Posted by geek1011 (Post 3850431)
C2 00

It's too much, IMHO. It is better to leave your original version.

jackie_w 05-29-2019 07:26 AM

Quote:

Originally Posted by Semwize (Post 3850513)
It's too much, IMHO. It is better to leave your original version.

Just to be clear, I'm not suggesting geek1011 changes the patch. I just wanted to know whether a personal customisation was possible.

@geek1011,
I didn't understand all the technicalities of your reply, but I got the gist, so thanks very much. :) I'll give it a try when I have a bit more time later today.

Semwize 05-29-2019 07:42 AM

Quote:

Originally Posted by jackie_w (Post 3850542)
Just to be clear, I'm not suggesting geek1011 changes the patch. I just wanted to know whether a personal customisation was possible.

I understood it, of course.

Just tried both options and concluded that C2 00 too much, ugly. But this is of course individual.

jackie_w 05-29-2019 10:22 AM

3 Attachment(s)
For anyone trying to decide whether to enable the new TOC patch 'Increase TOC level indentation and fix extra indentation bug'. Here are some screencaps for comparison purposes.
  • left: patch disabled (indent = 2, top level indented)
  • middle: patch enabled (indent = 2-squared, top level not indented)
  • right: customised patch enabled (indent = 2-cubed, top level not indented)

ETA: I should have mentioned that these screencaps are from a Forma. Bigger indents on a 6" screen might not be ideal.

Michal Jancik 05-29-2019 11:54 AM

Thank you for PATCH ! Excellent work!
:thanks:

GeoffR 05-29-2019 03:27 PM

Quote:

Originally Posted by jackie_w (Post 3850385)
I would prefer an even bigger indent if that is possible - maybe multiply by 8 rather than 4? - if the indents are going to be space-characters. I'm assuming this is the patch line which would need to be customised but I don't have a clue what to change it to. Or is it not as simple as that?

Maybe this would work? The replacement value can be any number 0-255.
Code:

Increase TOC level indentation:
  - Enabled: yes
  - PatchGroup: TOC Indentation
  - Description: |
      The space indented Table of Contents levels are quite hard to see, as the
      difference is almost too small to easily notice.
  - ReplaceBytes: {Offset: 0x8B2FD6, FindH: 42 00 4F F0 20 01, ReplaceH: 02 22 42 43 20 21}
  # Replacement value:
  - ReplaceInt: {Offset: 0x8B2FD6, Find: 2, Replace: 6}


geek1011 05-29-2019 03:37 PM

Quote:

Originally Posted by GeoffR (Post 3850711)
Maybe this would work? The replacement value can be any number 0-255.
Code:

Increase TOC level indentation:
  - Enabled: yes
  - PatchGroup: TOC Indentation
  - Description: |
      The space indented Table of Contents levels are quite hard to see, as the
      difference is almost too small to easily notice.
  - ReplaceBytes: {Offset: 0x8B2FD6, FindH: 42 00 4F F0 20 01, ReplaceH: 02 22 42 43 20 21}
  # Replacement value:
  - ReplaceInt: {Offset: 0x8B2FD6, Find: 2, Replace: 6}


That should work, but then I wouldn't be able to fit the bugfix in there too.

jackie_w 05-29-2019 03:57 PM

Quote:

Originally Posted by GeoffR (Post 3850711)
Maybe this would work? The replacement value can be any number 0-255.
Code:

Increase TOC level indentation:
  - Enabled: yes
  - PatchGroup: TOC Indentation
  - Description: |
      The space indented Table of Contents levels are quite hard to see, as the
      difference is almost too small to easily notice.
  - ReplaceBytes: {Offset: 0x8B2FD6, FindH: 42 00 4F F0 20 01, ReplaceH: 02 22 42 43 20 21}
  # Replacement value:
  - ReplaceInt: {Offset: 0x8B2FD6, Find: 2, Replace: 6}


I really like the customisability (is that a word?) of this, but I do like geek1011's fix to have top-level items not indented (which seems like a bug to me, but calling it that seems to have created a bit of tension earlier today).

Having both would be great, if it was possible. :D

ETA: I see geek1011 got in first. :)

jackie_w 05-29-2019 03:58 PM

Fat fingers, please ignore

GeoffR 05-29-2019 04:44 PM

Quote:

Originally Posted by geek1011 (Post 3850717)
That should work, but then I wouldn't be able to fit the bugfix in there too.

I think this would work, but have not tested. it uses the fact that r7 = sp+8 which might change in the future.
Spoiler:
Code:

Increase TOC level indentation and fix extra indentation bug:
  - Enabled: yes
  - PatchGroup: TOC Indentation
  - Description: |
      The space indented Table of Contents levels are quite hard to see, as the
      difference is almost too small to easily notice. In addition, this fixes
      the bug where all TOC entries are indented by 1 level extra.
  - BaseAddress: 0x8B2FD2
  # Clear out existing instructions with NOPs
  - ReplaceBytes: {Offset: 0, FindH: 07 F1 0C 0B, ReplaceH: 00 20 00 20} # put string address in fp
  - ReplaceBytes: {Offset: 4, FindH: 42 00, ReplaceH: 00 20}            # shift level by 1 (multiply by 2) into r2
  - ReplaceBytes: {Offset: 6, FindH: 4F F0 20 01, ReplaceH: 00 20 00 20} # set r1 to 0x20 (space char)
  - ReplaceBytes: {Offset: 10, FindH: 58 46, ReplaceH: 00 20}            # put fp in r0
  # Put new instructions
  - ReplaceBytes: {Offset: 0, FindH: 00 20, ReplaceH: 40 1E}            # decrease level by 1
  - ReplaceBytes: {Offset: 2, FindH: 00 20, ReplaceH: 02 22}            # load multiplier into r2
  - ReplaceBytes: {Offset: 4, FindH: 00 20, ReplaceH: 42 43}            # multiply level, result into r2
  - ReplaceBytes: {Offset: 6, FindH: 00 20, ReplaceH: 20 21}            # set r1 to 0x20 (space char)
  - ReplaceBytes: {Offset: 8, FindH: 00 20, ReplaceH: 05 A8}            # put string address (sp+20==r7+12) into r0
  - ReplaceBytes: {Offset: 10, FindH: 00 20, ReplaceH: 83 46}            # save r0 into fp
  # Replacement value (multiplier):
  - ReplaceInt: {Offset: 2, Find: 2, Replace: 6}


geek1011 05-29-2019 05:03 PM

Quote:

Originally Posted by GeoffR (Post 3850740)
I think this would work, but have not tested. it uses the fact that r7 = sp+8 which might change in the future.
Spoiler:
Code:

Increase TOC level indentation and fix extra indentation bug:
  - Enabled: yes
  - PatchGroup: TOC Indentation
  - Description: |
      The space indented Table of Contents levels are quite hard to see, as the
      difference is almost too small to easily notice. In addition, this fixes
      the bug where all TOC entries are indented by 1 level extra.
  - BaseAddress: 0x8B2FD2
  # Clear out existing instructions with NOPs
  - ReplaceBytes: {Offset: 0, FindH: 07 F1 0C 0B, ReplaceH: 00 20 00 20} # put string address in fp
  - ReplaceBytes: {Offset: 4, FindH: 42 00, ReplaceH: 00 20}            # shift level by 1 (multiply by 2) into r2
  - ReplaceBytes: {Offset: 6, FindH: 4F F0 20 01, ReplaceH: 00 20 00 20} # set r1 to 0x20 (space char)
  - ReplaceBytes: {Offset: 10, FindH: 58 46, ReplaceH: 00 20}            # put fp in r0
  # Put new instructions
  - ReplaceBytes: {Offset: 0, FindH: 00 20, ReplaceH: 40 1E}            # decrease level by 1
  - ReplaceBytes: {Offset: 2, FindH: 00 20, ReplaceH: 02 22}            # load multiplier into r2
  - ReplaceBytes: {Offset: 4, FindH: 00 20, ReplaceH: 42 43}            # multiply level, result into r2
  - ReplaceBytes: {Offset: 6, FindH: 00 20, ReplaceH: 20 21}            # set r1 to 0x20 (space char)
  - ReplaceBytes: {Offset: 8, FindH: 00 20, ReplaceH: 05 A8}            # put string address (sp+20==r7+12) into r0
  - ReplaceBytes: {Offset: 10, FindH: 00 20, ReplaceH: 83 46}            # save r0 into fp
  # Replacement value (multiplier):
  - ReplaceInt: {Offset: 2, Find: 2, Replace: 6}


I think it should work. That's a really clever way of doing things. I didn't think to look for ways to make the offset calculation shorter, and I didn't know MOV could be made into a 16-bit instruction by using SP. I'll try it later tonight.

Semwize 05-29-2019 05:05 PM

Quote:

Originally Posted by GeoffR (Post 3850740)
I think this would work, but have not tested.

Tested, works fine :)

jackie_w 05-29-2019 06:18 PM

Quote:

Originally Posted by GeoffR (Post 3850740)
I think this would work, but have not tested. it uses the fact that r7 = sp+8 which might change in the future.
Spoiler:
Code:

Increase TOC level indentation and fix extra indentation bug:
  - Enabled: yes
  - PatchGroup: TOC Indentation
  - Description: |
      The space indented Table of Contents levels are quite hard to see, as the
      difference is almost too small to easily notice. In addition, this fixes
      the bug where all TOC entries are indented by 1 level extra.
  - BaseAddress: 0x8B2FD2
  # Clear out existing instructions with NOPs
  - ReplaceBytes: {Offset: 0, FindH: 07 F1 0C 0B, ReplaceH: 00 20 00 20} # put string address in fp
  - ReplaceBytes: {Offset: 4, FindH: 42 00, ReplaceH: 00 20}            # shift level by 1 (multiply by 2) into r2
  - ReplaceBytes: {Offset: 6, FindH: 4F F0 20 01, ReplaceH: 00 20 00 20} # set r1 to 0x20 (space char)
  - ReplaceBytes: {Offset: 10, FindH: 58 46, ReplaceH: 00 20}            # put fp in r0
  # Put new instructions
  - ReplaceBytes: {Offset: 0, FindH: 00 20, ReplaceH: 40 1E}            # decrease level by 1
  - ReplaceBytes: {Offset: 2, FindH: 00 20, ReplaceH: 02 22}            # load multiplier into r2
  - ReplaceBytes: {Offset: 4, FindH: 00 20, ReplaceH: 42 43}            # multiply level, result into r2
  - ReplaceBytes: {Offset: 6, FindH: 00 20, ReplaceH: 20 21}            # set r1 to 0x20 (space char)
  - ReplaceBytes: {Offset: 8, FindH: 00 20, ReplaceH: 05 A8}            # put string address (sp+20==r7+12) into r0
  - ReplaceBytes: {Offset: 10, FindH: 00 20, ReplaceH: 83 46}            # save r0 into fp
  # Replacement value (multiplier):
  - ReplaceInt: {Offset: 2, Find: 2, Replace: 6}


Perfect! Now everyone can have the exact indent they want. :)
Great collaborative work geek1011 and GeoffR, karma to you both!

Martina Schein 05-30-2019 04:43 PM

@geek1011 thank you very much for the patches. They works very fine on our readers (H20 2nd Edition, GloHD and Glo). :thumbsup:

Quote:

Originally Posted by GeoffR (Post 3850740)
I think this would work, but have not tested. it uses the fact that r7 = sp+8 which might change in the future.
Spoiler:
Code:

Increase TOC level indentation and fix extra indentation bug:
  - Enabled: yes
  - PatchGroup: TOC Indentation
  - Description: |
      The space indented Table of Contents levels are quite hard to see, as the
      difference is almost too small to easily notice. In addition, this fixes
      the bug where all TOC entries are indented by 1 level extra.
  - BaseAddress: 0x8B2FD2
  # Clear out existing instructions with NOPs
  - ReplaceBytes: {Offset: 0, FindH: 07 F1 0C 0B, ReplaceH: 00 20 00 20} # put string address in fp
  - ReplaceBytes: {Offset: 4, FindH: 42 00, ReplaceH: 00 20}            # shift level by 1 (multiply by 2) into r2
  - ReplaceBytes: {Offset: 6, FindH: 4F F0 20 01, ReplaceH: 00 20 00 20} # set r1 to 0x20 (space char)
  - ReplaceBytes: {Offset: 10, FindH: 58 46, ReplaceH: 00 20}            # put fp in r0
  # Put new instructions
  - ReplaceBytes: {Offset: 0, FindH: 00 20, ReplaceH: 40 1E}            # decrease level by 1
  - ReplaceBytes: {Offset: 2, FindH: 00 20, ReplaceH: 02 22}            # load multiplier into r2
  - ReplaceBytes: {Offset: 4, FindH: 00 20, ReplaceH: 42 43}            # multiply level, result into r2
  - ReplaceBytes: {Offset: 6, FindH: 00 20, ReplaceH: 20 21}            # set r1 to 0x20 (space char)
  - ReplaceBytes: {Offset: 8, FindH: 00 20, ReplaceH: 05 A8}            # put string address (sp+20==r7+12) into r0
  - ReplaceBytes: {Offset: 10, FindH: 00 20, ReplaceH: 83 46}            # save r0 into fp
  # Replacement value (multiplier):
  - ReplaceInt: {Offset: 2, Find: 2, Replace: 6}


@GeoffR your modified version works very well. I use factor 10 on my H2O 2nd edition and factor 8 on my husband's GloHD and Glo respectively. Thank you very much. :thumbsup:


Here are the links to the patcher configurations we use:

Patcher for Firmware 4.15.12920 für Kobo Aura H2O 2nd Edition 1st Version
https://www.dropbox.com/sh/x11b8v6fa...-WpACzc7a?dl=0

Patcher for Firmware 4.15.12920 für Kobo Glo
https://www.dropbox.com/sh/48v6utf0e...H-9Y8I33a?dl=0

Patcher for Firmware 4.15.12920 für Kobo Glo HD
https://www.dropbox.com/sh/aq2t0ddd2...uFONzNW-a?dl=0

geek1011 05-30-2019 08:07 PM

Quote:

Originally Posted by GeoffR (Post 3850740)
I think this would work, but have not tested. it uses the fact that r7 = sp+8 which might change in the future.
Spoiler:
Code:

Increase TOC level indentation and fix extra indentation bug:
  - Enabled: yes
  - PatchGroup: TOC Indentation
  - Description: |
      The space indented Table of Contents levels are quite hard to see, as the
      difference is almost too small to easily notice. In addition, this fixes
      the bug where all TOC entries are indented by 1 level extra.
  - BaseAddress: 0x8B2FD2
  # Clear out existing instructions with NOPs
  - ReplaceBytes: {Offset: 0, FindH: 07 F1 0C 0B, ReplaceH: 00 20 00 20} # put string address in fp
  - ReplaceBytes: {Offset: 4, FindH: 42 00, ReplaceH: 00 20}            # shift level by 1 (multiply by 2) into r2
  - ReplaceBytes: {Offset: 6, FindH: 4F F0 20 01, ReplaceH: 00 20 00 20} # set r1 to 0x20 (space char)
  - ReplaceBytes: {Offset: 10, FindH: 58 46, ReplaceH: 00 20}            # put fp in r0
  # Put new instructions
  - ReplaceBytes: {Offset: 0, FindH: 00 20, ReplaceH: 40 1E}            # decrease level by 1
  - ReplaceBytes: {Offset: 2, FindH: 00 20, ReplaceH: 02 22}            # load multiplier into r2
  - ReplaceBytes: {Offset: 4, FindH: 00 20, ReplaceH: 42 43}            # multiply level, result into r2
  - ReplaceBytes: {Offset: 6, FindH: 00 20, ReplaceH: 20 21}            # set r1 to 0x20 (space char)
  - ReplaceBytes: {Offset: 8, FindH: 00 20, ReplaceH: 05 A8}            # put string address (sp+20==r7+12) into r0
  - ReplaceBytes: {Offset: 10, FindH: 00 20, ReplaceH: 83 46}            # save r0 into fp
  # Replacement value (multiplier):
  - ReplaceInt: {Offset: 2, Find: 2, Replace: 6}


Do you want the patch files updated to this?

GeoffR 05-30-2019 09:13 PM

Quote:

Originally Posted by geek1011 (Post 3851214)
Do you want the patch files updated to this?


I don't know, I'm not using this firmware myself, I just posted it as an example. Others will probably have a better idea about what replacement value is best to use as the default.

jackie_w 05-30-2019 09:27 PM

Quote:

Originally Posted by geek1011 (Post 3851214)
Do you want the patch files updated to this?

I'm not sure I'm entitled to a say but I'd vote for GeoffR's variation becoming the standard version of the patch because of it's more granular customisation. This is assuming you think it will be maintainable across new firmware upgrades.

geek1011 05-31-2019 12:30 PM

Quote:

Originally Posted by jackie_w (Post 3851232)
I'm not sure I'm entitled to a say but I'd vote for GeoffR's variation becoming the standard version of the patch because of it's more granular customisation. This is assuming you think it will be maintainable across new firmware upgrades.

I'm more asking about if he wants it included as-is. It's not much harder to maintain, as I just need to check the value at the beginning of the function when I update it.

Leonatus 06-01-2019 06:08 AM

While patching my Kobo Touch (A), I received this Log:
Spoiler:
Code:

kobopatch v0.13.0
https://github.com/geek1011/kobopatch



KoboPatch::LoadConfig
reading config file from *os.File
unmarshaling yaml
  | {
  |    "Version": "4.15.12920",
  |    "In": "src/kobo-update-4.15.12920.zip",
  |    "Out": "out/KoboRoot.tgz",
  |    "Log": "out/log.txt",
  |    "PatchFormat": "kobopatch",
  |    "Patches": {
  |        "src/libadobe.so.yaml": "usr/local/Kobo/libadobe.so",
  |        "src/libnickel.so.1.0.0.yaml": "usr/local/Kobo/libnickel.so.1.0.0",
  |        "src/librmsdk.so.1.0.0.yaml": "usr/local/Kobo/librmsdk.so.1.0.0",
  |        "src/nickel.yaml": "usr/local/Kobo/nickel"
  |    },
  |    "Overrides": {
  |        "src/libadobe.so.yaml": null,
  |        "src/libnickel.so.1.0.0.yaml": null,
  |        "src/librmsdk.so.1.0.0.yaml": null,
  |        "src/nickel.yaml": null
  |    },
  |    "Lrelease": "",
  |    "Translations": null,
  |    "Files": null
  | }


KoboPatch::OutputInit


KoboPatch::ApplyPatches
    KoboPatch::openIn
        Opening firmware zip 'src/kobo-update-4.15.12920.zip'
        Looking for KoboRoot.tgz in zip
        --> found KoboRoot.tgz
        -->    opening KoboRoot.tgz
        Opening gzip reader
        Creating tar reader
    patching entry name:'./usr/local/Kobo/libnickel.so.1.0.0' size:16225956 mode:'509' typeflag:'48' with files: src/libnickel.so.1.0.0.yaml
        reading entry contents
        loading patch file 'src/libnickel.so.1.0.0.yaml' (detected format kobopatch)
          | parsing patch file
          | parsing patch file: expanding shorthand hex values
          |  decoded hex `00 24` to `[0 36]`
          |  decoded hex `01 24` to `[1 36]`
          |  decoded hex `01 2C` to `[1 44]`
          |  decoded hex `A4 42` to `[164 66]`
          |  decoded hex `4F F0 00 00` to `[79 240 0 0]`
          |  decoded hex `18 B9` to `[24 185]`
          |  decoded hex `BB 61` to `[187 97]`
          |  decoded hex `BA 61` to `[186 97]`
          |  decoded hex `C9 B0` to `[201 176]`
          |  decoded hex `CB B0` to `[203 176]`
          |  decoded hex `02 AF` to `[2 175]`
          |  decoded hex `04 AF` to `[4 175]`
          |  decoded hex `AD F8 04 20` to `[173 248 4 32]`
          |  decoded hex `02 92 01 92` to `[2 146 1 146]`
          |  decoded hex `A5 F7 4A ED` to `[165 247 74 237]`
          |  decoded hex `85 F7 7A EF` to `[133 247 122 239]`
          |  decoded hex `20 22 4F F0 FF 33` to `[32 34 79 240 255 51]`
          |  decoded hex `00 23 01 22 0A 21` to `[0 35 1 34 10 33]`
          |  decoded hex `07 F1 70 0A` to `[7 241 112 10]`
          |  decoded hex `00 93 01 91` to `[0 147 1 145]`
          |  decoded hex `AD F8 04 20 00 93` to `[173 248 4 32 0 147]`
          |  decoded hex `42 43 92 08 01 3A` to `[66 67 146 8 1 58]`
          |  decoded hex `50 46 67 23` to `[80 70 103 35]`
          |  decoded hex `B8 BF 00 22` to `[184 191 0 34]`
          |  decoded hex `00 22 49 46` to `[0 34 73 70]`
          |  decoded hex `20 A8 49 46` to `[32 168 73 70]`
          |  decoded hex `91 F7 30 EC` to `[145 247 48 236]`
          |  decoded hex `85 F7 EA EA` to `[133 247 234 234]`
          |  decoded hex `51 46` to `[81 70]`
          |  decoded hex `20 A9` to `[32 169]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `58 B1` to `[88 177]`
          |  decoded hex `00 24` to `[0 36]`
          |  decoded hex `01 24` to `[1 36]`
          |  decoded hex `80 F0 01 00` to `[128 240 1 0]`
          |  decoded hex `01 20 01 20` to `[1 32 1 32]`
          |  decoded hex `4F F0 0F 00` to `[79 240 15 0]`
          |  decoded hex `4F F0 11 00` to `[79 240 17 0]`
          |  decoded hex `A7 F5 8E EC 6D A3` to `[167 245 142 236 109 163]`
          |  decoded hex `A9 46 00 25 ED 00` to `[169 70 0 37 237 0]`
          |  decoded hex `D3 E9 00 23 07 F1` to `[211 233 0 35 7 241]`
          |  decoded hex `20 46 04 A1 29 44` to `[32 70 4 161 41 68]`
          |  decoded hex `80 01 20 46` to `[128 1 32 70]`
          |  decoded hex `A7 F5 88 EC` to `[167 245 136 236]`
          |  decoded hex `61 E9 1C 23 A7 F5` to `[97 233 28 35 167 245]`
          |  decoded hex `08 35 70 2D F7 D1` to `[8 53 112 45 247 209]`
          |  decoded hex `84 EC 6A A3 D3 E9` to `[132 236 106 163 211 233]`
          |  decoded hex `7C E0 00 BF 00 BF` to `[124 224 0 191 0 191]`
          |  decoded hex `00 23 07 F1 80 01 20 46` to `[0 35 7 241 128 1 32 70]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `61 E9 1A 23 A7 F5 7A EC` to `[97 233 26 35 167 245 122 236]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `67 A3 D3 E9 00 23 07 F1` to `[103 163 211 233 0 35 7 241]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `80 01 20 46 61 E9 18 23` to `[128 1 32 70 97 233 24 35]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `A7 F5 70 EC 43 F2 33 33` to `[167 245 112 236 67 242 51 51]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `4F F0 33 32 C3 F6 F3 73` to `[79 240 51 50 195 246 243 115]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `07 F1 80 01 20 46 61 E9` to `[7 241 128 1 32 70 97 233]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `16 23 A7 F5 64 EC 5E A3` to `[22 35 167 245 100 236 94 163]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `D3 E9 00 23 07 F1 80 01` to `[211 233 0 35 7 241 128 1]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `20 46 61 E9 14 23 A7 F5` to `[32 70 97 233 20 35 167 245]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `5A EC 00 23 00 22 C3 F6` to `[90 236 0 35 0 34 195 246]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `F8 73 07 F1 80 01 20 46` to `[248 115 7 241 128 1 32 70]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `61 E9 12 23 A7 F5 4E EC` to `[97 233 18 35 167 245 78 236]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `55 A3 D3 E9 00 23 07 F1` to `[85 163 211 233 0 35 7 241]`
          |  decoded hex `00 00 00 00 00 00 F0 3F` to `[0 0 0 0 0 0 240 63]`
          |  decoded hex `00 23 00 22` to `[0 35 0 34]`
          |  decoded hex `00 BF 00 25` to `[0 191 0 37]`
          |  decoded hex `C4 F2 08 03 07 F1` to `[196 242 8 3 7 241]`
          |  decoded hex `20 46 29 A1 29 44` to `[32 70 41 161 41 68]`
          |  decoded hex `80 01 20 46` to `[128 1 32 70]`
          |  decoded hex `A7 F5 02 EC` to `[167 245 2 236]`
          |  decoded hex `61 E9 02 23 A7 F5` to `[97 233 2 35 167 245]`
          |  decoded hex `08 35 50 2D F7 D1` to `[8 53 80 45 247 209]`
          |  decoded hex `FE EB` to `[254 235]`
          |  decoded hex `4D 46` to `[77 70]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `01` to `[1]`
          |  decoded hex `00` to `[0]`
          |  decoded hex `07 F1 0C 0B` to `[7 241 12 11]`
          |  decoded hex `00 20 00 20` to `[0 32 0 32]`
          |  decoded hex `42 00` to `[66 0]`
          |  decoded hex `00 20` to `[0 32]`
          |  decoded hex `4F F0 20 01` to `[79 240 32 1]`
          |  decoded hex `00 20 00 20` to `[0 32 0 32]`
          |  decoded hex `58 46` to `[88 70]`
          |  decoded hex `00 20` to `[0 32]`
          |  decoded hex `00 20` to `[0 32]`
          |  decoded hex `40 1E` to `[64 30]`
          |  decoded hex `00 20` to `[0 32]`
          |  decoded hex `82 00` to `[130 0]`
          |  decoded hex `00 20` to `[0 32]`
          |  decoded hex `20 21` to `[32 33]`
          |  decoded hex `00 20 00 20` to `[0 32 0 32]`
          |  decoded hex `07 F1 0C 0B` to `[7 241 12 11]`
          |  decoded hex `00 20` to `[0 32]`
          |  decoded hex `58 46` to `[88 70]`
          |  decoded hex `00 20 00 20` to `[0 32 0 32]`
          |  decoded hex `18 B1` to `[24 177]`
          |  decoded hex `4F F0 00 00` to `[79 240 0 0]`
          |  decoded hex `59 46 50 46` to `[89 70 80 70]`
          |  decoded hex `5A 46 51 46` to `[90 70 81 70]`
          |  decoded hex `06 46` to `[6 70]`
          |  decoded hex `00 26` to `[0 38]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `4F F0 01 00` to `[79 240 1 0]`
          |  decoded hex `00 24` to `[0 36]`
          |  decoded hex `01 24` to `[1 36]`
          |  decoded hex `00 24` to `[0 36]`
          |  decoded hex `01 24` to `[1 36]`
          |  decoded hex `2E B1` to `[46 177]`
          |  decoded hex `42 00` to `[66 0]`
          |  decoded hex `82 00` to `[130 0]`
          |  decoded hex `40 F6 B8 31` to `[64 246 184 49]`
          |  decoded hex `03 21 89 02` to `[3 33 137 2]`
          |  decoded hex `4F F0 04 00` to `[79 240 4 0]`
          |  decoded hex `01 20 01 20` to `[1 32 1 32]`
          |  decoded hex `4F F0 00 00` to `[79 240 0 0]`
        validating patch file
        --> i4: internal error while validating `Un-Force user font-family in KePubs` (you should report this as a bug)


The patch in question has this settings:
Code:

Un-Force user font-family in KePubs:
  - Enabled: yes
  - Description: |
      The KePub reader uses a very heavy-handed method of setting the font selected
      by the user, overriding all fonts set by the publisher in the book unless
      "Publisher Default" is selected.
      This patch lets the font-family set by the publisher in the KePub stylesheet
      override the font-family selected by the reader from the device in some
      cases, which allows a mix of user-selected and publisher-selected fonts.
      Alternatives 1-3 give increasing preference to the publisher-selected fonts.
  - FindBaseAddressString: "* { font-family: %1 !important; }\n"
    #
    # Alternative 1:
    #    * { font-family: %1 !important; }\n
    # --> div,p{font-family:%1!important; }\n
  - ReplaceString:
    #  Offset: 0
    #  Find: "* { font-family: %1 !important; }\n"
    #  Replace: "div,p{font-family:%1!important; }\n"
    #  MustMatchLength: yes
    #
    # Alternative 2: (Similar to ePub default)
    #    * { font-family: %1 !important; }\n
    # --> body,p{font-family:%1!important;}\n
  - ReplaceString:
      Offset: 0
      Find: "* { font-family: %1 !important; }\n"
      Replace: "body,p{font-family:%1!important;}\n"
      MustMatchLength: yes
    #
    # Alternative 3: (similar to ePub with `Un-force font-family override p tags`)
    #    * { font-family: %1 !important; }\n
    # --> body{font-family:%1 !important; }\n
# - ReplaceString:
#    Offset: 0
#    Find: "* { font-family: %1 !important; }\n"
#    Replace: "body{font-family:%1 !important; }\n"
#    MustMatchLength: yes

Is the error caused by me?

Semwize 06-01-2019 06:26 AM

Quote:

Originally Posted by Leonatus (Post 3851642)
Is the error caused by me?

Yes, you unleashed wrong lines.
Code:

    # Alternative 1:
    #    * { font-family: %1 !important; }\n
    # --> div,p{font-family:%1!important; }\n
 # - ReplaceString:


Leonatus 06-01-2019 06:37 AM

Quote:

Originally Posted by Semwize (Post 3851650)
Yes, you unleashed wrong lines.

Yes, of course!:smack:
Thank you for the quick reply!
Suggestion for a further patch: remove tomatoes in front of the eyes.

crimson 06-01-2019 04:16 PM

1 Attachment(s)
Can anyone get "ePub fixed/adjustable top/bottom margins" to work? I want to make the top and bottom margins adjustable so I leave everything commented but all I got is this. The margins are fixed.

This patch worked on GeoffR's version so I'm not sure what I did wrong.

geek1011 06-01-2019 09:23 PM

Quote:

Originally Posted by crimson (Post 3851764)
Can anyone get "ePub fixed/adjustable top/bottom margins" to work? I want to make the top and bottom margins adjustable so I leave everything commented but all I got is this. The margins are fixed.

This patch worked on GeoffR's version so I'm not sure what I did wrong.

I can't help with this patch, as I don't use it my self, so I don't know the details.

What exactly do you mean by GeoffR's version? He updated the patch himself: https://github.com/geek1011/kobopatc...818727465c1d11.

crimson 06-02-2019 08:04 PM

Quote:

Originally Posted by geek1011 (Post 3851838)
I can't help with this patch, as I don't use it my self, so I don't know the details.

What exactly do you mean by GeoffR's version? He updated the patch himself: https://github.com/geek1011/kobopatc...818727465c1d11.

I mean back then when GeoffR still made his version of patch. Didn't realise that was a year ago :rolleyes:



GeoffR 06-02-2019 08:51 PM

Quote:

Originally Posted by crimson (Post 3851764)
Can anyone get "ePub fixed/adjustable top/bottom margins" to work? I want to make the top and bottom margins adjustable so I leave everything commented but all I got is this. The margins are fixed.

This patch worked on GeoffR's version so I'm not sure what I did wrong.

It is possible that the patch no longer works, I am still on firmware 4.8.1073 and while I have been updating that patch I haven't actually tested it on later versions.

From your screenshot I guess you have enabled the Reduce top/bottom page spacer patch? (in nickel.yaml) If so then you should also edit the last line of the ePub fixed/adjustable top/bottom margins patch to reflect the new size of the built-in margins:
Spoiler:
Code:

    # Replacement value: Set this to the size of the device's built-in top margin,
    # in pixels. This value is subtracted from the adjustable top/bottom margin
    # (if any) to compensate for any unremovable built-in top margin.
    # Suggested values:
    #  24  (Touch/Mini)
    #  32  (Glo/Aura/Aura2ed)
    #  44  (AuraHD/H2O/GloHD/ClaraHD)
    #  56  (AuraOne/Forma)
  - ReplaceInt: {Offset: 0x4A65D2, Find: 1, Replace: 44}



Edit: Two more things to check:
* Check that the book really is an ePub. The adjustable top/bottom margins stopped working for KePubs in firmware version 4.12.12111.
* Check that the book doesn't have an Adobe XPGT stylesheet: If it does then use the Modify Epub plugin in Calibre to remove it.

Mr. Goodbar 06-11-2019 06:19 PM

Feeling really stupid, but I can't seem to get the update to run. New to Kobo, but I've done the following per the instructions:
1. Upgraded to 4.15.12920
2. Downloaded patched version and unzipped
3. Downloaded original 4.15.12920 firmware
4. Copied original 4.15.12920 zip file to SRC folder in unzipped patched version
5. Copied patched folder to root directory of kobo
6. Unmounted

I've read elsewhere that the update should start automatically, but that is not happening.

geek1011 06-11-2019 06:29 PM

Quote:

Originally Posted by Mr. Goodbar (Post 3855463)
Feeling really stupid, but I can't seem to get the update to run. New to Kobo, but I've done the following per the instructions:
1. Upgraded to 4.15.12920
2. Downloaded patched version and unzipped
3. Downloaded original 4.15.12920 firmware
4. Copied original 4.15.12920 zip file to SRC folder in unzipped patched version
5. Copied patched folder to root directory of kobo
6. Unmounted

I've read elsewhere that the update should start automatically, but that is not happening.

Did you put the new KoboRoot.tgz in the .kobo directory?

Mr. Goodbar 06-11-2019 06:48 PM

Quote:

Originally Posted by geek1011 (Post 3855466)
Did you put the new KoboRoot.tgz in the .kobo directory?

Yep, feel even more stupid now. I was reading it as doing that step after the updating. Thanks for the help.

the_Pan 06-21-2019 12:04 PM

Hey guys,
is the kobopatch.yaml "only" used for activating my "standard-patches", or is it also possible to preset values for the patches?
For example the "Custom reading footer style"-patch. I like to have it smaller than the preset, could I preset the smaller value?

geek1011 06-21-2019 01:30 PM

Quote:

Originally Posted by the_Pan (Post 3859239)
Hey guys,
is the kobopatch.yaml "only" used for activating my "standard-patches", or is it also possible to preset values for the patches?
For example the "Custom reading footer style"-patch. I like to have it smaller than the preset, could I preset the smaller value?

Not currently. The current way it is usually done is to copy the patch into another file for just your customizations, add it to the patches map, then override it for that file. This allows you to update by overwriting the old patch files, then updating your customizations separately. I am planning to implement custom values for the patches once I figure out a clean way to do it.

AxaRu 06-23-2019 06:40 AM

Hey guys,
I have Kobo Forma.
What I must do for enable cyrillic keyboard?
Same as Aura One?

the_Pan 06-28-2019 12:15 PM

Quote:

Originally Posted by geek1011 (Post 3859272)
Not currently. The current way it is usually done is to copy the patch into another file for just your customizations, add it to the patches map, then override it for that file. This allows you to update by overwriting the old patch files, then updating your customizations separately. I am planning to implement custom values for the patches once I figure out a clean way to do it.

Okay, thank you for the clarification and keep up your good work! My Kobo is getting even better with your patches! :2thumbsup

mg10 06-30-2019 06:59 PM

What about these patches?
 
Hello
What about these patches?:

- Both page turn sides go next

- Reduce top/bottom page spacer:

BR

geek1011 06-30-2019 07:02 PM

Quote:

Originally Posted by mg10 (Post 3862437)
What about these patches?

Both page turn sides go next: Makes it so you can tap on either side of the screen to go to the next page.
Reduce top/bottom page spacer: Reduces the extra margin on the top/bottom of books which appeared after the official remove title/footer options were added a few versions ago.

mg10 06-30-2019 07:10 PM

Quote:

Originally Posted by geek1011 (Post 3862439)
Both page turn sides go next: Makes it so you can tap on either side of the screen to go to the next page.
Reduce top/bottom page spacer: Reduces the extra margin on the top/bottom of books which appeared after the official remove title/footer options were added a few versions ago.

Sorry!! I downloaded an older version of kobopatch by mistake. It's ok. Thanks.

melmurray 07-04-2019 09:29 AM

Does this patch have an invert / night mode option? I have a visual problem that’s getting worse and need a white text black background. My kobo is a Glo Hd and my computer a Mac. Also I have never tried to do anything like this before so I may be asking for more help. A bit embarrassing but there we are.


All times are GMT -4. The time now is 04:50 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.