Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work on EFI files in the ESP partition #3

Open
subvert0r opened this issue Sep 5, 2024 · 1 comment
Open

Doesn't work on EFI files in the ESP partition #3

subvert0r opened this issue Sep 5, 2024 · 1 comment

Comments

@subvert0r
Copy link

subvert0r commented Sep 5, 2024

I tried to use this tool on EFI files in the ESP partition by first mounting it using

mountvol x: /s

Then setting

    `<UpdateFile source="%CWD%\examples\EFI_Downgrade\UpdateFiles\bootmgfw.efi" destination="X:\EFI\Microsoft\Boot\bootmgfw.efi" />`

But it gives the following error:

[INFO] Starting Windows-Downdate
Traceback (most recent call last):
  File "windows_downdate.py", line 327, in <module>
    main()
  File "windows_downdate.py", line 306, in main
    update_files = parse_config_xml(args.config_xml)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "windows_downdate.py", line 222, in parse_config_xml
    update_file_obj = UpdateFile(source_file, destination_file)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "windows_downdate.py", line 46, in __init__
    raise FileNotFoundError(f"The file to update {self._destination_path_obj.full_path} does not exist")
FileNotFoundError: The file to update X:\EFI\Microsoft\Boot\bootmgfw.efi does not exist
[8904] Failed to execute script 'windows_downdate' due to unhandled exception!

Anyway to make it work with downgrading EFI files in the ESP partition?

Note that the file %CWD%\examples\EFI_Downgrade\UpdateFiles\bootmgfw.efi does exist, and X: is accessible, but it still gives this error.

@subvert0r subvert0r changed the title Doesn' Doesn't work on EFI files in the ESP partition Sep 5, 2024
@0xDeku
Copy link
Collaborator

0xDeku commented Sep 7, 2024

Hey :)
With files residing in the EFI system partition, there is a need to add to the Pending.xml what is called an Advanced Installer. This installer makes sure to mount and un-mount the partition during the update process. Currently Windows Downdate does not natively support advanced installers.

After mounting though you can overwrite the ESP boot manager by using the "copy" command, that should work as the ESP boot manager is not Trusted Installer enforced AFAIK, and also is not loaded in the system. Post overwriting, un-mount with committing changes and your boot manager should be the one used in the next boot.

Alternatively, if you know the right advanced installer for the boot manager you can craft the Pending.xml and then feed it into the pend_update function directly.

Let me know if there is anything else I can help with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants