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)

Carmelocotonto 07-05-2019 07:42 AM

Hi, please, where can I find the explanation to the development options?. Some of them I understand, but others not:

Show widget info, disable forced GC16, disable dithering, disable regal...

Thanks

Phil_C 07-10-2019 10:22 PM

Cannot get overrides to work
 
I would like to use the overrides in the kobopatch.yaml file, but I cannot get this to work. Nothing happens when I run the .bat file. No .tgz is generated in the /out folder.

Meanwhile I have successfully used the individual .yaml files in the /src folder to generate a .tgz and have patched my new Kobo Clara HD. That works great.

What am I doing wrong when trying to use the overrides instead?

Spoiler:
Code:

## Works with kobopatch v0.13.0 and later.
## You can update kobopatch by downloading the latest release from https://github.com/geek1011/kobopatch/releases.
version: 4.15.12920
in: src/kobo-update-4.15.12920.zip
out: out/KoboRoot.tgz
log: out/log.txt

patchFormat: kobopatch

patches:
  src/nickel.yaml: usr/local/Kobo/nickel
  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

## You can put lines in the following section to override the enabled state of patches.
## The indentation matters! Each override should be indented by 4 spaces. Add to the
## section below. This section can be copy and pasted into newer patch versions to
## keep your selections.
##
## Example of how it should look:
## overrides:
##  src/nickel.yaml:
##    Custom synopsis/details line spacing: yes
##    Whatever the yaml is called: no
##  src/libadobe.so.yaml:
##    You get the idea: yes
overrides:
  src/nickel.yaml:
    Only Reading and My Books: yes
        Increase the cover size in library: yes
  src/libadobe.so.yaml:
  src/libnickel.so.1.0.0.yaml:
    Never show Kobo Plus, wishlist, and points SmartLinks: yes
        Freedom to advanced fonts control: yes
        ePub uniform font scale: yes
  src/librmsdk.so.1.0.0.yaml:

## TRANSLATIONS ##
# Optional, use only if lrelease is not in PATH and if translations are needed
# lrelease: /path/to/lrelease

# Uncomment the following to add translations (replace lc with the language code)
# translations:
#  src/whatever.ts: usr/local/Kobo/translations/trans_lc.qm

## ADDITIONAL FILES ##
# Uncomment the following to add additional files to the tgz (like init scripts or hyphen dicts)
# The files will be root-owned, and world readable, writable, and executable (0777)
# files:
#  src/whatever.txt: usr/local/Kobo/whatever.txt
#  src/whateverToPutInMultiplePlaces.txt:
#    - usr/local/Kobo/location1.txt
#    - usr/local/Kobo/location2.txt



Any advice appreciated!

Phil_C 07-11-2019 12:06 AM

Well -- I just found the solution. I noticed in my post above that the override lines were indented two extra spaces. This is not what it looked like in Notepad++, so I opened the file in plain old Notepad and the extra spaces were there, too.

After saving the Notepad file, I was able to create the patch for the Kobo.

I thought that Notepad++ was the best way to edit this type of file. Apparently not.

geek1011 07-11-2019 12:07 AM

Quote:

Originally Posted by Phil_C (Post 3865807)
I would like to use the overrides in the kobopatch.yaml file, but I cannot get this to work. Nothing happens when I run the .bat file. No .tgz is generated in the /out folder.

You need to indent using spaces, not tabs. I really should add a more informative message about this.

Phil_C 07-11-2019 12:17 AM

Somewhere in your instructions you did make me aware of proper spacing. The problem was that the spacing looked right in Notepad++ (no tabs used). When I opened the file in regular Notepad, the pertinent lines showed up as tabbed. I have no idea why Notepad++ failed to do this right.

Anyway, I am new to Kobo and loving it. Thank you for the great work you have done, which makes for a much better experience on the Kobo reader.

asettico 07-11-2019 10:42 AM

Quote:

Originally Posted by Phil_C (Post 3865833)
Somewhere in your instructions you did make me aware of proper spacing. The problem was that the spacing looked right in Notepad++ (no tabs used). When I opened the file in regular Notepad, the pertinent lines showed up as tabbed. I have no idea why Notepad++ failed to do this right.

You probably set the tab size in the preferences (languages/tabulations). You can also set "substitute with spaces".

asettico 07-11-2019 10:45 AM

Quote:

Originally Posted by Phil_C (Post 3865829)
I thought that Notepad++ was the best way to edit this type of file. Apparently not.

Notepad++ IS one of the best text editor... ;)

DNSB 07-11-2019 05:03 PM

