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 4.39.22801 #128

Open
9 of 16 tasks
pgaskin opened this issue Apr 11, 2024 · 47 comments
Open
9 of 16 tasks

Patches for 4.39.22801 #128

pgaskin opened this issue Apr 11, 2024 · 47 comments
Assignees
Labels
firmware release Category: Updating patches for a new release.

Comments

@pgaskin
Copy link
Owner

pgaskin commented Apr 11, 2024

@pgaskin
Copy link
Owner Author

pgaskin commented Apr 11, 2024

packages

  • All firmware is now served from ereaderfiles.kobo.com. Appears to be the same backend (cf proxied openresty proxied s3).
  • New devices are indeed MediaTek (tolino product pages have more info).
  • New devices are kobo11 (390), kobo12 (391, 393).
  • Tolino firmare is likely identical (there are tolino file variants), differences are at runtime.
  • New devices are kobo11 (monza, monzaTolino), kobo12 (spaBW, spaColor, spaTolinoBW, spaTolinoColor).
  • Might be interesting to try mtk_uartboot on the new readers if there isn't a removable SD card.
  • TODO

FS kobo11 21908 -> kobo11 22801

  • New binaries:
    • epd_ctl (cc @NiLuJe) (doesn't seem to be used)
  • kobo_config.sh
    • BRAND=$( ntx_hwconfig -S 1 -p /dev/mmcblk0p6 -d Customer ) (0x21 is tolino)
    • COLOR=$( ntx_hwconfig -S 1 -p /dev/mmcblk0p6 EPD_Flags CFA ) (ON means color)
    • E70T0* is monza/monzaTolino
    • E60T0* is spaColor/spaBW/spaTolinoColor/spaTolinoBW
    • Tolino vision appears to be supported too (it's the fallback case).
  • on-animator.sh
    • pickel showpic PARTIAL_UPDATE (where PARTIAL_UPDATE is 1 for color devices and 0 otherwise) (cc @NiLuJe)
  • rcS
    • reset: spaColour|spaBW|spaTolinoColour|spaTolinoBW) export COORDINATES="1070 250 150 600";;
  • upgrade-mt8113t-ntx.sh
    • [ -e bl2.img ] && ( echo 0 > /sys/class/block/mmcblk0boot0/force_ro && dd if=bl2.img of=/dev/mmcblk0boot0 bs=512 && echo 1 > /sys/class/block/mmcblk0boot0/force_ro )
    • [ -e u-boot-mtk-fit.bin ] && dd if=u-boot-mtk-fit.bin of=/dev/mmcblk0p2 bs=512
    • [ -e boot.img ] && dd if=boot.img of=/dev/mmcblk0p4 bs=512
    • [ -e tee.img ] && dd if=tee.img of=/dev/mmcblk0p5 bs=512
    • [ -e ntxfw.bin.header ] && dd if=ntxfw.bin.header of=/dev/mmcblk0p7
    • [ -e ntxfw.bin ] && dd if=ntxfw.bin of=/dev/mmcblk0p7 seek=1 bs=512
    • [ ! -d /data/misc/wifi ] && mkdir -p /data/misc/wifi
    • [ -e wifi.cfg ] && cp wifi.cfg /data/misc/wifi/
  • now includes openCV libs
  • new built-in fonts (intended to replace Georgia/Avenir/Amasis? they aren't shipped anymore) (cc @jackiew1):
    • Atkinson Hyperlegible
    • Bariol
    • Bitter
    • Noto Sans
    • Texturina
    • Ubuntu
    • Vollkorn
  • libqgsttools_p

FS kobo11 22801 -> kobo12 22801

  • Different (but not conflicting) /etc/images animation files.
  • Different (but not conflicting) upgrade folder firmware files.
  • Same usr/local/Kobo binary buildids, binaries are still 32-bit ARM EABI5.
  • foxit/myscript dbus config isn't shipped (TODO: figure out if kobo12 doesn't use foxit/myscript, or if this is just a fluke with the firmware packages)

qrc 21908 -> 22801

  • [qApp_tolino=true] (cc @jackiew1)
  • Bariol is Tolino UI font.
  • Style changes continue to include scaled values for all codename groups.
  • New DefaultSerif and DefaultSansSerif (pseudo-fonts?) (cc @jackiew1).
  • [isColorDevice=true] (cc @jackiew1)
  • demoSlides does partial-update in general, forces full-update for some slides.
  • Most changes are font/color/new feature related (cc @jackiew1).
  • Tolino mostly uses different icons.
  • TODO: look at the awards changes.
  • TODO

libnickel strings 21908 -> 22801

  • 00000000-0000-0000-0000-000000000390 00000000-0000-0000-0000-000000000391 00000000-0000-0000-0000-000000000393
  • 00000000-0000-0000-0000-000000000690 00000000-0000-0000-0000-000000000691 00000000-0000-0000-0000-000000000693 (TODO: is this tolino?)
  • signal reduceRainbowChangedSignal() (this is for the "Reduce Rainbow" reading setting -- see the kobo docs)
  • signal saveHighlight()
  • 490661bd-1aaa-4ffe-8680-b0a51f103ad8
  • a del Pomar & Ismael Gonz (huh?)
  • application/json; charset=UTF-8 (how many different ways will they spell that in request headers lol)
  • Apr 2 2024 near app_version (TODO: why)
  • did they remove awards?
  • Ballpoint Pen
  • bookDataParsed bookDetailsAction bookDetailsRequest
  • Brush Color Brush Eraser Brush Shade Brush Size
  • Calligraphy Pen
  • CFA Mode
  • Delete known networks Delete Wi Fi networks
  • deviceIsMonza deviceIsMonzaTolino deviceIsSpaTolino
  • DT_EINK_10_NETRONIX DT_EINK_UPD_PP_16.0.0 (cc @NiLuJe)
  • eBook Reader
  • eBooks and documents in your Dropbox folder will also now appear on your eReader under More > My Dropbox. Once you download an item from My Dropbox, you'll find it under My Books.
  • eventFilter overrideCFA=
  • Firmware Configuration Version: (TODO: is this wifi config?)
  • ForceWaveformMode
  • Force crash:
  • ForceCfaMode
  • Highlighter Color
  • Highlighter Shade
  • Highlighter Size
  • Invalid VCOM
  • Inventory request:
  • It looks like your Internet connection is currently unavailable.<br><br>Would you like to retry?
  • It looks like your Internet connection is currently unavailable.<br><br>You can skip setup, but some features like Store and Sync support will not be available until you sign in. You can sign in later in More > Settings > Accounts. (TODO: is this just for tolino?)
  • Kobo Clara BW Kobo Clara Colour Kobo Libra Color (since just these three were added, spa is probably clara, and monza is probably libra)
  • In harmony with the tolino brand the typeface is nice and familiar without being too sweet. The Bariol typeface is very readable even at small sizes, thanks to its sober shapes and its simple construction. See more information: http://atipofoundry.com/fonts/bariol
  • /mnt/onboard/vcom.txt (TODO: what is this?)
  • Note: May slow performance or blur images
  • Note: VCOM is a voltage (cc @NiLuJe)
  • contains Reader&reg; Mobile software under license from Adobe Systems Incorporated, Copyright &copy; 1995-%2 (TODO: figure out if they updated rmsdk)
  • Pen Color
  • Rakuten Sans Rakuten Serif
  • Reader: Kobo Reader Reader: New PDF Reader Reader: Normal PDF Reader Reader: plugins
  • stuff about a reader sandbox... will it be easier to make reader plugins than before?
  • rm -rf /mnt/onboard/.kobo/dict,kepub,slideshow,*.sqlite is now rm -rf %1
  • various %1 Stylus to %1
  • makeTolinoAuthRequest / makeTolinoBoshRequest / makeTolinoInventoryRequest (will need to look into this more in the disassembly, but if this is all that's required for tolino cloud stuff, it may be nicer to implement a compatible api than the kobo sync stuff)
  • /sys/devices/platform/1001e000.i2c/i2c-2/2-0024/ic_ver (cc @NiLuJe)
  • TolinoAuthenticatedCommand TolinoAuthenticationCommand TolinoAuthenticationParser TolinoBookDetailsParser TOLINO_OAUTH_HOST TOLINO_SERVICE_URLS TOLINO TESTING tolino_bosh_api_endpoint tolino_inventory_api_endpoint tolino shine tolino shine color TOLINO_VISION_6 tolino vision color`
  • trace default fullpage= trace FXL= trace imgRects trace override=
  • treadervision6
  • trilogy|kraken|pixie|phoenix|dragon|nova|condor -> trilogy|kraken|pixie|phoenix|dragon|nova|condor|monza|monzaTolino|spaColour|spaBW|spaTolinoColour|spaTolinoBW|io|goldfinch|luna
  • Turn LED ON/OFF:
  • v%0/inventory/%1/downloadinfo
  • v6/inventory?fullResponse=%0&size=%1&page=%2&contentTypeFilter=%3&sort=%4%5&extendedDataType=%6
  • VCOM: %1 mV detected, update? The device will be restarted. (based on the stuff earlier, this is for a dialog, presumably when vcom.txt is changed)
  • Waveform Mode: (cc @NiLuJe)
  • You can now export notebooks from your eReader to Dropbox.

libnickel symbols 21908 -> 22801

  • note: this list isn't comprehensive; it's just the potentially interesting bits
  • AbstractLibraryController<Achievement> is gone
  • Affiliate::getBrandedStylusName()
  • ApplicationSettings::tolinoDemoModeEnabled()
  • AwardDetailsBuilder AwardDetailsController AwardDetailsView AwardsView is gone
  • BookMark::getColor
  • ColorUtil::cssHighlightingClassName
  • CustomWebView::getImgRectsInView
  • DemoModeManager::slidesList
  • Device::allowsUsbPlugInDuringSetup (is this what I think it is...)
  • Device::getTolinoPowerOffImage
  • Device:: isMonza isMonzaKobo isMonzaTolino isSpa isSpaKoboBW isSpaKobo isSpaTolinoBW isSpaTolinoColour isSpaTolino supportsFoxitPdf usingMonotype
  • DevSettings:: cfaMode overrideStylusColors waveformMode
  • dpdoc::Document::m_darkMode (TODO: look at rmsdk)
  • FontManager::addCoreFont (TODO: look at fontickle)
  • HardwareInterface::vcom
  • IOUtil:: getTolinoSideloadBooksDir getTolinoSideloadBooksDirName
  • IOUtil:: removeDbFiles removeDictDataDir removeImageDataDir removeKepubDataDir removeSlideshowDataDir
  • KepubBookReaderBase::reloadChapter
  • Migration175_AddBookmarkColor
  • MTKCondorDeviceConfig:: supportsHWDithering (cc @NiLuJe)
  • MTKMonzaDeviceConfig:: supportsEclipseWaveform supportsHWDithering touchFirmwareVersion touchHardwareVersion usbProductId (TODO: get values)
  • MTKSpaDeviceConfig:: supportsEclipseWaveform supportsHWDithering touchFirmwareVersion touchHardwareVersion usbProductId (TODO: get values)
  • ReaderProxy::currentPage()
  • ReaderProxy::selectBookmark(QMap<QString, QVariant> const&)
  • ReaderProxy::setDarkMode(bool)
  • ReaderProxy::unload()
  • ReaderProxy::updateEnvironmentMatrix(int, int, bool, int)
  • WirelessWorkflowManager::restartBluetooth (TODO: NickelMenu)`

see #128 (comment)

pgaskin added a commit to pgaskin/kobopatch-testdata that referenced this issue Apr 11, 2024
@pgaskin
Copy link
Owner Author

pgaskin commented Apr 11, 2024

Resource extraction:

go run github.com/pgaskin/qrc/cmd/qrc2zip@latest --output nickel.21908.qInitResources_styles.zip --recursive --verbose nickel 1 26762560 26622584 26750920
go run github.com/pgaskin/qrc/cmd/qrc2zip@latest --output nickel.21908.qInitResources_resources.zip --recursive --verbose nickel 1 21737592 101096 21736112
go run github.com/pgaskin/qrc/cmd/qrc2zip@latest --output nickel.21908.qInitResources_certificates.zip --recursive --verbose nickel 1 26923968 26765808 26919792
go run github.com/pgaskin/qrc/cmd/qrc2zip@latest --output nickel.21908.qInitResources_translations.zip --recursive --verbose nickel 1 26622256 21738816 26621512

Output Diff


https://krc.storage.pgaskin.net/nickel.21908.qInitResources_certificates.zip
https://krc.storage.pgaskin.net/nickel.21908.qInitResources_resources.zip
https://krc.storage.pgaskin.net/nickel.21908.qInitResources_styles.zip
https://krc.storage.pgaskin.net/nickel.21908.qInitResources_translations.zip

@jackiew1
Copy link
Collaborator

@pgaskin I don't see 4.39 on your fw page. How do I get a copy?

@pgaskin
Copy link
Owner Author

pgaskin commented Apr 11, 2024

I'll be adding it once I figure out which device is which, and whether the Tolino install instructions are the same.

@jackiew1
Copy link
Collaborator

OK.

@pgaskin
Copy link
Owner Author

pgaskin commented Apr 11, 2024

I am currently about 90% certain the kobo11 variant of this firmware should be safe to install on older devices, but I'll confirm it myself later today.

Update: Do not install this firmware on older devices until I look into a few things. I found some stuff which may cause nickel to fail to start correctly.

@jackiew1
Copy link
Collaborator

I don't need to actually install 4.39 to be able to make some progress. I just need to be able to extract nickel, libnickel.so.1.0.0 and librmsdk.so.1.0.0, particularly nickel.

@pgaskin
Copy link
Owner Author

pgaskin commented Apr 11, 2024

I'm going to start figuring out which device is which, then I'll take a break until this evening (~5h) since there's some other stuff I need to do.

I don't plan to release the patches for this version until next week at the earliest, even if they're done.

I think we should probably support Tolino, put a note that it's not fully tested, and put comments in the patches which are for only tolino/kobo (I don't think there should bee to many of those).

@jackiew1
Copy link
Collaborator

I should be able to have a good look at nickel in 5 hours. I may not still be awake by the time you resume but I'll add some notes here if there's anything worth saying. 😄

@jackiew1
Copy link
Collaborator

The 4 patchable files seem to be identical in mark11 and mark12. That's a good thing isn't it?

@pgaskin
Copy link
Owner Author

pgaskin commented Apr 11, 2024

Yep

@pgaskin
Copy link
Owner Author

pgaskin commented Apr 11, 2024

0x1624760

codename family id name
monza dragon 00000000-0000-0000-0000-000000000390 Kobo Libra Colour
monzaTolino dragon 00000000-0000-0000-0000-000000000690 tolino vision color
spaBW dragon 00000000-0000-0000-0000-000000000391 Kobo Clara BW
spaColour dragon 00000000-0000-0000-0000-000000000393 Kobo Clara Colour
spaTolinoBW dragon 00000000-0000-0000-0000-000000000691 tolino shine
spaTolinoColour dragon 00000000-0000-0000-0000-000000000693 tolino shine color

pgaskin added a commit to pgaskin/KoboStuff that referenced this issue Apr 11, 2024
@pgaskin
Copy link
Owner Author

pgaskin commented Apr 11, 2024

libnickel 21908 -> 22801

  • It seems that on Tolino, sideloaded books will be stored in /mnt/onboard/Books.
    • TODO: check which dir is exposed to USB on Tolino...
  • Device::isTolino stuff (note this does not cover all differences; some may be from other checks, some is from sync, and some is in CSS):
    • dictionary stuff might be different; not obvious at first glance
    • different default system font is loaded
    • tracking of reading sessions is disabled
    • all EventEngine tracking is disabled
    • Google Analytics queue is disabled
    • sideloaded books are only loaded from the dedicated sideload dir (/mnt/onboard/Books)
    • Kobo Customer Care stuff disabled (like with Walmart, Rakuten, and RakutenNEC)
    • Branded device name is tolino instead of Kobo
    • Branded stylus name is tolino stylus instead of Kobo Stylus
    • Help URL is mytolino.com instead of help.kobo.com
    • No support for reviewing books
    • No support for reading life stats
    • No support for discover tab (i.e., store)
    • No support for series view (TODO: make a patch for this so people can use NickelSeries)
    • No support for more by this author
    • No support for wishlist
    • No support for activity button in more tab
    • No support for pocket
    • No support for dropbox
    • No support for overdrive
    • Homepage is https://duckduckgo.com/?ka=1 instead of https://www.google.com or whatever the affiliate default is
    • Something about showing the book cover on the sleep screen, but I need to look at it more
    • Supported demo regions (TODO: actually figure out which)
    • Supported locales (TODO: actually figure out which)
    • Tolino wifi
    • Something about the my books filtering by language (TODO: look at this more)
    • Larger dictionary font size (wtf, lol)
    • Dictionary uses "Bariol" font
    • Support for enabling sideloaded mode during device setup
    • Computer setup goes directly to sideloaded mode instead of telling you to use the Kobo App.
    • No "Find A Book" page in the quick tour
    • Most displays of formatted content (e.g., book descriptions) uses "Bariol" font
    • Something about notebooks (TODO: look at this more)
    • RGB frontlight info page uses "Bariol" font
    • Three buttons are added/removed from the nav buttons (TODO: figure out which)
    • Second row of home screen is different (TODO: I think it's showing recommended books, but I need to look at it more)
    • [qApp_tolino=true]
    • Different Qt RCC file loaded
    • Color instead of Colour in various places
    • kobo sync services disabled
    • custom tolino-branded power-off image
    • partition is named eReader instead of KOBOeReader
    • sign out is just sign out, not a soft reset (I think, need to confirm)
    • "Energy saving" instead of "Energy saving and privacy" (cause it doesn't track user data lol)
    • various about/legal/help text changes
    • no "Repair account" option (probably since you can just sign out and back in)
    • "Kobo Store -> "Store", "Shop Kobo" -> "Shop" in various places
    • no automatic notebook backup
    • no hotspot test (I think, need to confirm)
    • Different Qt RCC file loaded
  • Tolino APIs
    • Bosh (Tolino Cloud)
      • someone reverse engineered the bosh api: https://cweiske.de/tolino-api-docs.htm (seems outdated though)
      • Headers sent by kobo:
        • Authorization: Bearer ...
        • client_type: application/json; charset=UTF-8 (WTF!!! I think this is a copy-paste error on Kobo's side)
        • Hardware-Id: ...
        • Reseller-Id: 3
        • User-Agent: DT_EINK_10_NETRONIX DT_EINK_UPD_PP_16.0.0
        • client_type: TOLINO_VISION_6
        • client_version: 16.0.0
      • v%0/inventory/%1/downloadinfo (TolinoBookDetails)
        • takes json contentUrl
      • v6/inventory?fullResponse=%0&size=%1&page=%2&contentTypeFilter=%3&sort=%4%5&extendedDataType=%6 (TolinoInventory, InventoryParser)
        • EBOOK
        • RECENT,DESC
        • ACSM
        • EPUB
        • SKOOBE,KOBODRM,PREVIEW
        • 0x10175b8 does the sync, but it appears that this is only a button in developer options right now, not part of the sync queue (will confirm later)... seems like Kobo will come out with a release with full tolino support later
  • Device::allowsUsbPlugInDuringSetup
    • This is true for monza and spa (kobo and tolino, though note that tolino has some other code for handling usb during setup).
    • It seems to be for allowing usb connection (with the normal dialog, etc) at any point during setup.
  • MTK factory reset does /bin/ntx_hwconfig -S 1 -p /dev/mmcblk0p6 BootPartNo %0 to boot from the recovery partition instead overwriting the entire uboot like on i.MX.
  • Device:: isMonza isMonzaKobo isMonzaTolino, same for spa
  • Device::usingMonotype is true for monza and spa, kobo only
    • When false, DefaultSerif is Rakuten Serif
    • When true, DefaultSerif is Georgia
    • When false, DefaultSans is Rakuten Sans
    • When true, DefaultSans is Avenir Next
  • Version::buildDate from Apr 2 2024
  • 490661bd-1aaa-4ffe-8680-b0a51f103ad8 isBundledUserId
  • Reader: New PDF Reader Reader: Normal PDF Reader
    • new: foxit
    • normal: adobe
    • implemented as reader plugins
    • Device::supportsFoxitPdf = Device::supportsStylus || Device::isIo (io is Libra 2)
    • SandboxReadingWidget::setReader(QWidget* arg1, ReadingView* arg2)
    • SandboxReadingWidget::setSketchLayer(QWidget* arg1)
  • TODO

@jackiew1
Copy link
Collaborator

Throughout nickel CSS:

  • 'Georgia' changed to 'DefaultSerif'
  • 'Avenir' changed to 'DefaultSansSerif'

Based on changes in librmsdk.so.1.0.0 it looks like DefaultSerif & DefaultSansSerif may be mapped to 'Rakuten Serif' & 'Rakuten Sans' respectively.

So far, these are the only nickel patch changes I've had to make to get kobopatch to run without error. Whether the patches still do what they're supposed to do is another matter!

ATM I'm not sure what the best way to support Tolino might be. The change re Tolino and font Bariol is repeated very many times in nickel CSS. Every hard-coding of font-family: Bariol also has [qApp_tolino=true] in the same CSS style.

However some [qApp_tolino=true] styles are used to set a Tolino-specific font-size. I haven't had time yet to assess how that might affect existing patches if we want to include Tolino in the same patch.

I'm glad we've got some extra time available before having to release 4.39 patches.

@pgaskin
Copy link
Owner Author

pgaskin commented Apr 11, 2024

Based on changes in librmsdk.so.1.0.0 it looks like DefaultSerif & DefaultSansSerif may be mapped to 'Rakuten Serif' & 'Rakuten Sans' respectively.

Yes, kobo seems to have revamped the fonts in general (see my earlier content).

Whether the patches still do what they're supposed to do is another matter!

Main thing to look for is tolino overrides in the same CSS file.

ATM I'm not sure what the best way to support Tolino might be

For patches which change the font, remove the tolino override. For patches which don't, add another option to replace that.

However some [qApp_tolino=true] styles are used to set a Tolino-specific font-size. I haven't had time yet to assess how that might affect existing patches if we want to include Tolino in the same patch.

Yeah, tolino seems to use a larger font size by default for many things, including the dictionary. I'll need to look at bariol to figure out whether Kobo thinks German users have impaired vision, or if bariol just looks smaller at the same size.

I think for now, we should just replace it with the Kobo value by removing the tolino override in the font size patches.

@pgaskin
Copy link
Owner Author

pgaskin commented Apr 11, 2024

  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/nickel.yaml/pgaskin.yaml: Increase size of kepub chapter progress chart: could not apply patch "Increase size of kepub chapter progress chart": line 28: inst 4: ReplaceZlib: not a zlib stream
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/nickel.yaml/pgaskin.yaml: Remove forgot pin button from lock screen: could not apply patch "Remove forgot pin button from lock screen": line 20: inst 4: ReplaceZlib: not a zlib stream
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/nickel.yaml/jackie_w.yaml: Custom page navigation scrubber: could not apply patch "Custom page navigation scrubber": line 303: inst 4: ReplaceZlib: find string not found in stream ({font-family:Avenir;font-weight:bold;font-style:normal;})
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/nickel.yaml/jackie_w.yaml: Customise Header back button: could not apply patch "Customise Header back button": line 383: inst 4: ReplaceZlib: find string not found in stream (#backLabel #label{font-family:Avenir;font-style:normal;font-weight:bold;)
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/libadobe.so.yaml/pgaskin.yaml: Remove PDF map widget shown during panning: could not apply patch "Remove PDF map widget shown during panning": line 9: inst 4: ReplaceBytes: could not find specified bytes
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/librmsdk.so.1.0.0.yaml/geoffr.yaml: Default ePub sans-serif font (Gill Sans): could not apply patch "Default ePub sans-serif font (Gill Sans)": line 69: inst 3: FindReplaceString: FindBaseAddressString: FindBaseAddress: could not find bytes
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/librmsdk.so.1.0.0.yaml/geoffr.yaml: Default ePub serif font (Amasis): could not apply patch "Default ePub serif font (Amasis)": line 42: inst 3: FindReplaceString: FindBaseAddressString: FindBaseAddress: could not find bytes
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/libnickel.so.1.0.0.yaml/pgaskin.yaml: Replace adobe page numbers toggle with invert screen: could not apply patch "Replace adobe page numbers toggle with invert screen": line 44: inst 4: ReplaceBytes: could not find specified bytes at offset
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/libnickel.so.1.0.0.yaml/pgaskin.yaml: Hide browser from beta features: could not apply patch "Hide browser from beta features": line 82: inst 3: ReplaceBytes: could not find specified bytes
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/libnickel.so.1.0.0.yaml/pgaskin.yaml: Allow rotation on all devices: could not apply patch "Allow rotation on all devices": line 406: inst 4: ReplaceBytes: could not find specified bytes at offset
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/libnickel.so.1.0.0.yaml/pgaskin.yaml: Customize ComfortLight settings: could not apply patch "Customize ComfortLight settings": line 529: inst 4: ReplaceInt: could not find specified bytes at offset
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/libnickel.so.1.0.0.yaml/pgaskin.yaml: Remove line from bottom tab bar: could not apply patch "Remove line from bottom tab bar": line 166: inst 3: ReplaceBytes: could not find specified bytes
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/libnickel.so.1.0.0.yaml/geoffr.yaml: Set KePub hyphenation: could not apply patch "Set KePub hyphenation": line 327: inst 3: ReplaceBytes: could not find specified bytes
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/libnickel.so.1.0.0.yaml/geoffr.yaml: My 24 line spacing values: could not apply patch "My 24 line spacing values": line 54: inst 9: ReplaceBytes: could not find specified bytes at offset

A bunch more than usual, some expected, most easy, but some will be annoying to update.

Will need to pay extra attention when updating things in places near tolino-specific code.

@jackiew1
Copy link
Collaborator

I think I already fixed these 4:

  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/nickel.yaml/jackie_w.yaml: Custom page navigation scrubber: could not apply patch "Custom page navigation scrubber": line 303: inst 4: ReplaceZlib: find string not found in stream ({font-family:Avenir;font-weight:bold;font-style:normal;})
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/nickel.yaml/jackie_w.yaml: Customise Header back button: could not apply patch "Customise Header back button": line 383: inst 4: ReplaceZlib: find string not found in stream (#backLabel #label{font-family:Avenir;font-style:normal;font-weight:bold;)
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/librmsdk.so.1.0.0.yaml/geoffr.yaml: Default ePub sans-serif font (Gill Sans): could not apply patch "Default ePub sans-serif font (Gill Sans)": line 69: inst 3: FindReplaceString: FindBaseAddressString: FindBaseAddress: could not find bytes
  /home/patrick/kp/src/kobopatch-patches/src/versions/4.39.22801/librmsdk.so.1.0.0.yaml/geoffr.yaml: Default ePub serif font (Amasis): could not apply patch "Default ePub serif font (Amasis)": line 42: inst 3: FindReplaceString: FindBaseAddressString: FindBaseAddress: could not find bytes

although the last two will need a patch name change due to 'Amasis' & 'Gill Sans' no longer being relevant. I'll need to test these two quite carefully once I've got a device I can safely update.

@jackiew1
Copy link
Collaborator

The included Bariol font is locked but it (or a version of it) seems to be freely available via the web. It's a sans-serif font with "rounded ends". Quite nice, if a little "thin". Slightly worrisome that the web versions are double the filesize of the Kobo versions so I don't know how good glyph coverage will be.

@pgaskin
Copy link
Owner Author

pgaskin commented Apr 11, 2024

@jackiew1

Based on changes in librmsdk.so.1.0.0 it looks like DefaultSerif & DefaultSansSerif may be mapped to 'Rakuten Serif' & 'Rakuten Sans' respectively.

  • Device::usingMonotype is true for monza and spa, kobo only
    • When false, DefaultSerif is Rakuten Serif
    • When true, DefaultSerif is Georgia
    • When false, DefaultSans is Rakuten Sans
    • When true, DefaultSans is Avenir Next

@pgaskin
Copy link
Owner Author

pgaskin commented Apr 12, 2024

Mostly finished looking at firmware changes.

  • The vast majority of changes we might care about are for Tolino, and most shouldn't interfere with patches except to make them pointless (since a bunch of stuff is disabled for tolino).
  • Tolino sync support doesn't appear to be complete yet.
  • UI font size patches will need to deal with the tolino case.
  • Should probably add a note to pdf-related patches about foxit.
  • Should probably start adding comments to patches which don't have any effect on tolino readers.
  • Should check smartlink stuff.
  • Will probably write some new patches:
    • Enable series on tolino devices.
    • For testing (won't include it in the patch releases), mostly tolino-ify a device (mostly meaning appearance, and feature removal, not behaviour of stuff like sync).
    • Swap kobo/tolino ui fonts (maybe).

@jackiew1
Copy link
Collaborator

@jackiew1

Based on changes in librmsdk.so.1.0.0 it looks like DefaultSerif & DefaultSansSerif may be mapped to 'Rakuten Serif' & 'Rakuten Sans' respectively.

  • Device::usingMonotype is true for monza and spa, kobo only

    • When false, DefaultSerif is Rakuten Serif
    • When true, DefaultSerif is Georgia
    • When false, DefaultSans is Rakuten Sans
    • When true, DefaultSans is Avenir Next

How does this work if Georgia and Avenir are no longer listed in fw fonts?

@pgaskin
Copy link
Owner Author

pgaskin commented Apr 12, 2024

How does this work if Georgia and Avenir are no longer listed in fw fonts?

I'm not exactly sure, but this is one of the things I noticed which caused me to change my mind about compatibility with older devices for this update.

I also just tried installing it on my Aura2Ev1 (from 21908), and it's bootlooping. I plan to figure out why, but I'm going to finish the patch updates first.

pgaskin added a commit that referenced this issue Apr 12, 2024
Missing:
- "Default ePub serif/sans-serif font" needs to be rewritten since the font is an arg now.
- "Custom page navigation scrubber" needs css updates.
- "Customise Header back button" needs css updates.
- "My 24 line spacing values" may need major changes.
- "Allow rotation on all devices" needs to be looked at.
- "Customize ComfortLight settings" may need to be rewritten or have multiple offset changes.

Also need to:
- Check if other CSS patches need updates for tolino compatibility.
- Check if PDF-related patches need a comment or special-casing for foxit.
- Check smartlink stuff.
- Add comments to patches which will not have an effect on tolino readers due to feature removal.
- Maybe write more patches.

See #128 (comment).
@pgaskin
Copy link
Owner Author

pgaskin commented Apr 12, 2024

Affiliates can still overwrite it.

jackiew1 added a commit that referenced this issue Apr 12, 2024
jackiew1 added a commit that referenced this issue Apr 12, 2024
jackiew1 added a commit that referenced this issue Apr 12, 2024
jackiew1 added a commit that referenced this issue Apr 12, 2024
No-one knows what it's supposed to do or whether it works. #128
jackiew1 added a commit that referenced this issue Apr 12, 2024
Default serif font seems to have changed from Georgia to 'Rakuten Serif'. Amasis font no longer in fw. #128
jackiew1 added a commit that referenced this issue Apr 12, 2024
Default sans-serif font seems to have changed to 'Rakuten Sans'. 'Gill Sans' font no longer included in fw. #128
@jackiew1
Copy link
Collaborator

@pgaskin My recent commit for update to patch Custom collection/author header title font was supposed to reference this issue but I forgot. Sorry.

@jackiew1
Copy link
Collaborator

jackiew1 commented Apr 12, 2024

@pgaskin Having spent more time looking at all the changes, this is my current plan for your consideration:

  • Make necessary corrections to keep existing patches working on Kobos. These are already committed, but not tested.
  • If/when necessary do a 2nd pass to add corresponding Tolino font-size customisations to nickel.yaml patches which already offer Kobo font-size customisations. Ideally I'd prefer to work with a volunteer Tolino beta-tester who's keen to help bring kobopatch to the Tolino community.
  • I don't think we know enough yet about Kobo/Tolino plans for which models can access which fonts. Are Georgia/Avenir gone for good or just on the new Kobos? Until I understand this better I don't want to add any new font-family customisations to existing patches, particularly not for Tolinos. As far as I can see fw4.39 assumes Tolinos use Bariol everywhere in the GUI. I'm not yet sure whether Bariol is accessible by Kobos. I tried sideloading the Bariol files to my /fonts dir. The Kobo didn't list it as a new font. All the others I tried (AtkinsonHyperlegible, Bitter, 'Noto Sans', Ubuntu, Vollkorn) worked just as you'd expect with any other sideloaded font. However, it may not be a coincidence that the Bariol font files are "locked" and all the rest are not. BTW the font Texturina has to be the ugliest thing I've ever seen. I wonder what it's supposed to be used for? Not reading English, I hope!

ETA: 4.39 doesn't seem to distinguish between Tolino Shine and Tolino Vision for font-size. It's literally one-size-fits-all.

@AaronDewes
Copy link

If/when necessary do a 2nd pass to add corresponding Tolino font-size customisations to nickel.yaml patches which already offer Kobo font-size customisations. Ideally I'd prefer to work with a volunteer Tolino beta-tester who's keen to help bring kobopatch to the Tolino community.

The new Tolino with Kobo firmware will only release at the beginning of May, but I'd be happy to help testing, as well as translating some stuff.

@jackiew1
Copy link
Collaborator

jackiew1 commented Apr 13, 2024

If/when necessary do a 2nd pass to add corresponding Tolino font-size customisations to nickel.yaml patches which already offer Kobo font-size customisations. Ideally I'd prefer to work with a volunteer Tolino beta-tester who's keen to help bring kobopatch to the Tolino community.

The new Tolino with Kobo firmware will only release at the beginning of May, but I'd be happy to help testing, as well as translating some stuff.

Thanks very much for volunteering 😄 Which Tolino model do you (or will you) have?

Are you contactable via MobileRead or just here at GitHub?

@AaronDewes
Copy link

If/when necessary do a 2nd pass to add corresponding Tolino font-size customisations to nickel.yaml patches which already offer Kobo font-size customisations. Ideally I'd prefer to work with a volunteer Tolino beta-tester who's keen to help bring kobopatch to the Tolino community.

The new Tolino with Kobo firmware will only release at the beginning of May, but I'd be happy to help testing, as well as translating some stuff.

Thanks very much for volunteering 😄 Which Tolino model do you (or will you) have?

Are you contactable via MobileRead or just here at GitHub?

Just GitHub so far, but I'll sign up on MobileRead later.

I'm planning to order a shine color. I'm also active on some German tolino forums (I was previously modding & reverse engineering the older Tolinos) and can probably get some people on there to test too,also on the older models once/if Tolino starts switching from Android to Kobo's OS (They're preparing that in their beta firmware, although I don't have up-to-date builds to see how far they got).

@jackiew1
Copy link
Collaborator

jackiew1 commented Apr 19, 2024

Yeah, tolino seems to use a larger font size by default for many things, including the dictionary. I'll need to look at bariol to figure out whether Kobo thinks German users have impaired vision, or if bariol just looks smaller at the same size.

I've been watching some of the YouTube early review videos. Looking at the HomeScreen and Tabs it looks like the sans-serif font used on the Tabs may be Bariol. So maybe DefaultSansSerif is also Bariol, even on Kobos?

[ETA: Hmm. Just seen a different video and now I'm not so sure. I wonder if the review devices have different fws depending on how long ago the reviewer received it?]

Also, if the version of Bariol I found on the internet is similar to what will be shipped in Kobo fw I think you can stop worrying about German users and possible impaired vision. 😄 It's simply a font which displays much smaller at the same font-size than something like Georgia or Caecilia.

@NiLuJe
Copy link
Collaborator

NiLuJe commented Apr 21, 2024

  • MTKMonzaDeviceConfig:: supportsEclipseWaveform supportsHWDithering touchFirmwareVersion touchHardwareVersion usbProductId (TODO: get values)

  • MTKSpaDeviceConfig:: supportsEclipseWaveform supportsHWDithering touchFirmwareVersion touchHardwareVersion usbProductId (TODO: get values)

Seems to be 0x4237 for everything (which is... mildly strange), unless I missed something?

@jackiew1
Copy link
Collaborator

  • MTKMonzaDeviceConfig:: supportsEclipseWaveform supportsHWDithering touchFirmwareVersion touchHardwareVersion usbProductId (TODO: get values)
  • MTKSpaDeviceConfig:: supportsEclipseWaveform supportsHWDithering touchFirmwareVersion touchHardwareVersion usbProductId (TODO: get values)

Seems to be 0x4237 for everything (which is... mildly strange), unless I missed something?

Haven't seen you for ages. Have you got a secret new project? 😄

Yes, the shared product id caused a minor kerfuffle for the calibre driver. Hopefully querying the .kobo/version file instead will do the necessary.

On a different colour-related subject ... ages ago you shared some calibre code to maximise the quality of grayscale thumbnails/screensavers. Do you have any thoughts about potential for improving colour equivalents?

@NiLuJe
Copy link
Collaborator

NiLuJe commented Apr 21, 2024

Haven't seen you for ages. Have you got a secret new project? 😄

Nah, IRL just got busier than expected ;).

Yes, the shared product id caused a minor kerfuffle for the calibre driver. Hopefully querying the .kobo/version file instead will do the necessary.

Ah. Didn't expect people to have already gotten their hands on some and bothered calibre with it, should have checked that.

Yeah, assuming they don't reintroduce something like what happened in 4.35 with devices sharing a PCB IDs (which appears to be the case for the B&W/Color pairs...), the Nickel version tag ought to be accurate.

@NiLuJe
Copy link
Collaborator

NiLuJe commented Apr 21, 2024

Do you have any thoughts about potential for improving colour equivalents?

That's going to be annoying, yeah.

I suspect we'll need to blow up saturation like crazy (which probably explains why they started shipping openCV).
I expect dithering to be supported on device by the MDP, though, so there's that, at least.

The only prior experience with this I've had is on PocketBook, where if you don't let InkView (the PB middleware) pre-process the images, you end up with a pretty underwhelming result (not that it's particularly great when you do, but I digress... ;p).

The good news is that, as far as calibre is concerned, this should be a non-issue, as I expect Nickel to be doing that on-device, and, IIRC, the driver has a setting that lets Nickel generates all the thumbnails (or did I dream that one up?).

@jackiew1
Copy link
Collaborator

Ah. Didn't expect people to have already gotten their hands on some and bothered calibre with it, should have checked that.

I think "people" is restricted to a single Libra Colour user who accidentally received their new toy ridiculously early. Unless it all happened via PM they didn't appear to be particularly helpful in supplying useful info but they did go so far as to say that their device connected successfully to calibre using the incomplete beta driver. I hope the updated driver will be OK for all 3 devices. Time will tell.

@jackiew1
Copy link
Collaborator

The good news is that, as far as calibre is concerned, this should be a non-issue, as I expect Nickel to be doing that on-device, and, IIRC, the driver has a setting that lets Nickel generates all the thumbnails (or did I dream that one up?).

The calibre KOBOTOUCH driver lets users choose whether or not to let calibre create and send all the correctly-sized thumbnails/screensavers (Colour vs. B&W, pre-optimised grayscale or not, pre-letterboxed or not). But I think you wrote most of that. 😄 My memory is that you felt quite strongly, at the time, that it was better to let calibre do as much of the B&W image manipulation as possible rather than leaving it all up to the Kobo. I really hope that's true, if not I've misrepresented you on MR in the last few days. 😊

To the best of my knowledge the following is true ... if the user opts to not let calibre send all the thumbnails then the device extracts the page 1 cover as the basis for creating all the required thumbnails. They are only created as required, so if you page through the booklist it can be a slow process populating the GUI with images after the initial book transfer.

Are you saying that with colour it might be better to let the Kobo do all the image manipulation work itself?

@NiLuJe
Copy link
Collaborator

NiLuJe commented Apr 21, 2024

But I think you wrote most of that. 😄 My memory is that you felt quite strongly, at the time, that it was better to let calibre do as much of the B&W image manipulation as possible rather than leaving it all up to the Kobo. I really hope that's true, if not I've misrepresented you on MR in the last few days. 😊

Yup. Nickel got better at it over the years, but for B&W, I still stand by that (i.e., properly dithered B&W PNGs).

They are only created as required.

Yup; it's not terrible on modern devices, though.

Are you saying that with colour it might be better to let the Kobo do all the image manipulation work itself?

That's what I expect, yeah. We'll have to see how it actually fares, but I have very low expectations of the Kaleido tech without heavily pre-processed images from what I've seen on PB ;p.

@NiLuJe
Copy link
Collaborator

NiLuJe commented Apr 21, 2024

the device extracts the page 1 cover as the basis for creating all the required thumbnails.

Or, well, the actual cover (as per ePub 2/3 metadata) for properly authored books.

I don't remember if what happens otherwise (or for PDFs) as a fallback is the "render page 1" option, or just "create a synthetic text cover" (which is something that does happen as a placeholder during thumbnail generation, at least).

@jackiew1
Copy link
Collaborator

I just did some quick tests. You're probably right that the actual cover is extracted from kepub, if it's found, but if not, page 1 is extracted. For standard epub it's always extracted as a rendering of page 1, no matter whether it's epub2 or epub3, even if the epub3 has the correct cover-image property in the OPF. PDF looks like it's the same as epub.

@pgaskin
Copy link
Owner Author

pgaskin commented Apr 23, 2024

And now we have to fix NickelHook too...

@Desterly
Copy link

My Libre Colour showed up today. Only thing I have loaded on it right now is NickleClock (works no problems) so let me know if you need anything off of it to help

@sparajoy1
Copy link

hey all! i've been keeping up some local manually edited copies of kobopatch for the two new firmwares (.39.22801 and .22861), I don't have everything 100% working but if it would be helpful I could open a branch with my mods on it, or else help commit some updates here?

@pgaskin
Copy link
Owner Author

pgaskin commented May 6, 2024

There's some WIP stuff in here. The details of what needs to be done are here. I still need to look at 4.39.22861 as well.

Feel free to open PRs for each patch you've updated for 22801 if it hasn't already been done, and I'll take a look.

We are currently very busy with other things, but I hope to get the patches updated and released sometime in the next week or two, then I'll be working on NickelMenu.

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

pgaskin commented Jun 20, 2024

Update: I've been busy for the last month, but I hope to get to this on the weekend if I have time.

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

7 participants