Skip to content

Commit 9fee37f

Browse files
committed
Add support for KS1 2.5.2.3 instead of 2.5.2.2
1 parent ad7ee15 commit 9fee37f

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Here are the suported printers and firmwares with latest Rinkhals release:
1919
| -- | -- | -- |
2020
| Kobra 3 (+ combo) | `2.3.8.9` `2.3.9.3` | `2.3.7` and `2.3.7.1` have some instabilities |
2121
| Kobra 2 Pro | `3.1.2.3` | Only with mainboard [Trigorilla Spe **B** v1.0.x](https://1coderookie.github.io/Kobra2ProInsights/hardware/mainboard/#trigorilla_spe_b_v10x-stock-new-revision). `3.1.4` is buggy |
22-
| Kobra S1 (+ combo) | `2.5.1.6` `2.5.2.2` |
22+
| Kobra S1 (+ combo) | `2.5.1.6` `2.5.2.3` |
2323

2424
In case you're wondering this project is named after rinkhals, a sub-species of Cobras ... Kobra ... Rinkhals 👏
2525

files/3-rinkhals/opt/rinkhals/patches/K3SysUi.KS1_2.5.2.2.sh

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/sh
2+
3+
# This script was automatically generated, don't modify it directly
4+
# Before MD5: d316681f09f4bdc9c6427771ff1ba8d9
5+
# After MD5: 2e53c775c1c485623188a2e640c9db42
6+
7+
TARGET=$1
8+
9+
MD5=$(md5sum $TARGET | awk '{print $1}')
10+
if [ "$MD5" = "2e53c775c1c485623188a2e640c9db42" ]; then
11+
echo $TARGET is already patched, skipping...
12+
exit 0
13+
fi
14+
if [ "$MD5" != "d316681f09f4bdc9c6427771ff1ba8d9" ]; then
15+
echo $TARGET hash does not match, skipping patch...
16+
exit 1
17+
fi
18+
19+
PATCH_FILE=/tmp/patch-$RANDOM.bin
20+
echo 'wh0A6g7woOEvdXNlcmVtYWluL3JpbmtoYWxzLy5jdXJyZW50L29wdC9yaW5raGFscy91aS9yaW5raGFscy11aS5zaCAmIGVjaG8gJCEgPiAvdG1wL3JpbmtoYWxzL3JpbmtoYWxzLXVpLnBpZAB0aW1lb3V0IC10IDIgc3RyYWNlIC1xcXEgLWV0cmFjZT1ub25lIC1wICQoY2F0IC90bXAvcmlua2hhbHMvcmlua2hhbHMtdWkucGlkKSAyPiAvZGV2L251bGxybSAtZiAvdG1wL3JpbmtoYWxzL3JpbmtoYWxzLXVpLnBpZAAEAKDhAwBT4zni/xoAAJ/lAADqAK8RAHxB/OtkADFW/OsAAJ/lAAAA6mavEQB2QQ8AUOP3//8KAAAAAADqwq8RAHBB/OsQABvlAACQ5QQgoOMBEKDjMvL+6xAAG+UAkOUEEKDj2fP+6yDi/+pSaW5raGFscwA=' | base64 -d > $PATCH_FILE
21+
22+
dd if=$PATCH_FILE skip=0 ibs=1 of=$TARGET seek=1063128 obs=1 count=4 conv=notrunc # 0x1038d8 / 0x1138d8 > 0xc21d00ea
23+
dd if=$PATCH_FILE skip=4 ibs=1 of=$TARGET seek=1093372 obs=1 count=133 conv=notrunc # 0x10aefc / 0x11aefc > 0x0ef0a0e12f75736572656d61696e2f72696e6b68616c732f2e63757272656e742f6f70742f72696e6b68616c732f75692f72696e6b68616c732d75692e73682026206563686f202421203e202f746d702f72696e6b68616c732f72696e6b68616c732d75692e7069640074696d656f7574202d74203220737472616365202d717171202d65
24+
dd if=$PATCH_FILE skip=137 ibs=1 of=$TARGET seek=1093506 obs=1 count=63 conv=notrunc # 0x10af82 / 0x11af82 > 0x74726163653d6e6f6e65202d70202428636174202f746d702f72696e6b68616c732f72696e6b68616c732d75692e7069642920323e202f6465762f6e756c6c
25+
dd if=$PATCH_FILE skip=200 ibs=1 of=$TARGET seek=1093570 obs=1 count=36 conv=notrunc # 0x10afc2 / 0x11afc2 > 0x726d202d66202f746d702f72696e6b68616c732f72696e6b68616c732d75692e70696400
26+
dd if=$PATCH_FILE skip=236 ibs=1 of=$TARGET seek=1093608 obs=1 count=17 conv=notrunc # 0x10afe8 / 0x11afe8 > 0x0400a0e1030053e339e2ff1a00009fe500
27+
dd if=$PATCH_FILE skip=253 ibs=1 of=$TARGET seek=1093626 obs=1 count=12 conv=notrunc # 0x10affa / 0x11affa > 0x00ea00af11007c41fceb6400
28+
dd if=$PATCH_FILE skip=265 ibs=1 of=$TARGET seek=1093640 obs=1 count=18 conv=notrunc # 0x10b008 / 0x11b008 > 0x3156fceb00009fe5000000ea66af11007641
29+
dd if=$PATCH_FILE skip=283 ibs=1 of=$TARGET seek=1093660 obs=1 count=10 conv=notrunc # 0x10b01c / 0x11b01c > 0x0f0050e3f7ffff0a0000
30+
dd if=$PATCH_FILE skip=293 ibs=1 of=$TARGET seek=1093672 obs=1 count=37 conv=notrunc # 0x10b028 / 0x11b028 > 0x000000eac2af11007041fceb10001be5000090e50420a0e30110a0e332f2feeb10001be500
31+
dd if=$PATCH_FILE skip=330 ibs=1 of=$TARGET seek=1093710 obs=1 count=14 conv=notrunc # 0x10b04e / 0x11b04e > 0x90e50410a0e3d9f3feeb20e2ffea
32+
dd if=$PATCH_FILE skip=344 ibs=1 of=$TARGET seek=2707724 obs=1 count=9 conv=notrunc # 0x29510c / 0x2a510c > 0x52696e6b68616c7300
33+
34+
rm $PATCH_FILE

files/3-rinkhals/opt/rinkhals/patches/create-patches.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ def patch_K3SysUi(binaryPath, modelCode, version):
133133
buttonCallback = k3sysui.symbols['_ZZN10MainWindow26AcSettingGeneralPageUiInitEvENKUlRK11QModelIndexE0_clES2_']
134134
patchJumpAddress = 0x113210
135135
patchReturnAddress = 0x113218
136-
elif modelCode == 'KS1' and version == '2.5.2.2':
136+
elif modelCode == 'KS1' and version == '2.5.2.3':
137137
buttonCallback = k3sysui.symbols['_ZZN10MainWindow26AcSettingGeneralPageUiInitEvENKUlRK11QModelIndexE0_clES2_']
138-
patchJumpAddress = 0x1135d8
139-
patchReturnAddress = 0x1135e0
138+
patchJumpAddress = 0x1138d8
139+
patchReturnAddress = 0x1138e0
140140

141141
else:
142142
raise Exception('Unsupported model and version')

files/3-rinkhals/tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ is_verified_firmware() {
5656
return
5757
fi
5858
elif [ "$KOBRA_MODEL_CODE" = "KS1" ]; then
59-
if [ "$KOBRA_VERSION" = "2.5.1.6" ] || [ "$KOBRA_VERSION" = "2.5.2.2" ]; then
59+
if [ "$KOBRA_VERSION" = "2.5.1.6" ] || [ "$KOBRA_VERSION" = "2.5.2.3" ]; then
6060
echo 1
6161
return
6262
fi

0 commit comments

Comments
 (0)