Add two more patches, and a way to get a pre-patched bin, ready to hack on

update
Hamish Coleman 8 years ago
parent 0b8dd7842f
commit 2a65f1bc06

@ -37,6 +37,10 @@ install.radare.projects:
cp --reflink=auto $< $@
[ -d $@.d ] && for i in $@.d/*.patch; do ./hexpatch.pl $$i $@; done
# if you want to work on more patches, you probably want the pre-patched ver
%.img.prepatch: %.img.orig
cp --reflink=auto $< $(basename $<)
%.hex: %
hd -v $< >$@

@ -0,0 +1,17 @@
In order to get the right "Screen Lock" keysym from Fn+F2, we can switch the order
of the F2 and F3 keys in the fn_key table.
After this patch, the Fn+F3 key still does not generate the right keysym.
@@ fn_key_swap @@
00021630 6e 00 00 00 fd 06 00 00 64 00 00 00 19 06 00 00 |n.......d.......|
00021640 5a 00 00 00 ff ff 00 00 00 00 00 00 9c 8e 01 00 |Z...............|
00021650 a0 8e 01 00 a4 8e 01 00 a8 8e 01 00 ac 8e 01 00 |................|
-00021660 98 f4 01 00 b0 8e 01 00 b4 8e 01 00 c0 70 c0 71 |.............p.q|
-00021670 c0 72 c7 73 e4 50 e5 51 c0 76 c0 77 c0 78 c0 97 |.r.s.P.Q.v.w.x..|
+00021660 98 f4 01 00 b0 8e 01 00 b4 8e 01 00 c0 70 c0 72 |.............p.r|
+00021670 c0 71 c7 73 e4 50 e5 51 c0 76 c0 77 c0 78 c0 97 |.q.s.P.Q.v.w.x..|
00021680 c0 7a c8 00 c0 02 c0 03 00 00 c6 55 00 00 00 00 |.z.........U....|
00021690 00 00 c0 3d c0 74 c0 75 00 00 00 00 00 00 00 00 |...=.t.u........|
000216a0 c0 a0 00 00 08 00 00 00 4c 16 02 00 1b 00 00 00 |........L.......|

@ -0,0 +1,19 @@
This replicates the first of the two patches that the original mec-tools author
needed to do to get his aftermarket battery to validate.
There is a second battery validation function, but he does not spell out the
code around that function - and as I have genuine batteries at the moment, I
didnt want to go looking for it.
See http://www.zmatt.net/unlocking-my-lenovo-laptop-part-3/
@@ battery_validate @@
0001c850 43 1c 59 63 58 63 32 89 10 88 00 23 90 00 08 b9 |C.YcXc2....#....|
0001c860 00 21 04 00 58 63 13 88 59 63 31 89 2f 24 08 01 |.!..Xc..Yc1./$..|
0001c870 08 b8 38 60 10 78 88 71 de 08 2f f3 f8 16 02 11 |..8`.x.q../.....|
-0001c880 0b 08 51 00 00 86 83 b8 24 f0 10 10 80 20 11 10 |..Q.....$.... ..|
+0001c880 4a 26 00 70 00 86 83 b8 24 f0 10 10 80 20 11 10 |J&.p....$.... ..|
0001c890 81 20 08 b8 38 60 12 10 81 20 10 78 13 10 82 20 |. ..8`... .x... |
0001c8a0 08 b9 59 61 30 79 ea 08 2f f3 f8 16 02 11 0f 08 |..Ya0y../.......|
0001c8b0 51 00 00 86 45 20 00 0a 0e f0 05 8e 01 e0 0f 78 |Q...E .........x|
Loading…
Cancel
Save