Skip to content

Releases: pgaskin/kobopatch

v0.15.1

14 Jul 20:07
28978fc
Compare
Choose a tag to compare

This release improves the CSS detection heuristic and updates my GitHub username.


0624ef7 patchlib: Rewrote CSS detection heuristic (#33)
28978fc all: Updated GitHub username

v0.15.0

17 Mar 01:19
653070c
Compare
Choose a tag to compare

Kobopatch v0.15.0 significantly improves symbol and offset-related functions.

New instructions/fields:

  • FlexAbsOffset can be used in place of wherever an absolute offset is taken (ReplaceBytes.Base, ReplaceBytes.FindInstBLX, ReplaceBytes.ReplaceInstBLX, ReplaceBytes.FindInstBW, ReplaceBytes.ReplaceInstBW, ReplaceBytes.ReplaceInstNOP, BaseAddress), with the exception of deprecated instructions/fields which need to retain compatibility regarding symbol offsets (see #31).
    • It can be used shorthand with an integer (for the Offset field) or a string (for the Sym field).
    • It has an Offset field for absolute offsets.
    • It has a Sym field for dynamic symbols.
    • It has a SymPLT field for their PLT entries.
    • It has a SymPLTTail field for matching the corresponding tail call stub.
    • It has a Rel field for adding/subtracting from the resulting absolute offset. Note that in general, it is preferred to use the Offset field of a more specific instruction, unless using the Rel field greatly simplifies the readability or maintainability of a patch.
    • All symbols can be matched using mangled or demangled names.
  • ReplaceBytes now has new generators:
    • InstBLX can find/replace BLX instructions and takes a FlexAbsOffset.
    • InstBW can find/replace B.W instructions and takes a FlexAbsOffset.
    • The branch generators above have simple sanity checks built-in.
    • InstNOP replaces with NOPs.
  • ReplaceBytes now has new fields:
    • CheckOnly skips replacements and instead just ensures the Find is present. This is mainly useful for multi-version patches made using the new symbol stuff which also needs to do things like ensure an argument is as expected.
    • Base overrides the current offset for that single instruction and takes a FlexAbsOffset. The Offset field is added to the resolved Base.
  • BaseAddress now accepts a FlexAbsOffset.

Deprecations (these will still remain indefinitely for compatibility with
the old patches):

  • ReplaceBytesAtSymbol is now deprecated in favour of ReplaceBytes.Base.Sym.
  • FindBaseAddressSymbol is now deprecated in favour of BaseAddress.Sym.
  • ReplaceBytesNOP is now deprecated in favour of ReplaceBytes.ReplaceNOP.
  • ReplaceBLX is now deprecated in favour of ReplaceBytes.FindInstBLX and ReplaceBytes.ReplaceInstBLX.

Bugfixes/improvements:

  • The log for ReplaceBytes is now a lot more useful and easier to understand, especially when using generators.
  • Instruction names in certain error messages have been corrected.
  • The bug where all symbol offsets were off by one has been fixed in the new instructions (the old ones are being left as-is to maintain backwards-compatibility (see #31).

I've tested the results of an updated version of the patches against the original ones, and everything is perfectly identical.

There is also a new symdump tool (which can be used on libnickel or any other dynamic library) based on the new symbol code.


653070c all: Updated dependencies
f1494c5 patchfile/kobopatch: Implemented new symbol instructions (fixes #31) (closes #32)
599ac1c kobopatch: Increase string width for ApplyFiles
5b5b541 tools/symdump: Added new tool to dump symbol offsets from ELF executable
db826a1 patchlib: Made ExtractDynsyms on Patcher public
f41bb0d patchlib: Added new symbol helpers to Patcher (#31, #32)
2f4342d patchlib: Rewrote B.W and BLX assembler funcs (#32)
9933b59 patchlib: Added helpers for better dynamic symbol extraction including PLT/GOT offsets (#32)
60a4318 patchlib: Added helpers for assembling B and BX instructions (#32)
71fa145 patchlib: Added Hook function

v0.14.1

14 Feb 18:58
9348f07
Compare
Choose a tag to compare

9348f07 Fixed changelog generation
cee850c Improved Drone config
fbbf4bc Cleaned up go.sum
ffbe952 Switched to elastic golang-crossbuild image for cross-compiling
bc3e3d1 Updated dependencies
4393a0d Switched to my czlib fork
8b1f001 Switched to Go 1.13
a5ac0d0 Fixed build
9250de3 Updated LICENSE
337ad8a Updated kobopatch-patches test
3edfa65 Fixed naming of cross-compiled binaries

kobopatch v0.14.0

17 Jul 21:13
cfae583
Compare
Choose a tag to compare

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

  • 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.

Note that due to upgrading Go to 1.12, kobopatch no longer officially supports Windows XP. You may still be able to build kobopatch on an older version.

Changelog

cfae583 Test kobopatch against latest release of patches
47a4a44 Cleaned up old scripts
4887eeb Added release stuff to Drone config
19e8701 Smaller binaries
553d33d Switched from Travis to Drone
e818e26 Use strings.ReplaceAll instead of strings.Replace(..., -1)
4a88770 New README
1a54e0a Removed old tools
c6b3c1d Added logging of sha1 hashes for patched files (closes #27)
ce8d813 Updated spf13/pflag dependency
7ff60c4 Fixed gigantic error message in some cases when a find value is not found
a27863f Fixed validation error char count for string length mismatch
9ac5645 Added note about using spaces for indentation to parsing error (fixes #26)
cf8adbf Added support for multiple PatchGroups per patch (closes #25)
a7411a2 Tested new kobopatch parsing and removed old one
902d223 Refactored kobopatch parsing (closes #22, fixes #24)
186ad9c Switched to go modules (closes #23)
efdc9a1 Made error handing in patchlib more consistent
a64af78 Simplified shorthand hex parsing

kobopatch v0.13.0

04 Feb 04:22
82ac350
Compare
Choose a tag to compare

Changelog

82ac350 Fix release scripts
de36f39 Added new FindBaseAddressSymbol and ReplaceBytesAtSymbol instructions
2de6b3f Updated year
64c0adc Document ZlibItem
067442e Updated dependencies
58bf463 Removed unused dependencies
fdcd0ed Simplified BLX assembler code

kobopatch v0.12.0

15 Dec 05:00
aec39b9
Compare
Choose a tag to compare

Changelog

aec39b9 FindBLX option on ReplaceBytes and ReplaceBytesNOP
5e654ef Take current pos into account for ReplaceBLX
5f5457c ReplaceBytesNOP instruction
729350c Improved kobopatch-mkzlib output
e5cfd72 Fixed ReplaceBLX endianess
a1dc20d ReplaceBLX instruction (closes #19)
ee926b4 BLX instruction assembler (#19)

kobopatch v0.11.0

27 Nov 04:26
cfb1594
Compare
Choose a tag to compare

Changelog

cfb1594 Fix tests
d78af15 Fixes
48cef25 New ReplaceZlibGroup instruction

kobopatch v0.10.4

07 Nov 17:50
351355c
Compare
Choose a tag to compare

Changelog

351355c Improved error message for MustMatchLength
39c5a1c Added instruction numbers to errors

kobopatch v0.10.3

07 Nov 01:27
a13c335
Compare
Choose a tag to compare

Changelog

a13c335 Added MustMatchLength option to ReplaceString

kobopatch v0.10.2

05 Nov 00:03
6dfb4bb
Compare
Choose a tag to compare

Changelog

6dfb4bb Allow adding files to more than one location in KoboRoot.tgz (closes #17)