Skip to content

Commit

Permalink
Merge pull request #11 from MuertoGB/dev
Browse files Browse the repository at this point in the history
110 merge to main
  • Loading branch information
MuertoGB authored Aug 19, 2023
2 parents 7fef5a6 + c9e3859 commit f281e30
Show file tree
Hide file tree
Showing 42 changed files with 1,321 additions and 990 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<h4 align="center">Version History</h4>
<p align="center">
<a href="#version-110">V1.1.0</a> •
<a href="#version-103">V1.0.3</a> •
<a href="#version-102">V1.0.2</a> •
<a href="#version-101">V1.0.1</a> •
Expand All @@ -15,6 +16,25 @@
<a href="#version-034">V0.3.4</a>
</p>

## Version 1.1.0

#### New:
- Introduced a new option in the main window that allows users to remove EFI Lock without clearing the SVS NVRAM store (ALT + L). This method offers a safer approach as it retains the SVS NVRAM data whilst only invalidating the Message Authentication Code (Use of this feature will require acceptance of the editing terms).
- Added dialog when text is copied via the main window copy menu.

#### Enhancements:
- Improved the Fsys parser by implementing dynamic reading of the Fsys store size. This improvement replaces the previous static approach of reading a hardcoded size of 0x800h (2048 bytes).
- Expanded functionality of the main window copy menu by introducing new options to copy the following data: File Size (Hex), Config Code, PDR base, ME base, and BIOS base.
- Reorganized some data in the main window user interface by relocating EFI Lock information to its own dedicated section.
- The main window will now display the length of a system serial number.
- Improved user interaction by enabling access to the main window application menu through a right-click action on the title area.
- Debug logs will now show the detected Fsys store size if a firmware is loaded and the Fsys store is present.
- Minor UI improvements.

#### Misc:
- Omitted display of the Intel Flash Image Tool version from the main window, while retaining its presence within the clipboard copy menu.
- Removed setting "Enable valid flash descriptor enforcement" from the application, as it is no longer required or relevant.

## Version 1.0.3

#### New:
Expand Down
31 changes: 17 additions & 14 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ First, the application retrieves the model identifier (e.g., IM161) from the UEF
<img src="files/manual/serial.png">
</kbd>

This section consists of the System Serial Number (SSN) located in the Fsys store, and one button. Clicking the 'Globe' button will open a browser window to EveryMac and automatically load in the serial number. A valid serial number will consist of either 11 or 12 characters.
This section consists of the System Serial Number (SSN) located in the Fsys store, and one button. Clicking the 'Globe' button will open a browser window to EveryMac and automatically load in the serial number. A valid serial number will consist of either 11 or 12 characters, and will be appended to the end of the serial data.

---

Expand Down Expand Up @@ -223,12 +223,25 @@ This section provides information about the firmware version, and includes one b
<img src="files/manual/nvram.png">
</kbd>
<kbd>
<img src="files/manual/nvramlocked.png">
<img src="files/manual/nvramalt.png">
</kbd>

This section is divided into four items. The first three items represent different NVRAM store types, indicating their status. Each store type will appear green when empty, white when data is present, and grey when the store is not found.
This section is divided into three items, representing different NVRAM store types, indicating their status. Each store type will appear green when empty, white when data is present, and grey when the store is not found.

The padlock item represents EFI Lock status. If the padlock icon is green and unlocked, it signifies that a Message Authentication Code (MAC) was not found, indicating that the EFI is likely not locked. Conversely, if the padlock icon is red and locked, it suggests that a Message Authentication Code (MAC) was found, indicating that the EFI is likely password locked.
---

#### EFI Lock:

<kbd>
<img src="files/manual/efilockunlocked.png">
</kbd>
<kbd>
<img src="files/manual/efilocklocked.png">
</kbd>

This section provides information about whether the loaded firmware is password locked with a Message Authentication Code (MAC), commonly known as "EFI Lock", and includes one button. If no 'MAC' is found the text "UNLOCKED" will be shown. If a 'MAC' is found the text "LOCKED" will show in red.

