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)

Terisa de morgan 07-16-2019 02:20 PM

Quote:

Originally Posted by Phil_C (Post 3867598)
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.

Where do I have to sign to support this? ;)

jackie_w 07-16-2019 07:11 PM

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?

Even though there isn't a patch at the moment you could use frostschutz's MiniClock hack to display time and/or date and/or battery percent anywhere you like on the screen.

You can see an example of MiniClock displaying HH:MM and [battery%] on one of my Kobos in the bottom-right corner of the screenshots in this (completely unrelated) thread. The fact these screenshots happen to be displaying a ToC is irrelevent to MiniClock.

poczynek 07-16-2019 08:11 PM

Quote:

Originally Posted by jackie_w (Post 3867709)
Even though there isn't a patch at the moment you could use frostschutz's MiniClock hack to display time and/or date and/or battery percent anywhere you like on the screen.

You can see an example of MiniClock displaying HH:MM and [battery%] on one of my Kobos in the bottom-right corner of the screenshots in this (completely unrelated) thread. The fact these screenshots happen to be displaying a ToC is irrelevent to MiniClock.

Oh you are an absolute legend! Ok just trying this - any chance you can copy your config file to here? I really like your settings and where you have put it with the font etc.

Also, when i have installed it, it then only worked on the first page of the book and then didn't show after that??

Thanks again.

EDIT

Bummer - i have a forma and realised it won't work for page turn buttons :(

jackie_w 07-17-2019 11:07 AM

Quote:

Originally Posted by poczynek (Post 3867731)
Oh you are an absolute legend! Ok just trying this - any chance you can copy your config file to here? I really like your settings and where you have put it with the font etc.

Bummer - i have a forma and realised it won't work for page turn buttons

I'm not sure whether you still need my MiniClock config file but I'll send you a PM as it isn't really relevant to kobopatch.

I also wish it worked using the Forma's buttons rather than just via screen touch. We live in hope! :)

Phil_C 07-17-2019 12:44 PM

Quote:

Originally Posted by Terisa de morgan (Post 3867635)
Where do I have to sign to support this? ;)

Right here. :)

jackie_w 07-17-2019 04:10 PM

Quote:

Originally Posted by jackie_w (Post 3867920)
I also wish it worked using the Forma's buttons rather than just via screen touch. We live in hope! :)

Update: :2thumbsup today's new version of MiniClock now works with Forma buttons.

geek1011 07-17-2019 07:11 PM

I've released patches v51. This version doesn't come with any new patches, but it updates kobopatch to v0.14.0.

Quote:

Originally Posted by geek1011 (Post 3868074)
kobopatch v0.14.0 is out

kobopatch v0.14.0 mainly consists of a complete rewrite of the kobopatch patch file parsing. It is completely backwards-compatible.

This version will be included in patches v51 later tonight.

Main changes:
- Better error messages:
--- All error messages will include line numbers.
--- Length mismatches show the number of characters.
--- Patches will be applied in a consistent order to make errors easier to fix.
--- All instructions will add their name to error messages.
--- Error checking will be done in stages and will give an error as soon as possible during parsing.
--- Multiple patches in a PatchGroup will mention the other patch.
--- Kobopatch will check for tabs instead of spaces in patch files.
--- Fixed the bug where a whole bunch of hexadecimal gets show on-screen in some cases where a value replacement fails.
- You can now use more than one PatchGroup per patch.
- Checksums of patched files are now recorded in the log file.

