[Guide] How to flash a modded AMI UEFI BIOS

@kenshin_1997
Have you already tried to use an old UBU tool v1.79.xx?

| ASRock B450 Pro4 MOBO |

Hello World,

I’m seeking guidance.
I’ve attempted to follow several passages on this site now.

However, I’ve yet to be successful…

Purely modding the BIOS to enable Re-BAR on my capable RTX 2080. I was on the latest stable 8.02 iirc, downgraded to 4.50, now on [2-3.something] as I was trying to pass the security check that still plagues me with its presence…

So, I assume downgrading will not pass the security check [I’ve just attempted experimenting to see how it played out].

Nonetheless, I believe my issue lies with the Romflash tool [I need to download it still as I’ve bounced to various links, comments, other threads that have come to integrate with this one in unison]

Although, reading various walls of text that don’t relate to my board, going back and fourth/not assessing the process in one, rather, processing multiple methods, off the basis of [General Misc troubleshooting].

I don’t exactly have an A-B guide for the solution for this board. I certainly may have missed it as I’ve been searching and reading a multitude of threads, comments and the likes.

Therefore, I kindly ask for some clarification from a clear cutting soul who would like to enlighten me.

I modified everything I need atm.
A DXE patch to be inserted after the final DXE file of the volume under the main BIOS Image.

I can’t flash the modded BIOS.
I know this now as I’ve just recently seen comments around this.

However, it’s 05:30 currently….
which means I’m F :eyes: KEN tired…

So, I’ve decided to write in for some foreign aid as I predict to occur xD

I just need a clear set of instructions going forthwith.
A bullet point comment would suffix.
pun intended
Terrible one at that

Just so I’m not directed to various redirects that may not be clear as a lot is outdated.
I was hoping to find potentially redirects for a compiled 2022 guide or 2024 updated

Regardless, great work from the dedicated guys n’ gals here.

Keep up the great work!!

I’ll be on the lookout for a reply,

Thanks everyone for your time, and of course—
your efforts to the cause.

@Nameless
Welcome to the Win-Raid Forum!
Since I have a rather modern ASRock mainboard with an AMD chipset myself, I know about the problem to get a modded AMI Aptio V BIOS properly flashed. It is the mainboard manufacturer, who tries to prevent any manipulation of the BIOS by inserting a secret integrity check into the BIOS.
Did you already try to use the Flashrom/Flashprog tool (currently latest v1.3 can be found >here<)? You can find my Guide and a link within the start post of this thread. According to >this< page your mainboard model has not yet been tested.

Is there even a chance to flash modded BIOS on Asus nowadays? Should be based on AMI.

I tried it with patched GOP drivers for Intel graphics on an old Asus X99 via Bios flashback, no chance. Seems like there is some checksum check maybe with encapsulated BIOS .cap files.

It should be no problem, if
a) the BIOS is encapsulated (as *.CAP file) and
b) the mainboard supports the USB Flashback method.

I’ve not downloaded Flash yet, It was next on the cards [has to sleep though xD}

I’m assuming that I need to flash the modded BIOS and then that’s pretty much it.
Hopefully not an oversight here…

I was cast by bewilderment though, as I followed the ASRock specific section which still left a Flash Check Failure even after using UBU, removing the Security Tag Code within.
I presumed this was due to AMI 5 architecture present on my board, V opposed to IV which was catered towards IV boards when most of the initial discussion flourished, as it started back in 14’

If my board has not been tested, I believe that it should be no different as ASRock boards have been successful from users [from what I’ve seen, yourself included on IV boards and more recent boards like your X570 iirc]
One user I seen managed successfully and they had a B450M Pro4 or B450M Pro4 R2.0, very similar boards, one a revised model facelift and the other micro-ATX scaled down version

So, at a glance I’d assume they would function identically for the most part with some variation in areas.
Even at that, my specific board could be assumed to be easier/identical as it is the original variant pertaining to the configuration of these boards [could be 110% wrong with these assumptions though xD]

