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 09-02-2025, 04:14 PM   #1
AsherMaximum
Member
AsherMaximum began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2025
Device: Kobo Libra 2
Issues patching 4.38.23429

Has anyone had any luck patching firmware 4.38.23429 with KoboPatch?

I thought the new one would be the same as the old one - just figuring out what BaseAddress and Offset changes are needed.
I got one working - "Customize ComfortLight settings". Decompiled the new source and found the new base address:
Code:
- BaseAddress: 0xE91D74
Moving on to the others though, I get an error from KoboPatch:
Code:
Error: could not apply patch "Don't uppercase header/footer text": 
line 1232: inst 4: ReplaceBytes: expand FindInstBLX=kobopatch.FlexAbsOffset{Offset:(*int32)(nil), 
Sym:(*string)(nil), SymPLT:(*string)(0x11ea5430), SymPLTTail:(*string)(nil), 
Inline:false, Rel:(*int32)(nil)}:
ResolveSymPLT("QString::toUpper() const"): 
get dynsyms: load syms (pltgot: true): 
decode plt: parse .plt: at 0x65F0AC: more than 32 bytes of junk at start of PLT, 
cur ["LDR.GT R0, [R0], -R3, LSL #2" "B.GT PC+0xd78a3c" "BLX PC+0x1c38a30" "ADD R12, PC, #0x10, 12" "ADD R12, R12, #0x35000" "LDR PC, [R12, #2664]!"]
The 'more than 32 bytes of junk at start of PLT' error is from KoboPatch itself. I can't figure out how to fix it. I'm guessing there are drastic changes in this new firmware, but that seems odd since it's just a minor version number.

I get a similar error whenever I enable any patch that uses 'FindInstBLX' with 'SymPLT'. The 'SymPLT' line is the one I'm always seeing the error on, at least on the ones I've checked so far.

Has anyone else had any luck patching this version?

Last edited by AsherMaximum; 09-02-2025 at 04:20 PM.
AsherMaximum is offline   Reply With Quote
Old 09-02-2025, 04:27 PM   #2
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: 80,087
Karma: 148029447
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
It could be just that the offset if moved. That's what happened with some of the patches in the previous firmware.
JSWolf is offline   Reply With Quote
Old 09-02-2025, 04:50 PM   #3
Cactus Chef
Guru
Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.Cactus Chef ought to be getting tired of karma fortunes by now.
 
Cactus Chef's Avatar
 
Posts: 618
Karma: 7527698
Join Date: Apr 2019
Location: East Coast, United States
Device: Kobo Sage, Kobo Clara HD, Galaxy Tab S5e, Kindle 4th Gen
Quote:
Originally Posted by JSWolf View Post
It could be just that the offset if moved. That's what happened with some of the patches in the previous firmware.
Is that usually an intentional change from Kobo to defeat patching? Or is it just a side effect that whatever code they added made the compiler move some stuff around when it compiled?
Cactus Chef is offline   Reply With Quote
Old 09-02-2025, 05:07 PM   #4
Aleron Ives
Wizard
Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.
 
Posts: 1,713
Karma: 16308824
Join Date: Sep 2022
Device: Kobo Libra 2
It's the latter. Every time Kobo makes a change that adds or removes code, the compiled library is going to be a different size with different offsets for many functions.
Aleron Ives is offline   Reply With Quote
Old 09-02-2025, 05:47 PM   #5
AsherMaximum
Member
AsherMaximum began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2025
Device: Kobo Libra 2
This one is not an offset change, I looked up the function in both the old and the new firmware (4.38.23171 & 4.38.23429), and the offset for the changed line is the same.

In 4.38.23171, the "ReadingView::getChapterTitle()" function starts at 00f48ca8, and the line to be replaced ("QString::toUpper() const") starts at 00f48dd2, for an offset of 298

In 4.38.23429 the "ReadingView::getChapterTitle()" function starts at 00f50b98, and the line to be replaced starts at 00f50cc2, for the same offset of 298. There's no changes to the getChapterTitle() function.

