EFIver.py v1.5 released

Wait what? Another update? Yes indeed. But listen. The previous versions of EFIver.py where nothing more than a rewrite of a bash script, but the next latest update of EFIver.py (version 1.5) is an important update. It’s not only a rewrite of the first three versions of EFIver.py, but now it also reads the supported board-id’s from the actual firmware files. It will now also download installSeed.py for you (for people who haven’t already). Now take a look at the output:

          EFIver.py v1.5 Copyright (c) 2017 by Pike R. Alpha
          Mac-F2268CC8 |       iMac10,1 |   IM101.88Z.00CF.B00.1708080133
          Mac-F2268DAE |       iMac11,1 |   IM111.88Z.0037.B00.1708080241
          Mac-F2238AC8 |       iMac11,2 |   IM112.88Z.005B.B00.1708080439
  Mac-942B5BF58194151B |       iMac12,1 |   IM121.88Z.004D.B00.1708080012
  Mac-00BE6ED71E35EB86 |       iMac13,1 |   IM131.88Z.010F.B00.1708080805
  Mac-031B6874CF7F642A |       iMac14,1 |   IM141.88Z.0123.B00.1708211404
  Mac-27ADBB7B4CEE8E61 |       iMac14,2 |   IM142.88Z.0123.B00.1708211454
  Mac-77EB7D7DAF985301 |       iMac14,3 |   IM143.88Z.0123.B00.1708211454
  Mac-81E3E92DD6088272 |       iMac14,4 |   IM144.88Z.0183.B00.1708080656
  Mac-42FD25EABCABB274 |       iMac15,1 |   IM151.88Z.0211.B00.1708080656
  Mac-FA842E06C61E91C5 |       iMac15,1 |   IM151.88Z.0211.B00.1708080656
          Mac-F22C8AC8 |     MacBook6,1 |    MB61.88Z.00CB.B00.1708080203
          Mac-F22C89C8 |     MacBook7,1 |    MB71.88Z.003D.B00.1708080317
  Mac-942452F5819B1C1B |  MacBookAir3,1 |   MBA31.88Z.0067.B00.1708080355
  Mac-C08A6BB70A942AC2 |  MacBookAir4,1 |   MBA41.88Z.007B.B00.1708072159
  Mac-66F35F19FE2A0D05 |  MacBookAir5,1 |   MBA51.88Z.00F4.B00.1708080803
  Mac-35C1E88140C3E6CF |  MacBookAir6,1 |   MBA61.88Z.0103.B00.1708080653
  Mac-7DF21CB3ED6977E5 |  MacBookAir6,2 |   MBA61.88Z.0103.B00.1708080653
  Mac-C3EC7CD22292981F | MacBookPro10,1 |  MBP101.88Z.00F2.B00.1708080809
  Mac-AFD8A9D944EA4843 | MacBookPro10,2 |  MBP102.88Z.010B.B00.1708080805
  Mac-189A3D4F975D5FFC | MacBookPro11,1 |  MBP111.88Z.0142.B00.1708080655
  Mac-D1FF70AF6D8C849A |        Unknown |  MBP111.88Z.0142.B00.1708080655
  Mac-3CBD00234E554E41 | MacBookPro11,2 |  MBP112.88Z.0142.B00.1708080655
  Mac-2BD1B31983FE1663 | MacBookPro11,3 |  MBP112.88Z.0142.B00.1708080655
          Mac-F22589C8 |  MacBookPro6,1 |   MBP61.88Z.005A.B00.1708072217
          Mac-F222BEC8 |  MacBookPro7,1 |   MBP71.88Z.003D.B00.1708080058
  Mac-94245B3640C91C81 |  MacBookPro8,1 |   MBP81.88Z.004D.B00.1708080655
  Mac-4B7AC7E43945597E |  MacBookPro9,1 |   MBP91.88Z.00D7.B00.1708080744
          Mac-F2208EC8 |     Macmini4,1 |    MM41.88Z.0045.B00.1708072325
  Mac-8ED6AF5B48C039E1 |     Macmini5,1 |    MM51.88Z.007B.B00.1708080744
  Mac-031AEE4D24BFF0B1 |     Macmini6,1 |    MM61.88Z.010B.B00.1708080649
  Mac-35C5E08120C7EEAF |     Macmini7,1 |    MM71.88Z.0224.B00.1708080033
  Mac-F60DEB81FF30ACF6 |      MacPro6,1 |    MP61.88Z.0120.B00.1708080652
  Mac-A369DDC4E67F1C45 |       iMac16,1 |   IM161.88Z.0212.B00.1708080033
  Mac-FFE5EF870D7BA81A |       iMac16,2 |   IM162.88Z.0212.B00.1708080033
  Mac-DB15BD556843C820 |       iMac17,1 |   IM171.88Z.0110.B00.1708080012
  Mac-B809C3757DA9BB8D |       iMac17,1 |   IM171.88Z.0110.B00.1708080012
  Mac-65CE76090165799A |       iMac17,1 |   IM171.88Z.0110.B00.1708080012
  Mac-4B682C642B45593E |       iMac18,1 |   IM181.88Z.0151.B00.1708080034
  Mac-77F17D7DA9285301 |       iMac18,2 |   IM183.88Z.0151.B00.1708080034