I’m still not aware of the tools I specifically need to utilise here.
I have unpacked the Mega archive published by @SoniX
However, I believe I only need to use certain tools from this depending on the board and its architecture.
I wasn’t sure If I’m meant to use MMT at all or a certain version or…
Also unsure on some comments referring to the process relating to this code snippet
{ FPTW64 -bios -f mod_bios.bin },
that’s to be used along with other snippets I have seen for the same application tool and/or others that either apply to me or don’t.

Hence why I mentioned I haven’t seen/maybe missed an up-to-date post/guide that is not obsolete to my specific scenario/board due to the elapsed duration of the thread to date, and comments that relate to different boards/processes/solutions/variations on board architecture.
Likewise the tools published to tackle specific issues for each board.

I’ll stop rambling on here xD

Just want to express my position/phase in the current entanglement that’s got me in a mental chokehold currently, and hopefully, provided information that’s transparent for yourself and others to understand so that we are 1:1 or at least close in order to tackle the issue, further meeting a solution thereafter.

Thank you for the initial response @Fernando greatly appreciated, Sir

AFUWINx64.exe looks like it works but it does nothing. Secure flash error

I attempted the commands:
Afuwinx64.exe P9X79.rom /GAN
AFUWINx64.exe P9X79.rom /P /B /GAN
AFUWINx64.exe P9X79.rom /P /B /GAN /R
AFUWINx64.exe1

AFU /GAN doesn’t work wit CAP files renamed to ROM…

I followed the step: Open the *.CAP file, do a right-click onto the listed “AMI Aptio capsule”, choose the option “Extract body…” and save it as *.ROM file. With the UEFITool .

Anyone that has modded their AM4 B450 MOBO/modified NvStarpsReBar.ffs
feel free to DM me to assist me if you are able to, thanks in advance!!

TL;DR - Is there anything different I should be using regarding Flash Programming Tool (v1.3) & any up-to-date steps/processes pertaining to this in 2025.

Again, I’m not entirely certain exactly the path to taken with my specific configuration due to the cluster of comments, updates, problems, and specific cases for specific components everyone has.

Just being ultra cautious here as a means of strictly doing what I need to do for myself so no unnecessary steps are applied to my situation.

Blockquote

  • Copy the Flashrom files named flashrom.exe and CWSDPMI.EXE into the root of the just created bootable USB Flash Drive.

  • Boot off the USB Flash Drive in LEGACY mode (CSM should be set within the mainboard BIOS to “ENABLED”).

  • Once you have access to the DOS image, type
    flashrom -p internal -r BACKUP.ROM
    and hit the “Enter” key. Wait until the process has been finished.
    You hopefully will see something like this on your desktop screen:

  • Now you can shut down your PC and remove the USB Flash Drive. Don’t forget to enter the BIOS during the next start of the PC and to restore your desired BOOT order and options.

  • The just created file named BACKUP.ROM is a clean complete BIOS Region dump of your mainboard and should be stored outside of your PC to be able to recover the original BIOS Region later on, if something should go wrong at any time.

Now you should use a copy of the backup.rom file as source for the UBU work updating the desired BIOS modules.

  • Once you have finished the desired UBU processing and saved the product as “BACKUP.ROM”, rename it to “MOD.ROM” and copy it onto the already previously used USB Flash Drive.

  • Boot off the USB Flash Drive in LEGACY mode again, type
    flashrom -p internal -w MOD.ROM
    and hit the “Enter” key.

Now wait until the erasing, flashing and verification process has been finished.
Users, who want to get a logfile about what exactly has been checked, detected and done by the tool, should execute the command with the suffix “ -o writelog.txt” (thanks to hancor for the info).

When mentioned to use FlashPrgTool v1.3, does the commands differ to FlashRomTool here?