Clicking the "Unlock" button, which is enabled when the firmware is locked with a password, will prompt a "Save As" dialog to export the binary file with an invalidated Message Authentication Code, thus safely removing the EFI password and retaining the SVS store data.

---

Expand Down Expand Up @@ -258,16 +271,6 @@ The application provides information regarding the presence of the UEFI APFS DXE

---

#### FIT Version:

<kbd>
<img src="files/manual/fit.png">
</kbd>

Displays the Flash Image Tool version found in the Intel Management Engine firmware FPT header.

---

#### Intel ME:

<kbd>
Expand Down
64 changes: 31 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<h1 align="center">
<img width="200" src="files/images/img128px.png" alt="SMCFT Logo">
<br>
Mac EFI Toolkit V1.0.3
Mac EFI Toolkit V1.1.0
</h1>

<h4 align="center">A tool for analysis of Mac BIOS firmware, with limited editing capabilities.</h4>
<h4 align="center">A tool for analysis of Mac BIOS/UEFI, with limited editing capabilities.</h4>
<p align="center">
<a href="#about">About</a> •
<a href="#features">Features</a> •
Expand All @@ -17,71 +17,69 @@ Mac EFI Toolkit V1.0.3

## About

Mac EFI Toolkit, or 'mefit', is a valuable tool designed to aid technicians in repairing Mac BIOS/EFI files. It provides information gathering capabilities and limited editing functionality. Key features of the application include detecting EFI lock in the NVRAM, identifying the APFS DXE driver even if hidden in an LZMA compressed volume, validating file sizes and calculating size discrepancy bytes, and viewing the firmware version.
Mac EFI Toolkit, or 'mefit', is a valuable tool built to aid technicians in repairing Mac BIOS/UEFI. Designed to be compact, mefit provides information gathering capabilities and limited editing functionality. Key features of the application include detecting EFI lock in the NVRAM, identifying the APFS DXE driver even if located in an LZMA compressed volume, validating file sizes and calculating size discrepancy bytes, and viewing the firmware version.

In terms of editing, mefit allows users to replace the System Serial Number (SSN) with automatic Hardware Configuration (HWC) matching and CRC32 masking. It also supports transplanting of exported Fsys stores with automatic CRC32 masking, as well as the clearing firmware settings, and EFI password lock if a customer has forgotten their password.
In terms of editing, the application allows users to replace the System Serial Number (SSN) with automatic Hardware Configuration (HWC) matching and CRC32 masking. It also supports transplanting of exported Fsys stores with automatic CRC32 masking, as well as the clearing firmware settings, and EFI password lock if a customer has forgotten their password.

>🛈 **Access to some features requires accepting the editing terms.**
This application provides support for most Mac BIOS/UEFI, with the exception of the A1534 model (as of now). I continue to perform extensive testing on hundreds of firmwares to ensure compatibility and functionality. As new edge cases or exceptions are discovered, the application is updated accordingly to address them. This commitment to testing and updates ensures that the application remains reliable and effective for a wide range of Mac firmware configurations.

<img width="550" src="files/images/met.png" alt="MET">
<img width="550" src="files/images/met_alt.png" alt="MET_ALT">

This application provides support for most Mac BIOS/UEFI, with the exception of editing A1534 firmware (as of now). I continue to perform extensive testing on hundreds of firmwares to ensure compatibility and functionality. As new edge cases or exceptions are discovered, the application is updated accordingly to address them. This commitment to testing and updates ensures that the application remains reliable and effective for a wide range of Mac firmware configurations.

## Features

**General:**
- Edit copies of files in memory, preserving original files.
- Read Intel Descriptor for UEFI section base and limit positions.
- Utilize Knuth–Morris–Pratt algorithm for binary data search.
- View the Intel Management Engine version.
- Export and transplant the Intel Management Engine region.
- View and validate the binary size.
- View the firmware CRC32, created and modified date.

**Mac Specific:**
- View if the firmware supports APFS.
- View the firmware version.
- View Apple ROM section information.
- View the configuration code, derived from the system serial number.

