Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Merge pull request #572 from 0xJacky/txm-precheck-admission

Jacky52ff1a54ddef
diff --cc VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift
index ad450e11,0b7a94b0..d793c1a5
--- a/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift
@@@ -2052,18 -1485,14 +2058,18 @@@ struct VPhoneCustomFirmwareInstaller
// cannot delete one.
try VPhoneSigner.sign(
fileAt: staged,
- options: .init(entitlements: data),
+ options: .init(entitlements: data, style: .appleAdHoc),
)
try system.replaceFile(target, fromFileAt: staged, mode: 0o755, owner: Self.guestOwner)
+ return true
}
- private func patchCampo(system: VPhoneConfinedDirectory, work: WorkDirectory) throws {
+ /// Returns whether the patch was applied (false when Campo or its
+ /// entitlements are absent, so the caller does not record it live).
+ @discardableResult
+ private func patchCampo(system: VPhoneConfinedDirectory, work: WorkDirectory, backupSafe: Bool) throws -> Bool {
let target = "Applications/Campo.app/Campo"
- guard let staged = try stageOptional(target, from: system, work: work, label: "Campo") else { return }
+ guard let staged = try stageOptional(target, from: system, work: work, label: "Campo") else { return false }
guard
let source = try VPhoneSigner.entitlements(ofFileAt: staged)
.first(where: { !$0.isEmpty })