Internal changes:
- I've gotten rid of a bunch of old cruft from the transition period.
- I've switched the builds from Travis to Drone (it's faster and more structured).
- I've slightly reduced binary sizes.
- kobopatch is now automatically tested with the patches during builds.
- The patch file logic is now nicely split up instead of being dumped into a big switch statement.
- To add new instructions, you now only need to add 3 lines of code (before you'd have needed to add around 15 scattered everywhere).
- The parsing is a lot more type-safe now.
- I've updated go-yaml to v3, which is what allowed me to do most of the improvements in this rewrite.

For those interested in the internal improvements, compare the instruction implementation(old, new), the validation implementation (old, new), and some of the parsing (old, new).

Error message examples:
old: error applying patch file 'src/libnickel.so.1.0.0.yaml': could not find bytes
new: patch "Freedom to advanced fonts control": line 399: inst 8: ReplaceBytesNOP: could not find bytes

old: i16: replacement string must not be shorter in `Custom reading footer style
new: patch "Custom reading footer style": line 107: inst 16: ReplaceString: replacement string 2 chars too long

old: error applying patch file 'src/libnickel.so.1.0.0.yaml': ReplaceInt: could not find specified bytes at offset ***a bunch of hex which fills your screen ***
new: patch "Custom Sleep/Power-off timeouts": line 512: inst 22: ReplaceInt: could not find specified bytes at offset

old: i21: more than one instruction per bullet in patch `Custom Sleep/Power-off timeouts` (you might be missing a -)
new: instruction 21: line 511: multiple types found in instruction, maybe you forgot a '-'

old: could not parse patch file: error parsing patch file: yaml: line 512: found character that cannot start any token
new: could not parse patch file: patch file contains tabs (it should be indented with spaces, not tabs): yaml: line 512


Terisa de morgan 07-18-2019 01:06 AM

Quote:

Originally Posted by Phil_C (Post 3867967)
Right here. :)

Ditto.

kobayashi 07-19-2019 06:55 PM

Anyone else not able to get the patcher to work at all? I just get a dos box that's on the screen for a split second and then nothing.

All other firmwares and patchers have always worked perfectly.

geek1011 07-19-2019 07:09 PM

Quote:

Originally Posted by kobayashi (Post 3868975)
Anyone else not able to get the patcher to work at all? I just get a dos box that's on the screen for a split second and then nothing.

All other firmwares and patchers have always worked perfectly.

If you downloaded it earlier last night, there was a small bug in the configuration file. Make sure there is a line "patchFormat: kobopatch` in kobopatch.yaml. If that's all correct, can I see the log file?

kobayashi 07-19-2019 07:16 PM

Quote:

Originally Posted by geek1011 (Post 3868983)
If you downloaded it earlier last night, there was a small bug in the configuration file. Make sure there is a line "patchFormat: kobopatch` in kobopatch.yaml. If that's all correct, can I see the log file?

Downloaded about 30min ago. Here's the log contents:

kobopatch cfae583
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'

geek1011 07-19-2019 07:18 PM

Quote:

Originally Posted by kobayashi (Post 3868987)
Downloaded about 30min ago. Here's the log contents:

Did you remember to download the firmware file? Also, next time, put the log in a spoiler so it isn't so long.

kobayashi 07-19-2019 07:19 PM

Firmware is sitting in the src folder in zip format and my kobo has been updated.

Sorry, not sure what a spoiler is.

geek1011 07-19-2019 07:24 PM

I just tested the patches in my Windows VM and it works fine for me. Can you run it from a CMD window and tell me if there are any errors there?

Spoiler:
And a spoiler tag is [ SPOILER ] and [/ SPOILER].

kobayashi 07-19-2019 07:30 PM

Thanks for the spoiler tip.

Spoiler:


kobopatch cfae583
https://github.com/geek1011/kobopatch

Loading configuration from kobopatch.yaml
Reading input firmware zip
panic: Failed to find GetFileInformationByHandleEx procedure in kernel32.dll: Th
e specified procedure could not be found.

goroutine 1 [running]:
syscall.(*LazyProc).mustFind(0x110338e0)
/usr/local/go/src/syscall/dll_windows.go:311 +0x42
syscall.(*LazyProc).Addr(0x110338e0, 0x788140)
/usr/local/go/src/syscall/dll_windows.go:318 +0x21
internal/syscall/windows.GetFileInformationByHandleEx(0x770, 0x9, 0x11057af8, 0x
8, 0x3, 0x11018048)
/usr/local/go/src/internal/syscall/windows/zsyscall_windows.go:385 +0x27

os.newFileStatFromGetFileInformationByHandle(0x110 10760, 0x1e, 0x770, 0x0, 0x110
10760, 0x1e)
/usr/local/go/src/os/types_windows.go:52 +0x135
os.(*File).Stat(0x11006b88, 0x1e, 0x0, 0x0, 0x11006b88)
/usr/local/go/src/os/stat_windows.go:55 +0x133
archive/zip.OpenReader(0x11010760, 0x1e, 0x11006b80, 0x1, 0x1)
/usr/local/go/src/archive/zip/reader.go:55 +0x5e
main.(*KoboPatch).openIn(0x11034d40, 0x19, 0x0, 0x0, 0x0)
/drone/src/kobopatch/kobopatch.go:734 +0x613
main.(*KoboPatch).ApplyPatches(0x11034d40, 0x0, 0x0)
/drone/src/kobopatch/kobopatch.go:325 +0x54
main.main()
/drone/src/kobopatch/kobopatch.go:159 +0x843


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.