In Notepad++ , you might want to hit the View menu. Under Show Symbol, select Show White Space and Tab. Perhaps Indent Guide as well. Not sure how much of these are defaults since I've been using Notepad++ for years and no longer remember how much tweaking I did to the interface settings.

Phil_C 07-11-2019 05:27 PM

Yeah, that helps. I really don't write any scripts or code. This is one of those one-time things I wanted to get done.

I see now that when I hit <enter> at the end of an indented line, Notepad++ inserts a tab at the beginning of the next line instead of spaces.

Anyway, problem solved and I am happily tweaking my Kobo. Thanks.

poczynek 07-15-2019 10:42 PM

Having some trouble applying this.

Have only just started using Kobo as i just bought a Kobo Forma and am currently on 4.15.12920.

To clarify:

1. After i have downloaded both firmware and patched firmware, do i place the ZIP of the original firmware into the CRC folder of the patched firmware?
2. Ok so let's say i do place the zip into that folder and then load it all into the .kobo folder - how then do i install it? Do i just eject Kobo and it self-installs?
3. What do you do to 'enable patches'? Do i plug it in again and click on something?

Thanks!

Phil_C 07-15-2019 11:13 PM

Quote:

Originally Posted by poczynek (Post 3867408)
Having some trouble applying this.

Have only just started using Kobo as i just bought a Kobo Forma and am currently on 4.15.12920.

To clarify:

1. After i have downloaded both firmware and patched firmware, do i place the ZIP of the original firmware into the CRC folder of the patched firmware?
2. Ok so let's say i do place the zip into that folder and then load it all into the .kobo folder - how then do i install it? Do i just eject Kobo and it self-installs?
3. What do you do to 'enable patches'? Do i plug it in again and click on something?

Thanks!

-Place the ZIP of the firmware in the SRC folder of the patch.
-Enable your choice of tweaks in the YAML files in SRC (or instead add them to kobopatch.yaml in the root folder of the patch).
-Run the BAT file (if on Windows), which will create the patched firmware TGZ in the OUT folder.
-Connect Kobo Reader to your computer.
-Place the TGZ in the .KOBO folder of the Reader.
-Disconnect the Reader and give it a couple of minutes to reboot itself.
-Done!

DNSB 07-15-2019 11:57 PM

Quote:

Originally Posted by poczynek (Post 3867408)
Having some trouble applying this.

Have only just started using Kobo as i just bought a Kobo Forma and am currently on 4.15.12920.

To clarify:

1. After i have downloaded both firmware and patched firmware, do i place the ZIP of the original firmware into the CRC folder of the patched firmware?
2. Ok so let's say i do place the zip into that folder and then load it all into the .kobo folder - how then do i install it? Do i just eject Kobo and it self-installs?
3. What do you do to 'enable patches'? Do i plug it in again and click on something?

Thanks!

To add to Phil's response, the first step is to unzip the original firmware and copy its contents to the .kobo directory on your ereader. Safely eject and it should go into it's updating screen. While that's in progress, you can continue with generating the patch system's KoboRoot.tgz to have it ready to copy into the .kobo directory on your ereader. The firmware version you are patching must already be installed on your Kobo ereader before you can patch it.

Well, you could extract the patched files from the generated KoboRoot.tgz and inject them into the original firmware file's KoboRoot.tgz. This would allow doing the update/patch in one pass. I tried this once and it worked but really saved no time and involved more manual effort (manual effort is anathema around these parts :D ).

poczynek 07-16-2019 02:24 AM

Ah yes thank you.

Worked out i already have the firmware so just need to patch and all working now.

Out of interest, is there any patch where you can modify the header or footer so it adds in things like the time or battery percentage?

geek1011 07-16-2019 11:08 AM

Quote:

Originally Posted by poczynek (Post 3867451)
Out of interest, is there any patch where you can modify the header or footer so it adds in things like the time or battery percentage?

I've been working intermittently on adding the time, but the biggest issues are: I need to find room to add the : between the numbers (and I'd rather not have to jump around, which will make it harder to update), and it only updates every page turn. I don't see the use of adding the battery percentage though.

Quote:

Well, you could extract the patched files from the generated KoboRoot.tgz and inject them into the original firmware file's KoboRoot.tgz. This would allow doing the update/patch in one pass. I tried this once and it worked but really saved no time and involved more manual effort (manual effort is anathema around these parts ).
Do you think it would be useful to add an option to keep all firmware files? The main reason I didn't at first is I generally test the firmware without patches first, and it does make it take half a minute longer to generate KoboRoot.tgz.

Phil_C 07-16-2019 12:03 PM

Speaking of the footer, I'd really like to see the total number of pages in the book AND the number of pages remaining in the current chapter. Simultaneously. The way the old Sony PRS+ did it.


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.