Skip to content

Commit

Permalink
Merge pull request #12 from MuertoGB/dev
Browse files Browse the repository at this point in the history
111 merge to main
  • Loading branch information
MuertoGB authored Sep 2, 2023
2 parents f281e30 + 187699f commit 4332402
Show file tree
Hide file tree
Showing 47 changed files with 1,197 additions and 826 deletions.
14 changes: 14 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-111">V1.1.1</a> •
<a href="#version-110">V1.1.0</a> •
<a href="#version-103">V1.0.3</a> •
<a href="#version-102">V1.0.2</a> •
Expand All @@ -16,6 +17,19 @@
<a href="#version-034">V0.3.4</a>
</p>

## Version 1.1.1

#### New:
- Added a new feature to the main window, allowing users to automatically create a backup of the loaded firmware as a zip archive (ALT + B). This feature offers users a convenient way to compress their firmware files for long term storage.

#### Enhancements:
- The settings window will now display the initial folder path.
- Added application icon to tool windows. These icons can be double-clicked to reset the position of the window, centring it to the main window.
- User Interface improvements.

#### Bugs:
- Fixed an issue where part of the main window's title area was unresponsive when attempting to drag the window.

## Version 1.1.0

#### New:
Expand Down
116 changes: 56 additions & 60 deletions MANUAL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h4 align="center">Mac EFI Toolkit Manual</h4>
<p align="center">
<a href="#main-window">Main Window</a> •
<a href="#firmware-editor-window">Firmware Editor Window</a>
<a href="#firmware-patcher">Firmware Patcher</a>
</p>

## Main Window
Expand All @@ -12,29 +12,49 @@ This section explains the main window and its functionality.
<img src="files/images/met.png">
</kbd>

The executable and main window of the application support drag and drop functionality for files. You can easily drag and drop files from explorer directly onto the application. However, it's important to note that this functionality will not work if the application is run as an administrator, this limitation is due to the way Windows processes drag and drop operations in elevated privileges.
The executable and main window of the application support drag and drop functionality for files, however, it's important to note that this feature not work if the application is run as an administrator, this limitation is due to the way Windows processes drag and drop operations in elevated privileges.

---

#### Title Area:
#### Main Buttons:

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

The current version of the application is displayed in this section. If there is a newer version available, the label will appear in orange. By clicking on the version number, you will be directed to the latest release in Github. The menu button opens the main menu, providing access to various options.
**'Open':**\
Prompts and open file dialog where you can choose and load a UEFI/BIOS file into the application.

---
**'Reset':**\
Unloads the currently loaded file and clears any buffers and data associated with it.

**'Copy':**\
Opens the copy menu, which enables quick copying of firmware data to the clipboard.

**'Patcher':**\
Opens the firmware patcher window. Alternatively, it can open the terms window, which must be accepted before access to the firmware patcher is granted.

#### Main Menu:
**'Settings':**\
Opens the settings window where you can modify various application settings.

**'About':**\
Opens the about window, providing information about the application and its version.

**'Three dots (More)':**\
Opens the overflow menu with various extra options:

#### Overflow menu:

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

**'Local Directory':**\
Opens the working directory where the executable is located.

**'Backups Directory':**\
Navigates to the Backups directory. This is the default location where zipped file backups are exported.

**'Builds Directory':**\
Navigates to the Builds directory within the working directory, this is where edited binaries are automatically saved.

Expand All @@ -44,21 +64,6 @@ Navigates to the Fsys Store directory within the working directory. This is the
**'ME Region Directory':**\
Navigates to the ME Region directory within the working directory. This is the default path where ME regions are exported.

**'View Application Log':**\
Opens the application log, if available, which contains details of any handled errors or relevant issues encountered during runtime.

**'Create a Debug Log':**\
Generates a debug text log (debug.log) in the working directory, which contains information useful for troubleshooting purposes.

**'Restart Application':**\
Closes the current instance of the application and launches a new one.

**'Settings':**\
Opens the settings window where you can modify various application settings.

**'About':**\
Opens the about window, providing information about the application and its version.

**'Changelog':**\
Opens a browser window directly to the application's changelog.

Expand All @@ -68,25 +73,14 @@ Opens a browser window to the application landing page.
**'Usage Manual':**\
Opens a browser window here, to the application manual.

----

#### Main Buttons:

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

**'OPEN':**\
By clicking the 'OPEN' button, you can choose and load a UEFI/BIOS file into the application.

**'RESET':**\
Clicking the 'RESET' button unloads the currently loaded file and clears any buffers and data associated with it.
**'Create a Debug Log':**\
Generates a debug text log (debug.log) in the working directory, which contains information useful for troubleshooting purposes.

**'COPY':**\
Clicking the 'COPY' button opens the copy menu, which enables quick copying of text fields to the clipboard.
**'View Application Log':**\
Opens the application log, if available, which contains details of any handled errors or relevant issues encountered during runtime.