Something about the SymPLT is what is failing I believe - I haven't got any of the ones with that replacement method to work.
AsherMaximum is offline   Reply With Quote
Old 09-02-2025, 05:53 PM   #6
AsherMaximum
Member
AsherMaximum began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2025
Device: Kobo Libra 2
Also, based on the error message KoboPatch is throwing, it sounds like it is having trouble parsing the PLT, and is exiting out due to that:

Code:
decode plt: parse .plt: at 0x65F0AC: more than 32 bytes of junk at start of PLT
AsherMaximum is offline   Reply With Quote
Old 09-02-2025, 07:41 PM   #7
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,254
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by AsherMaximum View Post
Something about the SymPLT is what is failing I believe - I haven't got any of the ones with that replacement method to work.
Perhaps you have identified the basic problem as the FindInstBLX/SymPLT combo.

I have successfully installed v4.38.23429 on both an AuraOne and a Clara2E. The only libnickel.so.1.0.0.yaml patches I use which didn't work all contain FindInstBLX/SymPLT:
  • My 24 line spacing values (or My 10 line spacing values)
  • Unify font sizes
  • Only show stats SmartLink
  • Don't uppercase header/footer text and change page number text


However, here's an extra piece of information. I also successfully installed v4.43.23418 on a LibraColour. The above patches all worked OK as-is, except for My 24 line spacing values which has never worked on any of the firmware versions for the LibraColour (4.39.x, 4.4x.x). Fortunately, patch My 10 line spacing values has always worked on all of these firmwares.

So it seems that whatever problem exists with the FindInstBLX/SymPLT combo it's only a problem in v4.38.23429.


All my nickel.yaml patches work as-is.
These 2 need new offsets, but that's always been true for every fw upgrade:
  • Increase size of kepub chapter progress chart
  • Remove forgot pin button from lock screen

Last edited by jackie_w; 09-02-2025 at 07:44 PM.
jackie_w is offline   Reply With Quote
Old Yesterday, 03:43 AM   #8
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: 80,087
Karma: 148029447
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
These are the patches I use that don't work as is. I hope it's just a matter of needing a new offset. There could be other patches that do not work. But from my long list of patches, these are the ones that do not work.

The patches in bold are the ones I really would like to get working. Thanks to anyone who can help.

ibnickel.so.1.0.0.yaml
Allow rotation on all devices
Don't uppercase header/footer text and change page number text
FeatureSettings - BookSpecificStats
FeatureSettings - ShowFacebookShare
My 24 line spacing values
My 10 line spacing values
Replace adobe page numbers toggle with invert screen
Set KePub hyphenation
Unify font sizes

librmsdk.so.1.0.0.yaml
Increase size of kepub chapter progress chart
JSWolf is offline   Reply With Quote
Old Yesterday, 07:31 AM   #9
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,254
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
@JSWolf, re: fw 4.38.23429 patches

libnickel.so.1.0.0.yaml

FeatureSettings - BookSpecificStats
I've never used this patch but the following works if you manually edit the Kobo conf file.
Code:
[FeatureSettings]
BookSpecificStats=true
FeatureSettings - ShowFacebookShare
I've never used Facebook, but maybe it has a similar workaround to the one above.

Allow rotation on all devices
Once again, a manual edit of the Kobo conf file works on my Clara2E.
Code:
[DeveloperSettings]
ForceAllowLandscape=true

I can't help with the next 4 as they're also in my 'not working' list. It may be the presence of the FindInstBLX/SymPLT combo as raised earlier by @AsherMaximum
  • My 24 line spacing values
  • My 10 line spacing values
  • Unify font sizes
  • Don't uppercase header/footer text and change page number text

I don't use them but these 2 also use the FindInstBLX/SymPLT combo.
  • Set KePub hyphenation
  • Replace adobe page numbers toggle with invert screen
I thought recommended advice for InvertScreen has, for a long time, been to do it via the NickelMenu option rather than this patch. That's what I've been doing for ages.