**Fsys Store:**
- Export and replace the Fsys store.
- View and edit the System Serial Number (ssn), and Hardware Configuration (hwc).
- View the System Order Number (son).
- Export and replace the Fsys store.
- Detect and repair invalid Fsys Store CRC32.
- Check Serial Number with EveryMac.
- Check the System Serial Number with EveryMac.

**NVRAM:**
- Clear NVRAM stores (VSS, SVS, NSS) with section header preservation.
- Identify NVRAM stores with data, empty stores, and missing stores.
- Detect and remove EFI lock.

**Platform Data Region:**
- Read the Board-ID (UEFI version from 2013 onwards).

**Mac Specific:**
- Detect EFI password lock.
- Check APFS capability.
- View the firmware version.
- View Apple ROM section information.
- Derive Configuration Code from the Hardware Configuration (hwc).

**General:**
- Edit copies of files in memory, preserving original files.
- Read Intel Descriptor for UEFI section base and limit positions.
- Utilize Knuth–Morris–Pratt algorithm for binary data search.
- View Flash Image Tool and Management Engine versions.
- Export the Intel Management Engine region.
- Transplant the Intel Management Engine region.
- Validate binary size.
- Read the system Board-ID (UEFI version from 2013 onwards).

**Application:**

- Works with Wine (Better support coming in an update)
- Works with Wine (Better support coming in the future)
- Automatic handling of uncaught errors.
- Ability to create a debug log.
- No installation required.
- Support for DPI scaling.
- Drag and drop functionality.
- Version checking mechanism.
- Notification when a newer version is available.

| SUGGESTED FEATURES | Status |
|--------------------------------------------|-----------------------|
| Batch process files for information |🟢 Coming in an update |
| Invalidate EFI lock without clearing SVS |🟢 Coming in an update |
| Batch process files for information |🟢 Addition planned |
| Build clean firmware from FD |🟢 Addition planned |
| Detect email address in the NVRAM |🟠 Researching |
| Build clean firmware from FD |🟠 Researching |
| Detect MDM status |🔴 Undecided |

## Download

| Version| Release Date| Latest | Channel |
|--------|-------------|--------|---------|
|[1.0.3](https://github.com/MuertoGB/MacEfiToolkit/releases/latest)| 7th August, 2023 | Yes | Stable |
|[1.1.0](https://github.com/MuertoGB/MacEfiToolkit/releases/latest)| 19th August, 2023 | Yes | Stable |

> 📋 View the full changelog [here](CHANGELOG.md)
Expand Down
8 changes: 4 additions & 4 deletions files/app/version.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<data>
<MET>
<VersionString>1.0.3</VersionString>
<Build>1.0.3.230807.2023</Build>
<ReleaseDate>07.08.2023</ReleaseDate>
<VersionString>1.1.0</VersionString>
<Build>230819.2142</Build>
<ReleaseDate>19.08.2023</ReleaseDate>
<Channel>Stable</Channel>
<SHA256>5804dc0b606f72a8c982d08be4610c51ba1ad6b4a9e7272c0d6c279f2e4333d0</SHA256>
<SHA256>2022040aff8c6d11356f426be8078dcb138b3a2db7784819ea2297a20bf4320c</SHA256>
</MET>
</data>
Binary file modified files/images/met.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified files/images/met_alt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified files/manual/apfsdxe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified files/manual/apfslzma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified files/manual/apfsno.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified files/manual/boardid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/manual/efilocklocked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/manual/efilockunlocked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed files/manual/fit.png
Binary file not shown.
Binary file modified files/manual/mainbuttons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified files/manual/nvram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/manual/nvramalt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed files/manual/nvramlocked.png
Binary file not shown.
Binary file modified files/manual/serial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified files/manual/title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions mefit.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.33027.164
# Visual Studio Version 17
VisualStudioVersion = 17.6.33815.320
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mefit", "mefit\mefit.csproj", "{65F08BB6-5BE1-4159-A1C6-61A82297756A}"
EndProject
Expand Down
Loading

0 comments on commit f281e30

Please sign in to comment.