mirror of
https://github.com/Lakr233/vphone-cli.git
synced 2026-09-05 09:04:27 +00:00
Snapshot the restored iOS userland and cloudOS kernel versions to restore-info.json at the bundle root so they are readable without booting the VM, rewritten after every successful restore (vm create and vm restore). Versions are read host-side from the bundle's iPhone*_Restore plists (iPhone-BuildManifest.plist for iOS, the hybrid BuildManifest.plist for cloudOS). vm list / vm info / --json surface them; the file lives at the bundle root so vm export carries it even when the IPSW dir is excluded. Co-authored-by: Claude Fable 5 <[email protected]>
18 lines
580 B
Swift
18 lines
580 B
Swift
import Foundation
|
|
|
|
public struct VPhoneBundleReport: Codable, Equatable, Sendable {
|
|
public let name: String
|
|
public let cpuCount: Int
|
|
public let memoryMB: Int
|
|
public let diskSizeBytes: Int64
|
|
public let restoreInfo: VPhoneRestoreInfo?
|
|
|
|
public init(bundle: VPhoneBundle) {
|
|
self.name = bundle.name
|
|
self.cpuCount = Int(bundle.manifest.cpuCount)
|
|
self.memoryMB = Int(bundle.manifest.memorySize / (1024 * 1024))
|
|
self.diskSizeBytes = bundle.diskSizeBytes
|
|
self.restoreInfo = VPhoneRestoreInfo.load(fromBundle: bundle)
|
|
}
|
|
}
|