Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-11-2018, 04:51 PM   #106
Alanon
Connoisseur
Alanon is clearly one to watchAlanon is clearly one to watchAlanon is clearly one to watchAlanon is clearly one to watchAlanon is clearly one to watchAlanon is clearly one to watchAlanon is clearly one to watchAlanon is clearly one to watchAlanon is clearly one to watchAlanon is clearly one to watchAlanon is clearly one to watch
 
Alanon's Avatar
 
Posts: 76
Karma: 10742
Join Date: Jul 2017
Location: Serbia
Device: Kobo Aura One
I've been playing around with this new system, and I can really see how it will make things a lot easier moving forward. The instructions were just as easy to follow as the previous method, if not easier, and the major benefit is that you only really need to configure the overrides once and have an almost automatic process. I only have two remarks that might make things a bit easier in the long run.

First, could you make an exception to continue compiling the patches even if an override entry is not found? This would make sense if someone really wanted to patch their new firmware and didn't want to wait for, say the beta games patch to be adapted. Of course, this is practically useless if you intend to wait until all the patches are adapted before releasing a new version, but if the patch release process will be in stages, I think it makes sense?

The second point is really just food for thought. While configuring everything, I caught myself having forgotten to alter the recommended value for my Aura One in the "ePub fixed/adjustable top/bottom margins" patch. In fact, this often happened in the old patching regiment and had to redo the process. I haven't really looked at other patches to see if they have different recommended values for different models, but I can't help but wonder if there's a way to automate this process for all "configurable" patches? Perhaps by adding an entry in the kobopatch.yaml to serve as a device/model identifier?

Anyway, great job!
Alanon is offline   Reply With Quote
Old 07-11-2018, 05:28 PM   #107
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,737
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by Alanon View Post
I've been playing around with this new system, and I can really see how it will make things a lot easier moving forward.
Thanks!

Quote:
Originally Posted by Alanon View Post
First, could you make an exception to continue compiling the patches even if an override entry is not found? This would make sense if someone really wanted to patch their new firmware and didn't want to wait for, say the beta games patch to be adapted. Of course, this is practically useless if you intend to wait until all the patches are adapted before releasing a new version, but if the patch release process will be in stages, I think it makes sense?
That is why I say to comment out broken patches. Because of the fast release/update cycle, patches can be updated at any time.

Quote:
Originally Posted by Alanon View Post
The second point is really just food for thought. While configuring everything, I caught myself having forgotten to alter the recommended value for my Aura One in the "ePub fixed/adjustable top/bottom margins" patch. In fact, this often happened in the old patching regiment and had to redo the process. I haven't really looked at other patches to see if they have different recommended values for different models, but I can't help but wonder if there's a way to automate this process for all "configurable" patches? Perhaps by adding an entry in the kobopatch.yaml to serve as a device/model identifier?
I've been thinking that too ... I might be able to add a device specific option to the instructions, but that would come in a later version. I will think about this a bit more later.

Thanks for the feedback!
geek1011 is offline   Reply With Quote
Advert
Old 07-12-2018, 08:04 AM   #108
oren64
I need a chapter break
oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.
 
oren64's Avatar
 
Posts: 4,042
Karma: 56058267
Join Date: Mar 2015
Location: Israel
Device: Kobo Glo
Nice work again

In the zlib patches douse it compress the code with null at the end like in pipcat method?

Last edited by oren64; 07-12-2018 at 08:29 AM.
oren64 is offline   Reply With Quote
Old 07-12-2018, 08:55 AM   #109
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,737
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by oren64 View Post
Nice work again

In the zlib patches douse it compress the code with null at the end like in pipcat method?
No. That's only needed for normal strings (which are null terminated), as zlib streams have a trailer which marks the end consisting of an adler32 checksum of the data (see https://www.ietf.org/rfc/rfc1950.txt). I have tested this specifically to confirm.

And for updating your patches which come with kobopatch, you can either use GitHub, reply to this thread, or send me a PM.
geek1011 is offline   Reply With Quote
Old 07-12-2018, 12:38 PM   #110
npr
Zealot
npr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five words
 
Posts: 102
Karma: 37418
Join Date: Jan 2013
Device: Kobo Glo, Aura, H2OE2, Libra 2
A couple of small problems I've had with this patch:

1) Patch --- Custom reading footer style
The penultimate line:

#ReplaceString: {Offset: 00FA, Find: "margin-top:+00px", Replace: "margin-top:-10px"}

Should be Offset: 250

2) In kobopatch.yaml

# files:
# src/whatever.txt: usr/local/Kobo/whatever.txt

No space is allowed before "files:"
npr is offline   Reply With Quote
Advert
Old 07-12-2018, 02:08 PM   #111
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,737
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by npr View Post
A couple of small problems I've had with this patch:

1) Patch --- Custom reading footer style
The penultimate line:

#ReplaceString: {Offset: 00FA, Find: "margin-top:+00px", Replace: "margin-top:-10px"}

Should be Offset: 250

2) In kobopatch.yaml

