Announcement

Collapse
No announcement yet.

Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutorial

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutorial

    These models use the same bios: Lenovo IdeaPad C340-15IML/FLEX-15IML/S340-15IML/S340-15IML Touch/S340-14IML Lenovo XiaoXin-15IML 2019/XiaoXin-14IML 2019

    Backup bios used for this tutorial https://www.badcaps.net/forum/showthread.php?t=97978 Post #13

    Extract & Edit.

    Download the lenovo update from - https://download.lenovo.com/consumer...s/crcn17ww.exe
    Extract the first exe using innoextract - https://constexpr.org/innoextract/#download
    Extract the second exe using 7-zip or winrar - https://www.7-zip.org/download.html

    Open the EL5C4109.ROM file with HxD hex editor - https://mh-nexus.de/en/downloads.php?product=HxD20

    Use the Text search by clicking on "Search" ,then "Find" and type in the word BIOSIMG .Click on the "OK" button.

    The line below BIOSIMG is the start of the new bios,put your cursor at the beginning of that line,then select "Edit" -> "Select Block" or right click and choose "Select Block".

    The "Start-offset" should be already set to 130AD0 as thats where you put the cursor.

    Next, click on the "Length" button and enter 1000000 (1 Million) into the white box and click on the "OK" button


    (1000000 in hex is 16MB).(some updates do not contain a full bios image,only a partial update)

    Select "Edit" -> "Copy" or right click anywhere in the highlighted Blue area and select "Copy".

    Next,select "File" -> "New" -> "Edit" -> "Paste insert" or right click inside the new file and select "Paste insert" .


    Select "File" -> "Save" and name the file with a .bin or .rom file extension, for example BIOS.BIN .Close the EL5C4109.ROM tab by right clicking on the tab and selecting Close ,or by clicking on the tab and selecting "File" -> "Close" . Keep the HxD window open with the new file.

    Copying the windows key and DMI from the old bios.

    Open your backup by selecting "File" -> "Open" or drag the old bios backup onto the HxD window.The new bios and backup should be side by side now on seperate tabs.

    Click on the backup tab, then "Search" -> "Find" .Click on the "Hex-values" tab,enter the following by typing in or copy/pasting into the white box and
    click ok:

    01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 1D 00 00 00



    You will see the key in plain text.You need to copy the hex on the left to include the dots and key on the right,note that there is one letter or number on the fourth line down on its own.Its all too easy to forget to copy that last one,the file length in hex will be 31 if you only copy the dots and key,its much easier to copy the whole line that its on,then the length will be 40 ,much easier to remember and guaranteed not to miss the last letter/number

    Right click and choose "Select block" (or use your cursor to select the 4 lines) ,set the "Start-offset" to 62D000 and the "End-offset" to 62D03F ,or click on the "Length" button and set to 40 and click OK .


    Next,choose "Edit" -> "Copy" ,click on the new bios tab,right click and choose "Select block" .Enter the same values as before,set the "Start-offset" to 62D000 and the "End-offset" to 62D03F ,or click on the "Length" button and set to 40 and click OK .

    Right click and select "Paste insert" or choose "Edit" -> "Paste insert" .Select "File" -> "Save" .

    Now we have to find the rest of the DMI info.Click back onto the backup tab,use the "Search" -> "Find" and enter the model number or lenovo into the Text-string white box.Set the search direction button to backward,forward or All and then click "ok".In th right side column you can see the word lenovo and some other numbers/DMI info.

    Set the start-offset to 520000 and the end-offset to 5207FF ,copy and paste-insert into the same start/end offset in the new bios ,then save .


    The reason for setting the offset to 5207FF will become clear when you see that the area in the new bios is all FF

    .You have to use your best judgement where the DMI should be set,its a matter of trial and error finding the offsets.
    With some models the DMI info is stored in the EC and there`s no need to copy it from the old backup.
    Attached Files
    Last edited by SMDFlea; 04-22-2023, 04:30 PM.
    All donations to badcaps are welcome, click on this link to donate. Thanks to all supporters

    #2
    Re: Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutori

    Well done, good job.
    Excellently written guide , should be on top as sticky thread.
    ----------------------------------------------------------------------------------------------------------------------------------------------------------
    All donations to Badcaps are welcome.
    Become a Badcaps supporter
    >>>>> click on this link to donate <<<<<
    Thanks to all supporters.​
    ----------------------------------------------------------------------------------------------------------------------------------------------------------
    Doctrina est fructus dulcis, radicis amarae.
    .

    Comment


      #3
      Re: Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutori

      thanks sir Ill try it for my slef

      Comment


        #4
        Re: Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutori

        thanks good job

        Comment


          #5
          Re: Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutori

          Do you have also for asus?

          Comment


            #6
            Re: Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutori

            Originally posted by kalilinux25 View Post
            Do you have also for asus?
            No not yet. There are some asus tools to add dmi ,but mostly its easier to use a hex editor and UEFITool https://www.badcaps.net/forum/showpo...43&postcount=5
            Last edited by SMDFlea; 03-03-2022, 10:11 AM.
            All donations to badcaps are welcome, click on this link to donate. Thanks to all supporters

            Comment


              #7
              Re: Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutori

              Originally posted by SMDFlea View Post
              No not yet. There are some asus tools to add dmi ,but mostly its easier to use a hex editor and UEFITool https://www.badcaps.net/forum/showpo...43&postcount=5
              Im new on creating my own bios, i though dmi is not very important. Another learning

              Comment


                #8
                Re: Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutori

                what if the old bios no longer exists, and can't copy the DMI? will the new bios not work?

                Comment


                  #9
                  Re: Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutori

                  Originally posted by wandy View Post
                  what if the old bios no longer exists, and can't copy the DMI? will the new bios not work?
                  Usually the system will work but obliviously you will loose original Serial no, Windows key etc and that will also cause software activation issues. Application software which uses system serial,UUID etc. for generating Machine ID may also stop working. Depending on the machine, you may also get an error message or warning message about invalid DMI on startup.

                  Comment


                    #10
                    Re: Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutori

                    perfect, thank you

                    Comment


                      #11
                      Re: Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutori

                      Thank you, SMDFlea, for sharing your knowledge

                      Comment


                        #12
                        Re: Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutori

                        uh OK how do you write the edited bios back in? insyde tools wont work and fptw wont work either-(protected range registers funhouse)I have B40-30 lenovo insyde bios thats I unlocked with uefi tool confirmed-Ive been trying to add nvme support for almost 2 years lol-I have full unlocked advanced tabs via keyboard sequence so I only need nvme boot support which Ive already modded-hardware programmed back in results in brick-Ive even hex edited and unlocked the bios of the stock bios and flashed back with stock tools after verifying h20 showing its still signed
                        any advice?
                        thanks

                        Comment


                          #13
                          Re: Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutori

                          Originally posted by chromecut View Post
                          uh OK how do you write the edited bios back in? insyde tools wont work and fptw wont work either-(protected range registers funhouse)I have B40-30 lenovo insyde bios thats I unlocked with uefi tool confirmed-Ive been trying to add nvme support for almost 2 years lol-I have full unlocked advanced tabs via keyboard sequence so I only need nvme boot support which Ive already modded-hardware programmed back in results in brick-Ive even hex edited and unlocked the bios of the stock bios and flashed back with stock tools after verifying h20 showing its still signed
                          any advice?
                          thanks
                          You`re off-topic it seems. You will have to use an SPI programmer.Anyone doing bios modding should know that flashing a modded bios back can result in a brick.

                          .
                          All donations to badcaps are welcome, click on this link to donate. Thanks to all supporters

                          Comment


                            #14
                            Re: Lenovo C340-15IML/FLEX-15IML/S340-15IML S340-14IML Bios Extract & DMI Edit Tutori

                            off topic? I would think any good tutorial would include procedure for flashing back edited bios-(excellent tutorial by the way) the sleep bug trick only works with versions before security change from oem-that verson for me is 933n30ww.exe which somebody(you?) posted a dump of not the .exe including signed bios
                            to be clear I am no noob and have manually edited many bios as well as flashed back with hardware programmer (I have 5 of them and every bios tool
                            imaginable) but hardware flashing ANY modded bios that breaks signature=brick
                            Ive managed to manually edit signed bios to unlock all fields (according to uefi tool) and flash that bios back with official insyde tools but any other edits after reboot results in=brick
                            from what I can tell the insyde flash tool AND the bios itself needs to be signed as I read official intel doc stating hardware flash even after blanking chip doesnt guarantee success
                            it could be the nvme mod itself as I noticed from newer insyde bios has smm&dxe "combo" type modules which my bios seems to support
                            extracting the nvme module with h20 and uefi and then comparing reveals difference between by one byte so Im unsure which nvme module version to use or where to place it (using h20 for my bios gives 4 fv choices and places it near the end (I chose FV#3 as other smmdxe resides there)and donor bios crams it in between 1p4 and ip6 so using h20 (which breaks the bios)

                            so my question is how to modify either newest oem or sleep bug bios for nvme support and then flash it back with either hardware, fptw or insyde flash package tool?
                            p.s I have followed your excellent guidance towards similar endeavers on different sites only to have the OP drop the ball and giving up before success
                            so after almost 2 years of trying you can imagine my frustration

                            any advice would be well recieved as I need to get back to my current projects of booting windows off a linux raid array, my special ramdisk driver that is persistent and fools windows thinkings its real hardware(Im getting 10,000gt/s) or my dual enterprise class m.2 adapter for pcie 4.0x8(12,000gt/s on that bad boy) that after modding works without bifurcation that Im going to release for alienware aurora R machines with x8 gimped pcie lanes

                            donation is not a problem
                            thanks

                            Comment

                            Working...
                            X