**'EDITOR':**\
Clicking the 'EDITOR' button will open the firmware editor window. Alternatively, it can open the terms window, which must be accepted before access to the editor is granted.
**'Restart Application':**\
Closes the current instance of the application and launches a new one.

---

Expand All @@ -96,7 +90,9 @@ Clicking the 'EDITOR' button will open the firmware editor window. Alternatively
<img src="files/manual/file.png">
</kbd>

This section displays the name of the loaded file and includes two buttons. Clicking the 'Folder' button will open the file explorer and highlight the location of the loaded file. The 'Reload' button can be used to refresh the loaded file from disk in case any external changes have been made.
This section displays the name of the currently loaded file and includes three buttons.

Clicking the 'Explorer' button will open Windows Explorer at the location of the loaded file, with the file being highlighted. The 'Reload' button provides an option to reload the loaded file from disk in case any external changes have been made. Finally, the 'Backup' button triggers a "Save As" dialog, allowing you to create a backup of the loaded firmware as a zip archive.

---

Expand Down Expand Up @@ -155,41 +151,41 @@ First, the application retrieves the model identifier (e.g., IM161) from the UEF

---

#### Serial:
#### Fsys Store:

<kbd>
<img src="files/manual/serial.png">
<img src="files/manual/fsys.png">
</kbd>
<kbd>
<img src="files/manual/fsys_invalid.png">
</kbd>
<kbd>
<img src="files/manual/fsys_forced.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, and will be appended to the end of the serial data.
This section includes the checksum of the Fsys store and two buttons. If the CRC32 of the Fsys store is valid, the label will appear green and display the valid checksum. If the CRC32 is invalid, the label will appear red and display the invalid checksum. The presence of `[F]` appended to the checksum indicates the Fsys Store was force found by the application, and the firmware may be corrupt.

Clicking the "Wrench" button, which is enabled when the Fsys store checksum is invalid, will prompt a "Save As" dialog to export the binary file with a repaired Fsys CRC32 checksum. The "Save" button allows exporting of the Fsys store.

---

#### HWC:
#### Serial:

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

The Hardware Configuration Code (HWC) is located in the Fsys store and is derived from the System Serial Number (SSN). If the Serial Number is 11 characters long, the HWC will be 3 characters. If the Serial Number is 12 characters long, the HWC will be 4 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.

---

#### Fsys Store:
#### HWC:

<kbd>
<img src="files/manual/fsys.png">
</kbd>
<kbd>
<img src="files/manual/fsysinvalid.png">
</kbd>
<kbd>
<img src="files/manual/fsys_forced.png">
<img src="files/manual/hwc.png">
</kbd>

This section includes the checksum of the Fsys store and two buttons. If the CRC32 of the Fsys store is valid, the label will appear green and display the valid checksum. If the CRC32 is invalid, the label will appear red and display the invalid checksum. The presence of `[F]` appended to the checksum indicates the Fsys Store was force found by the application, and the firmware may be corrupt.

Clicking the "Wrench" button, which is enabled when the Fsys store checksum is invalid, will prompt a "Save As" dialog to export the binary file with a repaired Fsys CRC32 checksum. The "Save" button allows exporting of the 2048-byte (0x800h) Fsys store.
The Hardware Configuration Code (HWC) is located in the Fsys store and is derived from the System Serial Number (SSN). If the Serial Number is 11 characters long, the HWC will be 3 characters. If the Serial Number is 12 characters long, the HWC will be 4 characters.

---

Expand Down Expand Up @@ -291,12 +287,12 @@ Located at the bottom of the main window, the status bar serves multiple purpose

---

## Firmware Editor Window
## Firmware Patcher

This section explains the firmware editor window and its functionality.

<kbd>
<img src="files/images/met_editor.png">
<img src="files/images/firmware_patcher.png">
</kbd>

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

<h4 align="center">A tool for analysis of Mac BIOS/UEFI, with limited editing capabilities.</h4>
Expand All @@ -17,9 +17,11 @@ Mac EFI Toolkit V1.1.0

## About

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.
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.

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.
Key features of the information gathering capabilities include detecting EFI lock in the NVRAM, identifying if the APFS DXE driver is present; 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, the application allows users to replace the System Serial Number (SSN) with automatic Hardware Configuration (HWC) matching. It also supports transplanting of exported Fsys stores, as well as the clearing firmware settings, and EFI password lock if a customer has forgotten their password. When editing, Mac EFI Toolkit will automatically check, calculate, and mask the Fsys CRC32 if the checksum is invalid.

>🛈 **Access to some features requires accepting the editing terms.**
Expand All @@ -31,8 +33,9 @@ This application provides support for most Mac BIOS/UEFI, with the exception of