as for the copying the program files:

  • Copy the Flashrom files named flashrom.exe and CWSDPMI.EXE into the root of the just created bootable USB Flash Drive.

is this the same process with FlashPrgTool?
I cannot find any .exe nor CWSDPMI.EXE files.
They are all H, C, SH, TMPL, RULES [file types]

@Nameless
Don’t expect any support from my side regarding your problem. Since I don’t have any own experience with the usage of the new “flashprog tool”, you should better ask the tool developer for help.
After having flashed the latest original BIOS into the chip of my ASRock X570 Pro4 I am not even able to create a proper BACKUP.ROM by using the Flashrom v1.2 Utilities, which worked fine with the same system before.
Meanwhile I have given up any intention to flash a modded BIOS into this rather modern ASRock X570 chipset mainboard. I don’t want to risk a bricked system.

1 Like

So, essentially it’s probable none work on modern boards.
Yeah, I just wasn’t sure exactly if Flashrom tool was dated now to Flashprogramming tool.

It’s frustrating as heck as this is solely for my GPU… The MOBO has 4G Decoding + Re-BAR support. Yet, I need to get past this secure check on ASRocks BIOS.

I don’t know if the manual removal of specific modules on the BIOS image files are necessary or not.
Currently on P3.60 [SMBIOS 3.2] as I rolled back in the hopes it would flash as standard initially.

When I first used UBU 1.79 I think, The file size never changed as per the security check function.
Now I tried to start fresh with another BIOS file drag the file over and drop it on to UBU.bat. However, time and time again it just seems to keep refering to the last file it scanned…

And when using UEFITool I have a message in the base text box stating:
{ FfsParser::performSecondPass: the last VTF appears inside compressed item, the image may be damaged }

Relative to Preformatted textsecCore_VolumeTopFile`

On bios downloads from ASRocks site, simply extracted from the zip to use the file in UEFITool and UBU respectfully.

No idea if I do anything with this either.

I read various discussion’s with @sonix @ket @Koekieezz If anyone can help at all, feel free to dm m, or [If you guys could direct me to someone else that may be better suited for this then please do] as it would be some super help, everything is appreciated!!

Thanks again @Fernando for some information about the X570 issues you had.

Hi, I,m looking for working afuwinx64.exe with /gan support. I tried so many version, not a single one /gan command works.

Instead of trying a lot of different afuwinx64.exe versions you should have done a look into the first post of this thread. There you will find the download link to the latest afuwinx64 version, which supports the " /gan" command.

Thanks, but i tried these download and it doesn´t work for me.

image

Where is the file “amigendrv64.sys” from that download…vanish?
All files in same folder, a folder on root disk preferable and CMD Admin.

EDIT: Yes, amifldrv64 is the Aptio IV version, the one i posted is the Aptio V, both are the required engine driver.

EDIT: Issue is on your side, check if Windows Security is blocking any vulnerable drivers, etc… something is wrong on your side and the driver is not loading.

What motherboard/Aptio Core version is this, you’re flashing?

1 Like

This file ( amigendrv64.sys ) isn´t implemented in the download of the first thread.There is only a file named “amifldrv64.sys”.

All files in the same folder and cmd prompt as admin

On root disk the same.
image

Asus Maximus Code IX z270
image

btw. the flashback button on the backside doesn´t work. I try to flsh the bios on this way, but the button never lights up.

Thats an AMI Aptio Core V…not IV, this utility version will not work with modern Aptio V bios files… theres no version with /GAN for it.
All this trouble because in none of your posts, you provide useful information on hardware and what were you trying to do… always the same BS.

USB BFB feature is a little “picky” with some USB disks, try different models and smallest ones…or board/function is damaged.
The BIOS file MUST be renamed according to the model, as stated in the user manual or will not work at all.
Over_n_OUT of here.

A post was split to a new topic: Error allocating memory afudos via FreeDos / MS-DOS? Same error both