Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patches for 5.0.175773 #130

Open
pgaskin opened this issue May 8, 2024 · 8 comments
Open

Patches for 5.0.175773 #130

pgaskin opened this issue May 8, 2024 · 8 comments
Labels
firmware release Category: Updating patches for a new release.

Comments

@pgaskin
Copy link
Owner

pgaskin commented May 8, 2024

This one might be tolino-specific, or future Kobo releases may also be 5.x.

TODO

@pgaskin pgaskin added the firmware release Category: Updating patches for a new release. label May 8, 2024
@pgaskin
Copy link
Owner Author

pgaskin commented May 8, 2024

This one is much more complex since:

  • Dev mode telnet is gone.
  • Updates might be served from somewhere else (it may just be for tolinos though... time will tell)?
  • KoboRoot.tgz might not work (MR:post-4421911)?
  • Due to the above, we don't have the files for it yet.

I don't have a tolino, so I can't really experiment much with this directly right now.

@pgaskin pgaskin changed the title Patches for 5.0.175773 Patches for 5.0.175773 (tolino) May 8, 2024
@pgaskin
Copy link
Owner Author

pgaskin commented May 8, 2024

Okay, so I've managed to get ahold of the firmware files... the API checks that the original version is >5.0.111111.

https://ereaderfiles.kobo.com/firmwares/kobo12/May2024/tolino-qt6-recovery-5.0.175773.zip

Also note that Tolino serial numbers start with T rather than N, but that's irrelevant.

I'll need to update kfwproxy to track the 5.x updates separately.

@pgaskin
Copy link
Owner Author

pgaskin commented May 8, 2024