nickel.yaml (i.e. not librmsdk.so.1.0.0.yaml as per your post)

Increase size of kepub chapter progress chart
Try this hex location:
Code:
  - BaseAddress: 0x19A1644 # qss/ReadingMenuStatsView.qss

Last edited by jackie_w; Yesterday at 07:34 AM.
jackie_w is offline   Reply With Quote
Old Yesterday, 11:49 AM   #10
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: 80,087
Karma: 148029447
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 jackie_w View Post
@JSWolf, re: fw 4.38.23429 patches

libnickel.so.1.0.0.yaml

FeatureSettings - BookSpecificStats
I've never used this patch but the following works if you manually edit the Kobo conf file.
Code:
[FeatureSettings]
BookSpecificStats=true
FeatureSettings - ShowFacebookShare
I've never used Facebook, but maybe it has a similar workaround to the one above.

Allow rotation on all devices
Once again, a manual edit of the Kobo conf file works on my Clara2E.
Code:
[DeveloperSettings]
ForceAllowLandscape=true

I can't help with the next 4 as they're also in my 'not working' list. It may be the presence of the FindInstBLX/SymPLT combo as raised earlier by @AsherMaximum
  • My 24 line spacing values
  • My 10 line spacing values
  • Unify font sizes
  • Don't uppercase header/footer text and change page number text

I don't use them but these 2 also use the FindInstBLX/SymPLT combo.
  • Set KePub hyphenation
  • Replace adobe page numbers toggle with invert screen
I thought recommended advice for InvertScreen has, for a long time, been to do it via the NickelMenu option rather than this patch. That's what I've been doing for ages.

Thanks for the help on the settings to replace some of the patches.

nickel.yaml (i.e. not librmsdk.so.1.0.0.yaml as per your post)

Increase size of kepub chapter progress chart
Try this hex location:
Code:
  - BaseAddress: 0x19A1644 # qss/ReadingMenuStatsView.qss
Of these patches then ones I really hope can be made to work are the unify font sizes and either the 24 line or 10 line spacing values.
  • My 24 line spacing values
  • My 10 line spacing values
  • Unify font sizes
  • Don't uppercase header/footer text and change page number text

I'll try the KePub progress chart new offset and see if it works. Thank you.
JSWolf is offline   Reply With Quote
Old Yesterday, 05:26 PM   #11
Aleron Ives
Wizard
Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.
 
Posts: 1,713
Karma: 16308824
Join Date: Sep 2022
Device: Kobo Libra 2
IIRC pgaskin said somewhere on the kobopatch GitHub that "My 24 line spacing values" would need to be rewritten, since it's a complex assembly mod that replaces the entire line spacing function, and the old patch doesn't work with current firmware. "My 10 line spacing values" would probably be easier to port, since it disables most of the code and uses a static table of 10 floats, instead.
Aleron Ives is offline   Reply With Quote
Old Today, 04:28 AM   #12
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: 80,087
Karma: 148029447
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 Aleron Ives View Post
IIRC pgaskin said somewhere on the kobopatch GitHub that "My 24 line spacing values" would need to be rewritten, since it's a complex assembly mod that replaces the entire line spacing function, and the old patch doesn't work with current firmware. "My 10 line spacing values" would probably be easier to port, since it disables most of the code and uses a static table of 10 floats, instead.
I'd be fine with either patch being fixed to work. I hope it's not too much hassle for either.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New F/W: 4.43.23418 + 4.38.23429 PeterT Kobo Reader 85 09-02-2025 08:34 AM
Instructions for patching firmware 3.18.0 GeoffR Kobo Developer's Corner 151 10-21-2016 06:15 AM
Patching H2O Maillemom Kobo Developer's Corner 8 10-19-2016 09:58 AM
Patching firmware 4.0.7523 JSWolf Kobo Developer's Corner 97 09-30-2016 01:09 PM
Instructions for patching firmware 3.2.0 DNSB Kobo Developer's Corner 66 12-05-2014 07:28 AM


All times are GMT -4. The time now is 10:08 AM.


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