View Single Post
Old 05-27-2018, 03:04 PM   #1
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,736
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Post kobopatch - An improved patching system


kobopatch
An improved patching system

------


Continued from https://www.mobileread.com/forums/sh...d.php?t=296597

Features/improvements over patch32lsb:
  • Faster
  • No temp files
  • Preserves all file metadata, including ownership and xattrs
  • More checks and better error messages (including patch_group and syntax validation)
  • Optional new format which is more powerful and consistent (demo)
    • New instructions like FindReplaceString, ReplaceZlib, FindZlib, FindZlibHash, FindBLX, ReplaceBLX, ReplaceBytesNOP, FindBaseAddressHex, FindBaseAddressSymbol, ReplaceBytesAtSymbol
    • Can specify offsets using integers as well as hex
    • More consistent escaping
    • More
  • Override patch_enable options from a single config file (to make it easier to upgrade)
  • Multiple patch files for a single binary (to make it easier to upgrade)
  • No external dependencies (like 7-zip)
  • Fully backwards-compatible
  • Extensible
  • Can be embedded in another application more easily (I might even make a web ui)
  • Zlib support
  • Assembly support
  • Simplified BLX replacement
  • Simplified replacement of bytes based on a symbol name (AKA no more recalculating offsets every version for replacing values in functions)
  • Support for compiling and adding translation files
  • Support for adding custom files to KoboRoot.tgz
  • Patches are automatically checked to make sure they apply before each release

Usage:
  1. Download the zip for your firmware version from here.
  2. Download the firmware from here to the src folder. The zip should be called something like kobo-update-1.2.3456.zip.
  3. Install the firmware on your kobo BEFORE proceeding with the next steps.
  4. Enable patches in the files in the src folder (or use the overrides in kobopatch.yaml to keep your options separate).
  5. Run kobopatch.bat on Windows, or kobopatch.sh on Linux.
  6. If the patching succeeded, a file named KoboRoot.tgz will be created in the out folder. Copy it to the .kobo folder of your device.

Saving patch_enable options separately:
See kobopatch.yaml in the patch zip for instructions.

Reporting bugs:
You can either reply here or open an issue on GitHub. Please provide log.txt along with your report.


Last edited by geek1011; 02-03-2019 at 11:32 PM.
geek1011 is offline   Reply With Quote