Some random preliminary notes:

  • For other people reading this, don't play with this update package if you don't know what you're doing... you don't want to mess up bl2 (or even uboot at this point, since we don't know how to recover it).
  • Qt6? "legacy qt5"?
  • Recovery mechanism is completely different.
  • Update package seems to resemble what I remember of the old tolino format, will need to look into this more.
  • Is this being served for kobo11?
  • rootfs is zstd-compressed in the zstd-compressed recoveryfs.
  • rootfs/recoveryfs is 1 GiB each.
  • Should take a look at bl2 and uboot later for potential recovery, ram-boot, and netboot stuff.
  • There's finally a /usr/libexec/platform/nickel-env.sh with everything required to start nickel...
  • Now uses modern chromium... makes me wonder if they'll port it to the older devices or not...
  • Still using common 32-bit ARM EABI5 nickel binaries.
  • They're now shipping python...
  • Still /mnt/onboard.
  • They're now shipping a modernish kernel... if they do end up porting it to other devices, it'll make it nicer to do stuff like dual-boot mods and so on.
  • Kobo serial numbers are ^SN-[TN][0-9]{4}[1-9A-C][0-9]{7},[0-9a-f]{32}$, T for tolino, N for Kobo.
  • OTA updates are loaded from /mnt/onboard/.kobo/update.tar (generic update package powered by an update script, seems inspired by the android ota updater-script mechanism) and /mnt/onboard/.kobo/Kobo.tgz (same as before -- extracted into /usr/local/Kobo).
  • Overall boot process seems much more polished than the old one.
  • Now it's clear what Kobo's been working on over the last year, and why the tolino stuff in 4.39 seemed half-baked... lol
  • nickel-hardware-status fifo stuff is mostly the same.
  • There's a /usr/local/Kobo/branch file containing release/v5.0.0. Does this mean they'll maintain the v4 firmware for some devices? (I'll probably modify kfwproxy and my firmware page to keep track of latest versions grouped by the first version component)
  • All variants of the pickel binaries no longer check for KoboRoot.tgz... this implies that all devices on v5 will use the new update mechanism
  • /usr/local/Kobo/memorylogger columns are DateTime,Timestamp, Device memory, Nickel memory, Peak virtual memory,Current virtual memory,Peak physical memory,Current physical memory,None file physical memory,File mapped physical memory,Data virtual memory,Stack virtual memory,Exe virtual memory,Library virtual memory
  • They seem to have dropped support for some of the lesser-used ebook formats like zim (wikipedia dumps), possibly also mobipocket, cb(z). Need to look at nickel to confirm.
  • Some interesting paths: .kobo/SOFT_RESET, .kobo/logs/log/umounterr.log, .kobo/sickel_frozen, .kobo/db_integrity.log.
  • Now using an updated ct-ng 8.5.0 gcc 11.3.0 toolchain... I'll need to update kobopatch to deal with some of the new optimizations (e.g., while parsing the plt) as a result of this... might also need to implement extending/adding elf sections to have room for the bigger patches.
  • libnickel symbol diff from 22861: https://gist.github.com/pgaskin/3d74c11fa44a954da18de38fd4e18dc1
  • there's rust (rustc 1.77.2) in libnickel... if it's used for core nickel functionality, it'll make kobopatch stuff slightly more painful to work with... at a glance it seems like it's mostly being used for stuff where the existing cpp libraries suck
  • KoboReader.db schema: https://gist.github.com/pgaskin/8e06142892a8b8d7e7d693010aef3ee9
  • did they rework dictionaries again? will need to take a closer look at libnickel... edit: no, marisa is just compiled better
  • chrome devtools protocol support is a dev option!

@pgaskin pgaskin changed the title Patches for 5.0.175773 (tolino) Patches for 5.0.175773 May 8, 2024
@benhaotang
Copy link

benhaotang commented May 8, 2024

from the tolino shine color that I just bought yesterday(it just launched yesterday in Germany), this is the 0-day update that I got when setting up the device. In the webbrowser the UA determine itself as qt 6.5.5

@pgaskin
Copy link
Owner Author

pgaskin commented May 8, 2024

They added the tolino equivalents of the Clara HD and Forma.

codename family id name
loki dragon 00000000-0000-0000-0000-000000000676 tolino Shine 3
freya dragon 00000000-0000-0000-0000-000000000677 tolino Epos 2

@NiLuJe
Copy link
Collaborator

NiLuJe commented May 8, 2024

  • They're now shipping a modernish kernel... if they do end up porting it to other devices, it'll make it nicer to do stuff like dual-boot mods and so on.

That's just the MTK kernel, it's the exact same build as found on 4.39 for those devices. (And the same base branch as used by other MTK implementations, e.g., lab126).

@pgaskin
Copy link
Owner Author

pgaskin commented May 9, 2024

Wrote a tool to extract the basic device info from the firmware: pgaskin/koboutils@cea683a

ID Codename Family Name
00000000-0000-0000-0000-000000000310 trilogy trilogy Kobo Touch
00000000-0000-0000-0000-000000000320 trilogy trilogy Kobo Touch
00000000-0000-0000-0000-000000000330 kraken phoenix Kobo Glo
00000000-0000-0000-0000-000000000340 pixie trilogy Kobo Mini
00000000-0000-0000-0000-000000000350 dragon dragon Kobo Aura HD
00000000-0000-0000-0000-000000000360 phoenix phoenix Kobo Aura
00000000-0000-0000-0000-000000000370 dahlia dragon Kobo Aura H2O
00000000-0000-0000-0000-000000000371 alyssum dragon Kobo Glo HD
00000000-0000-0000-0000-000000000372 pika trilogy Kobo Touch 2.0
00000000-0000-0000-0000-000000000373 daylight daylight Kobo Aura ONE
00000000-0000-0000-0000-000000000374 snow dragon Kobo Aura H2O Edition 2
00000000-0000-0000-0000-000000000375 star phoenix Kobo Aura
00000000-0000-0000-0000-000000000376 nova dragon Kobo Clara HD
00000000-0000-0000-0000-000000000377 frost daylight Kobo Forma
00000000-0000-0000-0000-000000000378 snow dragon Kobo Aura H2O Edition 2
00000000-0000-0000-0000-000000000379 star phoenix Kobo Aura
00000000-0000-0000-0000-000000000380 frost daylight Kobo Forma
00000000-0000-0000-0000-000000000381 daylight daylight Kobo Aura ONE
00000000-0000-0000-0000-000000000382 luna phoenix Kobo Nia
00000000-0000-0000-0000-000000000383 cadmus daylight Kobo Sage
00000000-0000-0000-0000-000000000384 storm dragon Kobo Libra H2O
00000000-0000-0000-0000-000000000386 goldfinch dragon Kobo Clara 2E
00000000-0000-0000-0000-000000000387 europa dragon Kobo Elipsa
00000000-0000-0000-0000-000000000388 io dragon Kobo Libra 2
00000000-0000-0000-0000-000000000389 condor dragon Kobo Elipsa 2E
00000000-0000-0000-0000-000000000676 loki dragon tolino Shine 3
00000000-0000-0000-0000-000000000677 freya daylight tolino Epos 2
00000000-0000-0000-0000-000000000390 monzaKobo dragon Kobo Libra Colour
00000000-0000-0000-0000-000000000690 monzaTolino dragon tolino vision color
00000000-0000-0000-0000-000000000391 spaKoboBW dragon Kobo Clara BW
00000000-0000-0000-0000-000000000393 spaKoboColour dragon Kobo Clara Colour
00000000-0000-0000-0000-000000000691 spaTolinoBW dragon tolino shine 5
00000000-0000-0000-0000-000000000693 spaTolinoColour dragon tolino shine color

@pgaskin
Copy link
Owner Author

pgaskin commented May 9, 2024

Also wrote a tool to extract firmware version info from the current kinds of update packages: pgaskin/koboutils@633a819

$ kobo-fwinfo kobo6-update-4.22.15190.zip kobo11-update-* tolino-qt6-recovery-5.0.175773.zip
kobo6-update-4.22.15190.zip: KoboRoot.tgz package { version=4.22.15190 date=2020-06-22 revision=efcb227b40228eba2d7cd9565e892f19332faf16 }
kobo11-update-4.36.21095.zip: KoboRoot.tgz package { version=4.36.21095 date=2023-04-14 revision=c59487fff360719e3b65b3171e88cadf7e77b9de }
kobo11-update-4.38.21908.zip: KoboRoot.tgz package { version=4.38.21908 date=2023-08-22 revision=fac580f37d610f9f83589746b785a7650532b3cf }
kobo11-update-4.39.22801.zip: KoboRoot.tgz package { version=4.39.22801 date=2024-04-02 revision=8099118e783964c8b8959136e505ee8202d8a4dc }
kobo11-update-4.39.22861.zip: KoboRoot.tgz package { version=4.39.22861 date=2024-04-24 revision=8c51b352bd251a102a10deb46c9e0c7eb5192f16 }
tolino-qt6-recovery-5.0.175773.zip: generic update.tar package { version=5.0.175773 date=2024-05-06 branch=release/v5.0.0 revision=499b0d432806417a26b4d7c44ff793839f7ba85f }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
firmware release Category: Updating patches for a new release.
Projects
None yet
Development

No branches or pull requests

3 participants