**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.
- Backup loaded firmware to a .zip file.
- Read Intel Flash Descriptor for UEFI section positions.
- Knuth–Morris–Pratt algorithm for binary data searching.
- View the Intel Management Engine version.
- Export and transplant the Intel Management Engine region.
- View and validate the binary size.
Expand All @@ -42,14 +45,15 @@ This application provides support for most Mac BIOS/UEFI, with the exception of
- 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.
- View the configuration code, derived from the System Serial Number (ssn).

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

**NVRAM:**
- Clear NVRAM stores (VSS, SVS, NSS) with section header preservation.
Expand Down Expand Up @@ -79,15 +83,15 @@ This application provides support for most Mac BIOS/UEFI, with the exception of

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

> 📋 View the full changelog [here](CHANGELOG.md)
## Requirements

**Application:**
- Microsoft [.NET Framework 4.8](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net48)
- Windows 7, 8, 8.1, 10. 32, or 64-bit
- Windows 7, 8, 8.1, 10 and 11. 32, or 64-bit
- Internet connectivity required for:-
> - Version Checking (Can be disabled in settings).
> - Fetching config code from the server when not present in the database.
Expand All @@ -102,7 +106,7 @@ This application provides support for most Mac BIOS/UEFI, with the exception of
LZMA [v22.01 SDK](https://www.7-zip.org/sdk.html), by Igor Pavlov.\
The [Knuth-Morris-Pratt algorithm](https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm), by Donald Knuth, James H. Morris, and Vaughan Pratt.\
[MacModelShelf](https://github.com/MagerValp/MacModelShelf) database, by MagerValp.\
Application icon by [Creatype](https://www.flaticon.com/free-icon/toolkit_6457096?term=toolkit&page=1&position=38&origin=search&related_id=6457096) on [Flaticon](https://www.flaticon.com).
Application icon by [Creatype](https://www.flaticon.com/free-icon/toolkit_6457096?term=toolkit&page=1&position=38&origin=search&related_id=6457096), menu icons by [afif-fudin](https://www.flaticon.com/authors/afif-fudin).

## Donate

Expand Down
11 changes: 6 additions & 5 deletions files/app/version.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?>
<data>
<MET>
<VersionString>1.1.0</VersionString>
<Build>230819.2142</Build>
<ReleaseDate>19.08.2023</ReleaseDate>
<VersionString>1.1.1</VersionString>
<Build>230902.0121</Build>
<ReleaseDate>02.09.2023</ReleaseDate>
<Channel>Stable</Channel>
<SHA256>2022040aff8c6d11356f426be8078dcb138b3a2db7784819ea2297a20bf4320c</SHA256>
<SHA256>c4b77627d620a411e31afae1bf76a9265af88c4ac6a3a45645a1d08161fc6b38</SHA256>
<VT>https://www.virustotal.com/gui/file-analysis/MmFmNzA4YzE1MDFlMmMwY2NkMTU1MTZkNzFlZmVhMzk6MTY5MzYxNTY0MQ==</VT>>
</MET>
</data>
Binary file added files/images/firmware_patcher.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.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 removed files/images/met_editor.png
Binary file not shown.
Binary file modified files/manual/file.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/fsys.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/fsys_forced.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/fsys_invalid.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/fsysinvalid.png
Binary file not shown.
Binary file modified files/manual/hwc.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/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 removed files/manual/mainmenu.png
Binary file not shown.
Binary file added files/manual/overflowmenu.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/title.png
Binary file not shown.
5 changes: 3 additions & 2 deletions mefit/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ internal struct METPath
{
internal static string CurrentDirectory = AppDomain.CurrentDomain.BaseDirectory;
internal static string FriendlyName = AppDomain.CurrentDomain.FriendlyName;
internal static string BackupsDirectory = Path.Combine(CurrentDirectory, "backups");
internal static string BuildsDirectory = Path.Combine(CurrentDirectory, "builds");
internal static string FsysDirectory = Path.Combine(CurrentDirectory, "fsys_stores");
internal static string MeDirectory = Path.Combine(CurrentDirectory, "me_regions");
internal static string BuildsDirectory = Path.Combine(CurrentDirectory, "builds");
internal static string SettingsFile = Path.Combine(CurrentDirectory, "Settings.ini");
internal static string DebugLog = Path.Combine(CurrentDirectory, "debug.log");
internal static string UnhandledLog = Path.Combine(CurrentDirectory, "unhandled.log");
}

internal struct METVersion
{
internal static readonly string Build = "230819.2142";
internal static readonly string Build = "230902.0121";
internal static readonly string Channel = "Stable";
}

Expand Down
4 changes: 2 additions & 2 deletions mefit/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.0")]
[assembly: AssemblyFileVersion("1.1.0")]
[assembly: AssemblyVersion("1.1.1")]
[assembly: AssemblyFileVersion("1.1.1")]
[assembly: NeutralResourcesLanguage("en")]
Loading

0 comments on commit 4332402

Please sign in to comment.