![]() |
|
|
Thread Tools |
![]() |
#1 |
Member
Join Date: Jun 2020
City & State: North Carolina
My Country: US
Line Voltage: 120VAC 60Hz
I'm a: Knowledge Seeker
Posts: 78
|
![]() Hello everyone!
In the past several weeks I've learned a lot from this forum and its community especially from all the folks who contributed to THIS thread With some trial and error I was able to reliably patch BIOS dumps for SVP-locked Lenovo machines up to the 8th generation using the info, tools, and files provided on this forum. After some practice and positive feedback from users I helped I've noticed that, once learned, the process is fairly straightforward, so I've developed a small python script to automate it and allow everyone to patch their own binaries without having to ask for help and wait. This is my way to give back to the community. Also I am lazy... lol. DISCLAIMER
With that out of the way, using it is pretty simple and it should work on both Windows and Linux as long as you have Python installed https://www.python.org/downloads/. Just download the zip file and extract it. You'll get a folder named "lenovo_autopatcher" with the following content: IMPORTANT: Before applying the patch make sure you verify that your original image is not corrupted by dumping 1 or 2 additional images from your bios chip and comparing them. The original dump is THE ONLY WAY to recover your machine if something goes wrong! From command line use either autopatch.cmd (Windows) or autopatch.sh (Linux) as follows: autopatch <your_bios_image.ext> THAT'S IT! The command will generate either your_bios_image_PATCHED.ext or your_bios_image_PATCHED_CLEAN.ext depending on the type of BIOS you are patching. The original dump will be left unchanged. autopatch -h will output the help info for the command autopatch --howto will output the following instructions on how to use the patched image: [ HOW TO USE THE PATCH ] STEP 1: Flash and replace current BIOS with the generated patch file STEP 2: Boot the machine STEP 3: Press ENTER/F1/etc. to enter BIOS settings STEP 4: Enter any character when asked for Supervisor Password STEP 5: Press enter when it shows Hardware ID STEP 6: Press space bar 2x when asked STEP 7: Turn off machine STEP 8: Restore original BIOS STEP 9: Reset BIOS settings to factory default [ NOTES ] When booting the patched BIOS you might have to: - Hold the anti-tamper switch down the whole time (use tape) - Remove the hard disk or replace it with a locked one Finally, I would be grateful if you could report any bugs, errors, problems, or general feedback in this thread so that I can make improvements to the script. Thank you, and enjoy! Last edited by SMDFlea; 03-16-2022 at 12:16 PM.. |
![]() |
![]() |
![]() |
#2 |
Bad Veteran
Join Date: Feb 2018
City & State: Paris
My Country: France
I'm a: Knowledge Seeker
Posts: 389
|
![]() thanks, good job, i will look at this. Doesn't that correct the checksum?
|
![]() |
![]() |
![]() |
#3 | |
Member
Join Date: Jun 2020
City & State: North Carolina
My Country: US
Line Voltage: 120VAC 60Hz
I'm a: Knowledge Seeker
Posts: 78
|
![]() Quote:
Now since you mention the checksum... Initially to verify that the image obtained using the autopatcher was the same as the one I'd manually patch I compared them using checksum and windiff but they never came up identical so I was concerned that the one generated through the script would not work. Turns out that when I patch a file manually using UEFITool I replace the 2 DXE drivers at the same time and let the program do it's thing in one pass. UEFIReplace however can only replace one driver at the time and it rebuilds the binary after each substitution. That somehow causes a few bytes to be different. I have tried replacing one driver at the time with UEFITool, save it reopen it and replace the other one and the resulting file is identical to the one generated by the autopatcher. |
|
![]() |
![]() |
![]() |
#4 |
Bad Veteran
Join Date: Feb 2018
City & State: Paris
My Country: France
I'm a: Knowledge Seeker
Posts: 389
|
![]() If bios beeps at startup, the checksum is not corrected.
I had the problem here and followed this tutorial But I failed to do a correct bios. https://www.badcaps.net/forum/showth...=65996&page=11 https://www.insanelymac.com/forum/to...eps-on-lenovo/ |
![]() |
![]() |
![]() |
#5 | |
Member
Join Date: Jun 2020
City & State: North Carolina
My Country: US
Line Voltage: 120VAC 60Hz
I'm a: Knowledge Seeker
Posts: 78
|
![]() Quote:
Am I missing something? |
|
![]() |
![]() |
![]() |
#6 |
Bad Veteran
Join Date: Feb 2018
City & State: Paris
My Country: France
I'm a: Knowledge Seeker
Posts: 389
|
![]() some machine does not work if not corrected, I think so
you have tried a lot of models already? |
![]() |
![]() |
![]() |
#7 | |
Member
Join Date: Jun 2020
City & State: North Carolina
My Country: US
Line Voltage: 120VAC 60Hz
I'm a: Knowledge Seeker
Posts: 78
|
![]() Quote:
Unfortunately I don't have that many SVP-locked Lenovo's on hand... lol |
|
![]() |
![]() |
![]() |
#8 |
Bad Veteran
Join Date: Feb 2018
City & State: Paris
My Country: France
I'm a: Knowledge Seeker
Posts: 389
|
![]() if you compare an x240 with an L470, you notice that there is a blue part in uefi tools. you need to correct checksum for work.
no need to patch each bios, the patched files are compatible in other machines. just need to create a library on the last gen, it is written twice (see pics) |
![]() |
![]() |
![]() |
#9 | |
Bad Veteran
Join Date: Feb 2018
City & State: Paris
My Country: France
I'm a: Knowledge Seeker
Posts: 389
|
![]() Quote:
yes I will test as soon as I have the opportunity too |
|
![]() |
![]() |
![]() |
#10 | |
Member
Join Date: Jun 2020
City & State: North Carolina
My Country: US
Line Voltage: 120VAC 60Hz
I'm a: Knowledge Seeker
Posts: 78
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#11 | |
Bad Veteran
Join Date: Feb 2018
City & State: Paris
My Country: France
I'm a: Knowledge Seeker
Posts: 389
|
![]() Quote:
the patched file is compatible with other pc "same model of course", with or without checksum https://www.badcaps.net/forum/showthread.php?t=81573 Last edited by Maxpower3; 08-13-2020 at 02:09 PM.. |
|
![]() |
![]() |
![]() |
#12 |
Member
Join Date: Jun 2020
City & State: North Carolina
My Country: US
Line Voltage: 120VAC 60Hz
I'm a: Knowledge Seeker
Posts: 78
|
![]() What's "List NOK with Patch files"?
|
![]() |
![]() |
![]() |
#13 |
Bad Veteran
Join Date: Feb 2018
City & State: Paris
My Country: France
I'm a: Knowledge Seeker
Posts: 389
|
![]() some model that doesn't work with just patched files.
It's been a long time since I looked at this, I don't remember very well |
![]() |
![]() |
![]() |
#14 |
Member
Join Date: Jun 2020
City & State: North Carolina
My Country: US
Line Voltage: 120VAC 60Hz
I'm a: Knowledge Seeker
Posts: 78
|
![]() Right. The autopatcher has 2 steps. On the first pass it injects the patched DXE drivers. If the bios is from an older gen it ends there and its work is done. If it's a newer generation on the second pass it replaces parts of the NVRAM with clean ones and then it's done. I've patched some of the ones you have listed in NOK and they all reported working.
|
![]() |
![]() |
![]() |
#15 |
Bad Veteran
Join Date: Feb 2018
City & State: Paris
My Country: France
I'm a: Knowledge Seeker
Posts: 389
|
![]() ok my error is the NVRAM and not the checksum then
|
![]() |
![]() |
![]() |
#16 |
Member
Join Date: Jun 2020
City & State: North Carolina
My Country: US
Line Voltage: 120VAC 60Hz
I'm a: Knowledge Seeker
Posts: 78
|
![]() Yeah that's the part that took me the longest to figure out... I had to piece together a lot of posts on several threads and compare a lot of original and patched files to figure out what I was missing. Those parts cannot be patched with UEFITool and are only visible with UEFITool NE. They need to be modified with an hex editor. The script does it for you.
|
![]() |
![]() |
![]() |
#17 |
Bad Veteran
Join Date: Feb 2018
City & State: Paris
My Country: France
I'm a: Knowledge Seeker
Posts: 389
|
![]() Yes ok I saw the 2 VSS2 and FTW. Why patched EVSA, it is identical to orignal?
|
![]() |
![]() |
![]() |
#18 |
Badcaps Veteran
Join Date: Mar 2013
City & State: Tartu
My Country: Estonia
I'm a: Knowledge Seeker
Posts: 1,462
|
![]() Nice. Just unlocked about 30 Lenovos before you published this. Got to wait for the next batch to try this out. No need to copy from raspberry to work pc to patch files anymore.
|
![]() |
![]() |
![]() |
#19 | |
Member
Join Date: Jun 2020
City & State: North Carolina
My Country: US
Line Voltage: 120VAC 60Hz
I'm a: Knowledge Seeker
Posts: 78
|
![]() Quote:
Without patching that the laptop plays a little musical tone after boot and the screen stays black... Last edited by Knucklegrumble; 08-13-2020 at 03:19 PM.. |
|
![]() |
![]() |
![]() |
#20 |
Member
Join Date: Jun 2020
City & State: North Carolina
My Country: US
Line Voltage: 120VAC 60Hz
I'm a: Knowledge Seeker
Posts: 78
|
![]() |
![]() |
![]() |
![]() |
Thread Tools | |
|
|