Files
vphone-cli/tests/FirmwarePatcherTests/VerboseJBDebug.swift
Managed via Tart d042596cc0 Complete Swift firmware patcher parity and CLI wiring
Run SwiftFormat on firmware patcher

Remove legacy Python firmware patchers

Fix compare pipeline pyimg4 PATH handling

Restore Python patchers and prefer fresh restore

Update BinaryBuffer.swift

Avoid double scanning in patcher apply

Prefer Python TXM site before fallback

Retarget TXM trustcache finder for 26.1

Remove legacy Python firmware patchers

Fail fast on nested virtualization hosts

Return nonzero on fatal boot startup

Add amfidont helper for signed boot binary

Stage AMFI boot args for next host reboot

Add host preflight for boot entitlements

Fail fast when boot entitlements are unavailable

Switch firmware patch targets to Swift CLI

Record real Swift firmware parity results

Verify Swift firmware pipeline end-to-end parity

Fix Swift firmware pipeline JB dry-run
2026-03-11 15:05:49 +08:00

39 lines
1.3 KiB
Swift

@testable import FirmwarePatcher
import Foundation
import Testing
struct VerboseJBDebug {
@Test func debugFailingPatches() throws {
let baseDir = URL(fileURLWithPath: #filePath)
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
.appendingPathComponent("ipsws/patch_refactor_input")
let data = try Data(contentsOf: baseDir.appendingPathComponent("raw_payloads/kernelcache.bin"))
let patcher = KernelJBPatcher(data: data, verbose: true)
// Initialize patcher state (same as findAll() but without running patches)
try patcher.parseMachO()
patcher.buildADRPIndex()
patcher.buildBLIndex()
patcher.buildSymbolTable()
patcher.findPanic()
print("=== HOOK CRED LABEL ===")
let r1 = patcher.patchHookCredLabelUpdateExecve()
print("Result: \(r1)")
print("\n=== TASK CONVERSION ===")
let r2 = patcher.patchTaskConversionEvalInternal()
print("Result: \(r2)")
print("\n=== BSD INIT AUTH ===")
let r3 = patcher.patchBsdInitAuth()
print("Result: \(r3)")
print("\n=== IOUC MACF ===")
let r4 = patcher.patchIoucFailedMacf()
print("Result: \(r4)")
}
}