> Mac-BE088AF8C5EB4FA2 |       iMac18,3 |   IM183.88Z.0151.B00.1708080034 <
  Mac-EE2EBD4B90B839A8 |    MacBook10,1 |   MB101.88Z.0154.B00.1708080122
  Mac-BE0E8AC46FE800CC |     MacBook8,1 |    MB81.88Z.0168.B00.1708080033
  Mac-F305150B0C7DEEEF |        Unknown |    MB81.88Z.0168.B00.1708080033
  Mac-9AE82516C7C6B903 |     MacBook9,1 |    MB91.88Z.0159.B00.1708080011
  Mac-9F18E312C5C2BF0B |  MacBookAir7,1 |   MBA71.88Z.0171.B00.1708072210
  Mac-937CB26E2E02BB01 |  MacBookAir7,2 |   MBA71.88Z.0171.B00.1708072210
  Mac-06F11FD93F0323C5 | MacBookPro11,4 |  MBP114.88Z.0177.B00.1708080033
  Mac-06F11F11946D27C5 | MacBookPro11,5 |  MBP114.88Z.0177.B00.1708080033
  Mac-E43C1C25D4880AD6 | MacBookPro12,1 |  MBP121.88Z.0171.B00.1708080033
  Mac-473D31EABEB93F9B | MacBookPro13,1 |  MBP131.88Z.0212.B00.1708080127
  Mac-66E35819EE2D0D05 | MacBookPro13,2 |  MBP132.88Z.0233.B00.1708080034
  Mac-1BDAB09B689867E2 |        Unknown |  MBP132.88Z.0233.B00.1708080034
  Mac-A5C67F76ED83108C | MacBookPro13,3 |  MBP133.88Z.0233.B00.1708080034
  Mac-B4831CEBD52A0C4C | MacBookPro14,1 |  MBP141.88Z.0167.B00.1708080034
  Mac-CAD6701F7CEA0921 | MacBookPro14,2 |  MBP142.88Z.0167.B00.1708080034
  Mac-551B86E5744E2388 | MacBookPro14,3 |  MBP143.88Z.0167.B00.1708080129
> WARNING: Your EFI ROM IM183.88Z.0058.B00.1705091711 is not up-to-date!! <

You may not spot the extra data right away, but this list is not only longer, but it is also a complete representation of the data in FirmwareUpdate.pkg

This version of EFIver.py will soon be made is now available. Need to do something for work first. Actually. No. That’s a lie. I first need my cappuccino. Then I can start doing some stuff for work 😉

Note: The warning was triggered by using fake EFI data. This is not a real world scenario. Hey. I had no other way to check it 😉

Tip: I got a tip from someone at a Github issue that people who are using python from homebrew, instead of the native version of python of macOS, should use this to launch the script:

/usr/bin/python efiver.py

15 thoughts on “EFIver.py v1.5 released

  1. Errors out on me:

    EFIver.py v1.5 Copyright (c) 2017 by Pike R. Alpha
    Traceback (most recent call last):
    File “./efiver.py”, line 384, in
    File “./efiver.py”, line 340, in main
    rawVersion, currentVersion, updateVersion = getEFIVersionsFromEFIUpdater()
    File “./efiver.py”, line 293, in getEFIVersionsFromEFIUpdater
    updateVersion = lines[2].split(‘: ‘)[1].strip(‘[ ]’)
    IndexError: list index out of range

    Edit: Forgot to mention in my last post that I was using v1.6. Did a git pull before my second try.

    Still errors out. What could be the reason for the RAW part not showing up?

    • Ah right. Let me make an educated guess. Your running a version of macOS without: /usr/libexec/efiupdater ?

      Or a version of macOS where efiupdater didn’t display the raw EFI version information.

      • This problem is resolved in efiver.py v1.6 The problem is that first line is missing. The output should be something like this:

        Raw EFI Version string: IM191.88Z.XXX.BXX.17XXXXXXXX
        EFI currentVersion: [00000000XXXXXXXX]
        EFI updateVersion : [00000000XXXXXXXX]

        Without all the X’s of course 😉

        Edit: It may output three lines, but instead of the Raw EFI version data, an empty line. You could check this by adding a print statement on line 347:

        lines = output.splitlines()
        print len(lines)

        If that shows 2 then the code should work, but if it shows a 3 then I need to have another look at it.

      • Problem seems to be line 353 where its supposed to get the update version. Inserted a print statement in

        def getEFIVersionsFromEFIUpdater():

        currentVersion = lines[1].split(‘: ‘)[1].strip(‘[ ]’)
        print (“Current EFI version “+currentVersion)
        updateVersion = lines[2].split(‘: ‘)[1].strip(‘[ ]’)
        print (“Update EFI “+updateVersion)

        To me it looks like getRawEFIVersion() doesn’t work as it is supposed to on my system as the output for currentVersion is actually the one I get from /usr/libexec/efiupdater.

        Just updated to 10.13.1 and the problem persists.

        Thank you for your time, pikeralpha!

      • Please try efiver.py v1.7 (take two).

        Edit: The problem is that you have two items/lines, instead of three, and without inserting a new one, nothing really changed.

  2. Hi, there is no issue with using homebrew’s version of python or any other version of python2. Or rather, your script doesn’t need to use just the macOS system version of python.

    Instead, you should simply mention your script has pyobjc as a dependency and running [sometimes sudo] pip install pyobjc will solve any issues. Then as long as they run your script directly, the #!/usr/bin/env python line will select whichever python the user has set their paths to use, as well as match whatever python they just installed pyobjc under.

    Anyway, neat script. It’s somewhat shocking to see you using something other than bash for scripting needs. I guess you’re digging python?

    • Hi,

      The script wasn’t ready for that. I had to change the shebang line. Which I did later on. Now it’s fine.

      Thanks. Yeah. My Python skill are rusty, to say the least. Time to get back at it. I had to do this anyway, for something else, and that was why I took 5-10 minutes a day to port some of my bash scripts. Turned out to be fun, again.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s