# files:
# src/whatever.txt: usr/local/Kobo/whatever.txt

No space is allowed before "files:"
1. You can also add a 0x before the hex value.
2. You need to uncomment and remove the space.
geek1011 is offline   Reply With Quote
Old 07-12-2018, 02:43 PM   #112
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@geek1011: In the nickel patches, I'm guessing "Remove recommendations (row1col2) from home screen" should be part of the "Home screen tweaks" group, because it breaks the match against "#row1col2" that "Remove footer (row3) and increase cover size on new home screen" & "Remove footer (row3) on new home screen" rely on .
NiLuJe is offline   Reply With Quote
Old 07-12-2018, 05:49 PM   #113
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,737
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by NiLuJe View Post
@geek1011: In the nickel patches, I'm guessing "Remove recommendations (row1col2) from home screen" should be part of the "Home screen tweaks" group, because it breaks the match against "#row1col2" that "Remove footer (row3) and increase cover size on new home screen" & "Remove footer (row3) on new home screen" rely on .
Thanks! I've modified the patches to make them both work at the same time.
geek1011 is offline   Reply With Quote
Old 07-12-2018, 08:00 PM   #114
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
FWIW, automation is a go .

(That's highly unportable and pretty specific to my own setup, but, hey, if it can give someone else ideas... ).

Which leads me to a minor question, @geek1011:

Can I forgo commenting the default blank overrides: in the config and just append mine at the bottom of the file? (I won't ask you to make it commented out by default, because I know how confusing that might be to some users, as #110 just proved ).

Last edited by NiLuJe; 07-12-2018 at 08:02 PM.
NiLuJe is offline   Reply With Quote
Old 07-12-2018, 11:51 PM   #115
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,238
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I,ve got the four overriden uncommented and only two with active patches. Is that what you need? And the problem in the message wasn't the comment but the format deppending on exact indentation
Terisa de morgan is offline   Reply With Quote
Old 07-13-2018, 11:53 AM   #116
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,737
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by NiLuJe View Post
FWIW, automation is a go .

(That's highly unportable and pretty specific to my own setup, but, hey, if it can give someone else ideas... ).
Looks good!


Quote:
Originally Posted by NiLuJe View Post
Can I forgo commenting the default blank overrides: in the config and just append mine at the bottom of the file? (I won't ask you to make it commented out by default, because I know how confusing that might be to some users, as #110 just proved ).
No, I enabled strict parsing (to make it easier for users to spot errors), so that won't work.
geek1011 is offline   Reply With Quote
Old 07-13-2018, 01:52 PM   #117
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,062
Karma: 129333562
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
If we change some of the values in the patches, will the new patch system remember this? If not, can it be written to remember?
JSWolf is offline   Reply With Quote
Old 07-13-2018, 06:18 PM   #118
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,737
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by JSWolf View Post
If we change some of the values in the patches, will the new patch system remember this? If not, can it be written to remember?
No, it won't. It could be made to, but for simplicity, I suggest making a copy of the patch into an additional patch file, as described in the tips and tricks at the start of this thread. If there is enough demand, I might make it.
geek1011 is offline   Reply With Quote
Old 07-13-2018, 06:47 PM   #119
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,062
Karma: 129333562
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by geek1011 View Post
No, it won't. It could be made to, but for simplicity, I suggest making a copy of the patch into an additional patch file, as described in the tips and tricks at the start of this thread. If there is enough demand, I might make it.
It would be a useful feature. And isn't the idea with the new patching system to make things easier?
JSWolf is offline   Reply With Quote
Old 07-13-2018, 07:00 PM   #120
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,737
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by JSWolf View Post
It would be a useful feature. And isn't the idea with the new patching system to make things easier?
Yep, but both in the code, maintenance, and usage. Currently, kobopatch is only 130% the LOC compared to patch32lsb (including tests, which makes it easier to code), yet it has more features. It already has features to make maintenance easier (FindZlib, FindZlibHash, ReplaceZlib, FindReplaceString, ResetBaseAddress, automated patch testing, etc). It has features to make usage easier (multiple patch files for single binary, add arbitrary files to KoboRoot, compiling and adding translations, store patch enabled state in config file). I'm trying to balance the ease of use with the ease of maintenance and code.

If I can figure out an easy and elegant way to store changes to variables in patches, I'll implement it.
geek1011 is offline   Reply With Quote
Reply

Tags
kobo, kobopatch, patch, patch32lsb


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
kobopatch - A new (WIP) patching system geek1011 Kobo Developer's Corner 93 05-27-2018 03:04 PM
Patching H2O Maillemom Kobo Developer's Corner 8 10-19-2016 09:58 AM
Instructions for patching firmware 3.17.3 GeoffR Kobo Developer's Corner 60 09-17-2015 05:35 PM
Instructions for patching firmware 3.8.0 GeoffR Kobo Developer's Corner 92 10-22-2014 07:22 AM
how to clean more disk space in root file system to upgrade system chinaet iRex 1 12-18-2006 03:54 PM


All times are GMT -4. The time now is 11:46 PM.


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