Model the A6 crypto, interrupt, USB, and platform blocks needed to boot SecureROM through iBSS into iBEC Recovery. Add local lab identity, IMG3, and APTicket tooling, patched macOS recovery utilities, UART and GDB access, and English end-user documentation.
30 lines
910 B
PowerShell
30 lines
910 B
PowerShell
#Requires -RunAsAdministrator
|
|
[CmdletBinding()]
|
|
param()
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
$logPath = Join-Path $PSScriptRoot 'enable-test-mode.log'
|
|
|
|
$secureBoot = $null
|
|
try {
|
|
$secureBoot = Confirm-SecureBootUEFI
|
|
} catch {
|
|
Write-Verbose "Unable to read Secure Boot state: $($_.Exception.Message)"
|
|
}
|
|
|
|
$bcdOutput = & bcdedit.exe /set testsigning on 2>&1
|
|
$bcdOutput | Out-File -LiteralPath $logPath -Encoding utf8 -Force
|
|
if ($LASTEXITCODE -ne 0) {
|
|
if ($secureBoot -eq $true) {
|
|
throw 'Secure Boot blocks test-signing mode. Disable it in UEFI before trying again.'
|
|
}
|
|
throw "Unable to enable test-signing mode ($LASTEXITCODE)."
|
|
}
|
|
|
|
Write-Host 'Test-signing mode is enabled in the BCD.'
|
|
Write-Host 'Restart Windows before loading QemuA6Ude.sys.'
|
|
Add-Content -LiteralPath $logPath -Encoding utf8 -Value @(
|
|
'Test-signing mode is enabled in the BCD.',
|
|
'A Windows restart is required.'
|
|
)
|