jesonouyang commited on
Commit
c67647d
·
1 Parent(s): 3fe1b7f
Files changed (12) hide show
  1. .dockerignore +13 -0
  2. .gitignore +1 -0
  3. Dockerfile +56 -0
  4. README.md +209 -10
  5. compose.yml +15 -0
  6. config.plist +1890 -0
  7. kubernetes.yml +72 -0
  8. license.md +19 -0
  9. src/boot.sh +206 -0
  10. src/entry.sh +26 -0
  11. src/fetch.py +512 -0
  12. src/install.sh +166 -0
.dockerignore ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .dockerignore
2
+ .git
3
+ .github
4
+ .gitignore
5
+ .gitlab-ci.yml
6
+ .gitmodules
7
+ Dockerfile
8
+ Dockerfile.archive
9
+ compose.yml
10
+ compose.yaml
11
+ docker-compose.yml
12
+ docker-compose.yaml
13
+ *.md
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+
Dockerfile ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM --platform=$BUILDPLATFORM alpine:3.20 AS builder
2
+
3
+ ARG VERSION_OPENCORE="1.0.2"
4
+ ARG REPO_OPENCORE="https://github.com/acidanthera/OpenCorePkg"
5
+ ADD $REPO_OPENCORE/releases/download/$VERSION_OPENCORE/OpenCore-$VERSION_OPENCORE-RELEASE.zip /tmp/opencore.zip
6
+
7
+ RUN apk --update --no-cache add unzip && \
8
+ unzip /tmp/opencore.zip -d /tmp/oc && \
9
+ cp /tmp/oc/Utilities/macserial/macserial.linux /macserial && \
10
+ rm -rf /tmp/* /var/tmp/* /var/cache/apk/*
11
+
12
+ FROM scratch AS runner
13
+ COPY --from=qemux/qemu-docker:6.08 / /
14
+
15
+ ARG VERSION_ARG="0.0"
16
+ ARG VERSION_KVM_OPENCORE="v21"
17
+ ARG VERSION_OSX_KVM="326053dd61f49375d5dfb28ee715d38b04b5cd8e"
18
+ ARG REPO_OSX_KVM="https://raw.githubusercontent.com/kholia/OSX-KVM"
19
+ ARG REPO_KVM_OPENCORE="https://github.com/thenickdude/KVM-Opencore"
20
+
21
+ ARG DEBCONF_NOWARNINGS="yes"
22
+ ARG DEBIAN_FRONTEND="noninteractive"
23
+ ARG DEBCONF_NONINTERACTIVE_SEEN="true"
24
+
25
+ RUN set -eu && \
26
+ apt-get update && \
27
+ apt-get --no-install-recommends -y install \
28
+ xxd \
29
+ fdisk \
30
+ mtools \
31
+ python3 && \
32
+ apt-get clean && \
33
+ echo "$VERSION_ARG" > /run/version && \
34
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
35
+
36
+ COPY --chmod=755 ./src /run/
37
+ COPY --chmod=644 ./config.plist /
38
+ COPY --chmod=755 --from=builder /macserial /usr/local/bin/
39
+
40
+ ADD --chmod=644 \
41
+ $REPO_OSX_KVM/$VERSION_OSX_KVM/OVMF_CODE.fd \
42
+ $REPO_OSX_KVM/$VERSION_OSX_KVM/OVMF_VARS.fd \
43
+ $REPO_OSX_KVM/$VERSION_OSX_KVM/OVMF_VARS-1024x768.fd \
44
+ $REPO_OSX_KVM/$VERSION_OSX_KVM/OVMF_VARS-1920x1080.fd /usr/share/OVMF/
45
+
46
+ ADD $REPO_KVM_OPENCORE/releases/download/$VERSION_KVM_OPENCORE/OpenCore-$VERSION_KVM_OPENCORE.iso.gz /opencore.iso.gz
47
+
48
+ VOLUME /storage
49
+ EXPOSE 8006 5900
50
+
51
+ ENV VERSION="13"
52
+ ENV RAM_SIZE="4G"
53
+ ENV CPU_CORES="2"
54
+ ENV DISK_SIZE="64G"
55
+
56
+ ENTRYPOINT ["/usr/bin/tini", "-s", "/run/entry.sh"]
README.md CHANGED
@@ -1,10 +1,209 @@
1
- ---
2
- title: Macos
3
- emoji: 🚀
4
- colorFrom: blue
5
- colorTo: red
6
- sdk: docker
7
- pinned: false
8
- ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h1 align="center">OSX<br />
2
+ <div align="center">
3
+ <a href="https://github.com/dockur/macos/"><img src="https://github.com/dockur/macos/raw/master/.github/logo.png" title="Logo" style="max-width:100%;" width="128" /></a>
4
+ </div>
5
+ <div align="center">
6
+
7
+ [![Build]][build_url]
8
+ [![Version]][tag_url]
9
+ [![Size]][tag_url]
10
+ [![Package]][pkg_url]
11
+ [![Pulls]][hub_url]
12
+
13
+ </div></h1>
14
+
15
+ OSX (macOS) inside a Docker container.
16
+
17
+ ## Features ✨
18
+
19
+ - KVM acceleration
20
+ - Web-based viewer
21
+ - Automatic download
22
+
23
+ ## Usage 🐳
24
+
25
+ Via Docker Compose:
26
+
27
+ ```yaml
28
+ services:
29
+ macos:
30
+ image: dockurr/macos
31
+ container_name: macos
32
+ environment:
33
+ VERSION: "13"
34
+ devices:
35
+ - /dev/kvm
36
+ cap_add:
37
+ - NET_ADMIN
38
+ ports:
39
+ - 8006:8006
40
+ - 5900:5900/tcp
41
+ - 5900:5900/udp
42
+ stop_grace_period: 2m
43
+ ```
44
+
45
+ Via Docker CLI:
46
+
47
+ ```bash
48
+ docker run -it --rm -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/macos
49
+ ```
50
+
51
+ Via Kubernetes:
52
+
53
+ ```shell
54
+ kubectl apply -f https://raw.githubusercontent.com/dockur/macos/refs/heads/master/kubernetes.yml
55
+ ```
56
+
57
+ ## Compatibility ⚙️
58
+
59
+ | **Product** | **Platform** | |
60
+ |---|---|---|
61
+ | Docker Engine | Linux| ✅ |
62
+ | Docker Desktop | Linux | ❌ |
63
+ | Docker Desktop | macOS | ❌ |
64
+ | Docker Desktop | Windows 11 | ✅ |
65
+ | Docker Desktop | Windows 10 | ❌ |
66
+
67
+ ## FAQ 💬
68
+
69
+ ### How do I use it?
70
+
71
+ Very simple! These are the steps:
72
+
73
+ - Start the container and connect to [port 8006](http://localhost:8006) using your web browser.
74
+
75
+ - Choose `Disk Utility` and then select the largest `Apple Inc. VirtIO Block Media` disk.
76
+
77
+ - Click the `Erase` button to format the disk to APFS, and give it any recognizable name you like.
78
+
79
+ - Close the current window and proceed the installation by clicking `Reinstall macOS`.
80
+
81
+ - When prompted where you want to install it, select the disk you just created previously.
82
+
83
+ - After all files are copied, select your region, language, and account settings.
84
+
85
+ Enjoy your brand new machine, and don't forget to star this repo!
86
+
87
+ ### How do I select the macOS version?
88
+
89
+ By default, macOS 13 (Ventura) will be installed, as it offers the best performance.
90
+
91
+ But you can add the `VERSION` environment variable to your compose file, in order to specify an alternative macOS version to be downloaded:
92
+
93
+ ```yaml
94
+ environment:
95
+ VERSION: "13"
96
+ ```
97
+
98
+ Select from the values below:
99
+
100
+ | **Value** | **Version** | **Name** |
101
+ |-------------|----------------|------------------|
102
+ | `15` | macOS 15 | Sequoia |
103
+ | `14` | macOS 14 | Sonoma |
104
+ | `13` | macOS 13 | Ventura |
105
+ | `12` | macOS 12 | Monterey |
106
+ | `11` | macOS 11 | Big Sur |
107
+
108
+ ### How do I change the storage location?
109
+
110
+ To change the storage location, include the following bind mount in your compose file:
111
+
112
+ ```yaml
113
+ volumes:
114
+ - /var/osx:/storage
115
+ ```
116
+
117
+ Replace the example path `/var/osx` with the desired storage folder.
118
+
119
+ ### How do I change the size of the disk?
120
+
121
+ To expand the default size of 64 GB, add the `DISK_SIZE` setting to your compose file and set it to your preferred capacity:
122
+
123
+ ```yaml
124
+ environment:
125
+ DISK_SIZE: "256G"
126
+ ```
127
+
128
+ > [!TIP]
129
+ > This can also be used to resize the existing disk to a larger capacity without any data loss.
130
+
131
+ ### How do I change the amount of CPU or RAM?
132
+
133
+ By default, the container will be allowed to use a maximum of 2 CPU cores and 4 GB of RAM.
134
+
135
+ If you want to adjust this, you can specify the desired amount using the following environment variables:
136
+
137
+ ```yaml
138
+ environment:
139
+ RAM_SIZE: "8G"
140
+ CPU_CORES: "4"
141
+ ```
142
+
143
+ ### How do I pass-through a USB device?
144
+
145
+ To pass-through a USB device, first lookup its vendor and product id via the `lsusb` command, then add them to your compose file like this:
146
+
147
+ ```yaml
148
+ environment:
149
+ ARGUMENTS: "-device usb-host,vendorid=0x1234,productid=0x1234"
150
+ devices:
151
+ - /dev/bus/usb
152
+ ```
153
+
154
+ ### How do I verify if my system supports KVM?
155
+
156
+ Only Linux and Windows 11 support KVM virtualization, macOS and Windows 10 do not unfortunately.
157
+
158
+ You can run the following commands in Linux to check your system:
159
+
160
+ ```bash
161
+ sudo apt install cpu-checker
162
+ sudo kvm-ok
163
+ ```
164
+
165
+ If you receive an error from `kvm-ok` indicating that KVM cannot be used, please check whether:
166
+
167
+ - the virtualization extensions (`Intel VT-x` or `AMD SVM`) are enabled in your BIOS.
168
+
169
+ - you enabled "nested virtualization" if you are running the container inside a virtual machine.
170
+
171
+ - you are not using a cloud provider, as most of them do not allow nested virtualization for their VPS's.
172
+
173
+ If you do not receive any error from `kvm-ok` but the container still complains about KVM, please check whether:
174
+
175
+ - you are not using "Docker Desktop for Linux" as it does not support KVM, instead make use of Docker Engine directly.
176
+
177
+ - it could help to add `privileged: true` to your compose file (or `sudo` to your `docker run` command), to rule out any permission issue.
178
+
179
+ ### How do I run Windows in a container?
180
+
181
+ You can use [dockur/windows](https://github.com/dockur/windows) for that. It shares many of the same features, and even has completely automatic installation.
182
+
183
+ ### Is this project legal?
184
+
185
+ Yes, this project contains only open-source code and does not distribute any copyrighted material. Neither does it try to circumvent any copyright protection measures. So under all applicable laws, this project will be considered legal.
186
+
187
+ However, by installing Apple's macOS, you must accept their end-user license agreement, which does not permit installation on non-official hardware. So only run this container on hardware sold by Apple, as any other use will be a violation of their terms and conditions.
188
+
189
+ ## Acknowledgements 🙏
190
+
191
+ Special thanks to [seitenca](https://github.com/seitenca), this project would not exist without her invaluable work.
192
+
193
+ ## Stars 🌟
194
+ [![Stars](https://starchart.cc/dockur/macos.svg?variant=adaptive)](https://starchart.cc/dockur/macos)
195
+
196
+ ## Disclaimer ⚖️
197
+
198
+ *Only run this container on Apple hardware, any other use is not permitted by their EULA. The product names, logos, brands, and other trademarks referred to within this project are the property of their respective trademark holders. This project is not affiliated, sponsored, or endorsed by Apple Inc.*
199
+
200
+ [build_url]: https://github.com/dockur/macos/
201
+ [hub_url]: https://hub.docker.com/r/dockurr/macos/
202
+ [tag_url]: https://hub.docker.com/r/dockurr/macos/tags
203
+ [pkg_url]: https://github.com/dockur/macos/pkgs/container/macos
204
+
205
+ [Build]: https://github.com/dockur/macos/actions/workflows/build.yml/badge.svg
206
+ [Size]: https://img.shields.io/docker/image-size/dockurr/macos/latest?color=066da5&label=size
207
+ [Pulls]: https://img.shields.io/docker/pulls/dockurr/macos.svg?style=flat&label=pulls&logo=docker
208
+ [Version]: https://img.shields.io/docker/v/dockurr/macos/latest?arch=amd64&sort=semver&color=066da5
209
+ [Package]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fipitio.github.io%2Fbackage%2Fdockur%2Fmacos%2Fmacos.json&query=%24.downloads&logo=github&style=flat&color=066da5&label=pulls
compose.yml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ services:
2
+ osx:
3
+ image: dockurr/macos
4
+ container_name: macos
5
+ environment:
6
+ VERSION: "13"
7
+ devices:
8
+ - /dev/kvm
9
+ cap_add:
10
+ - NET_ADMIN
11
+ ports:
12
+ - 8006:8006
13
+ - 5900:5900/tcp
14
+ - 5900:5900/udp
15
+ stop_grace_period: 2m
config.plist ADDED
@@ -0,0 +1,1890 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>ACPI</key>
6
+ <dict>
7
+ <key>Add</key>
8
+ <array>
9
+ <dict>
10
+ <key>Comment</key>
11
+ <string>My custom DSDT</string>
12
+ <key>Enabled</key>
13
+ <false/>
14
+ <key>Path</key>
15
+ <string>DSDT.aml</string>
16
+ </dict>
17
+ <dict>
18
+ <key>Comment</key>
19
+ <string>My custom SSDT</string>
20
+ <key>Enabled</key>
21
+ <false/>
22
+ <key>Path</key>
23
+ <string>SSDT-1.aml</string>
24
+ </dict>
25
+ <dict>
26
+ <key>Comment</key>
27
+ <string>Read the comment in dsl sample</string>
28
+ <key>Enabled</key>
29
+ <false/>
30
+ <key>Path</key>
31
+ <string>SSDT-ALS0.aml</string>
32
+ </dict>
33
+ <dict>
34
+ <key>Comment</key>
35
+ <string>Read the comment in dsl sample</string>
36
+ <key>Enabled</key>
37
+ <false/>
38
+ <key>Path</key>
39
+ <string>SSDT-AWAC-DISABLE.aml</string>
40
+ </dict>
41
+ <dict>
42
+ <key>Comment</key>
43
+ <string>Read the comment in dsl sample</string>
44
+ <key>Enabled</key>
45
+ <false/>
46
+ <key>Path</key>
47
+ <string>SSDT-BRG0.aml</string>
48
+ </dict>
49
+ <dict>
50
+ <key>Comment</key>
51
+ <string>Read the comment in dsl sample</string>
52
+ <key>Enabled</key>
53
+ <false/>
54
+ <key>Path</key>
55
+ <string>SSDT-EC-USBX.aml</string>
56
+ </dict>
57
+ <dict>
58
+ <key>Comment</key>
59
+ <string>Fake EC and USBX Power</string>
60
+ <key>Enabled</key>
61
+ <true/>
62
+ <key>Path</key>
63
+ <string>SSDT-EC.aml</string>
64
+ </dict>
65
+ <dict>
66
+ <key>Comment</key>
67
+ <string>Read the comment in dsl sample</string>
68
+ <key>Enabled</key>
69
+ <false/>
70
+ <key>Path</key>
71
+ <string>SSDT-EHCx-DISABLE.aml</string>
72
+ </dict>
73
+ <dict>
74
+ <key>Comment</key>
75
+ <string>Read the comment in dsl sample</string>
76
+ <key>Enabled</key>
77
+ <false/>
78
+ <key>Path</key>
79
+ <string>SSDT-IMEI.aml</string>
80
+ </dict>
81
+ <dict>
82
+ <key>Comment</key>
83
+ <string>CPU AGPM Plugin=1</string>
84
+ <key>Enabled</key>
85
+ <true/>
86
+ <key>Path</key>
87
+ <string>SSDT-PLUG.aml</string>
88
+ </dict>
89
+ <dict>
90
+ <key>Comment</key>
91
+ <string>Read the comment in dsl sample</string>
92
+ <key>Enabled</key>
93
+ <false/>
94
+ <key>Path</key>
95
+ <string>SSDT-PMC.aml</string>
96
+ </dict>
97
+ <dict>
98
+ <key>Comment</key>
99
+ <string>Read the comment in dsl sample</string>
100
+ <key>Enabled</key>
101
+ <false/>
102
+ <key>Path</key>
103
+ <string>SSDT-PNLF.aml</string>
104
+ </dict>
105
+ <dict>
106
+ <key>Comment</key>
107
+ <string>Read the comment in dsl sample</string>
108
+ <key>Enabled</key>
109
+ <false/>
110
+ <key>Path</key>
111
+ <string>SSDT-RTC0-RANGE.aml</string>
112
+ </dict>
113
+ <dict>
114
+ <key>Comment</key>
115
+ <string>Read the comment in dsl sample</string>
116
+ <key>Enabled</key>
117
+ <false/>
118
+ <key>Path</key>
119
+ <string>SSDT-RTC0.aml</string>
120
+ </dict>
121
+ <dict>
122
+ <key>Comment</key>
123
+ <string>Read the comment in dsl sample</string>
124
+ <key>Enabled</key>
125
+ <false/>
126
+ <key>Path</key>
127
+ <string>SSDT-SBUS-MCHC.aml</string>
128
+ </dict>
129
+ <dict>
130
+ <key>Comment</key>
131
+ <string>Read the comment in dsl sample</string>
132
+ <key>Enabled</key>
133
+ <false/>
134
+ <key>Path</key>
135
+ <string>SSDT-UNC.aml</string>
136
+ </dict>
137
+ <dict>
138
+ <key>Comment</key>
139
+ <string>add DTGP method</string>
140
+ <key>Enabled</key>
141
+ <true/>
142
+ <key>Path</key>
143
+ <string>SSDT-DTGP.aml</string>
144
+ </dict>
145
+ <dict>
146
+ <key>Comment</key>
147
+ <string>USB 2.0 Injection</string>
148
+ <key>Enabled</key>
149
+ <true/>
150
+ <key>Path</key>
151
+ <string>SSDT-EHCI.aml</string>
152
+ </dict>
153
+ </array>
154
+ <key>Delete</key>
155
+ <array>
156
+ <dict>
157
+ <key>All</key>
158
+ <false/>
159
+ <key>Comment</key>
160
+ <string>Delete CpuPm</string>
161
+ <key>Enabled</key>
162
+ <false/>
163
+ <key>OemTableId</key>
164
+ <data>Q3B1UG0AAAA=</data>
165
+ <key>TableLength</key>
166
+ <integer>0</integer>
167
+ <key>TableSignature</key>
168
+ <data>U1NEVA==</data>
169
+ </dict>
170
+ <dict>
171
+ <key>All</key>
172
+ <false/>
173
+ <key>Comment</key>
174
+ <string>Delete Cpu0Ist</string>
175
+ <key>Enabled</key>
176
+ <false/>
177
+ <key>OemTableId</key>
178
+ <data>Q3B1MElzdAA=</data>
179
+ <key>TableLength</key>
180
+ <integer>0</integer>
181
+ <key>TableSignature</key>
182
+ <data>U1NEVA==</data>
183
+ </dict>
184
+ </array>
185
+ <key>Patch</key>
186
+ <array>
187
+ <dict>
188
+ <key>Base</key>
189
+ <string></string>
190
+ <key>BaseSkip</key>
191
+ <integer>0</integer>
192
+ <key>Comment</key>
193
+ <string>Replace one byte sequence with another</string>
194
+ <key>Count</key>
195
+ <integer>0</integer>
196
+ <key>Enabled</key>
197
+ <false/>
198
+ <key>Find</key>
199
+ <data>ESIzRA==</data>
200
+ <key>Limit</key>
201
+ <integer>0</integer>
202
+ <key>Mask</key>
203
+ <data></data>
204
+ <key>OemTableId</key>
205
+ <data></data>
206
+ <key>Replace</key>
207
+ <data>RDMiEQ==</data>
208
+ <key>ReplaceMask</key>
209
+ <data></data>
210
+ <key>Skip</key>
211
+ <integer>0</integer>
212
+ <key>TableLength</key>
213
+ <integer>0</integer>
214
+ <key>TableSignature</key>
215
+ <data></data>
216
+ </dict>
217
+ <dict>
218
+ <key>Base</key>
219
+ <string>\_SB.PCI0.LPCB.HPET</string>
220
+ <key>BaseSkip</key>
221
+ <integer>0</integer>
222
+ <key>Comment</key>
223
+ <string>HPET _CRS to XCRS</string>
224
+ <key>Count</key>
225
+ <integer>1</integer>
226
+ <key>Enabled</key>
227
+ <false/>
228
+ <key>Find</key>
229
+ <data>X0NSUw==</data>
230
+ <key>Limit</key>
231
+ <integer>0</integer>
232
+ <key>Mask</key>
233
+ <data></data>
234
+ <key>OemTableId</key>
235
+ <data></data>
236
+ <key>Replace</key>
237
+ <data>WENSUw==</data>
238
+ <key>ReplaceMask</key>
239
+ <data></data>
240
+ <key>Skip</key>
241
+ <integer>0</integer>
242
+ <key>TableLength</key>
243
+ <integer>0</integer>
244
+ <key>TableSignature</key>
245
+ <data></data>
246
+ </dict>
247
+ </array>
248
+ <key>Quirks</key>
249
+ <dict>
250
+ <key>FadtEnableReset</key>
251
+ <false/>
252
+ <key>NormalizeHeaders</key>
253
+ <false/>
254
+ <key>RebaseRegions</key>
255
+ <false/>
256
+ <key>ResetHwSig</key>
257
+ <false/>
258
+ <key>ResetLogoStatus</key>
259
+ <true/>
260
+ <key>SyncTableIds</key>
261
+ <false/>
262
+ </dict>
263
+ </dict>
264
+ <key>Booter</key>
265
+ <dict>
266
+ <key>MmioWhitelist</key>
267
+ <array/>
268
+ <key>Patch</key>
269
+ <array/>
270
+ <key>Quirks</key>
271
+ <dict>
272
+ <key>AllowRelocationBlock</key>
273
+ <false/>
274
+ <key>AvoidRuntimeDefrag</key>
275
+ <true/>
276
+ <key>DevirtualiseMmio</key>
277
+ <false/>
278
+ <key>DisableSingleUser</key>
279
+ <false/>
280
+ <key>DisableVariableWrite</key>
281
+ <false/>
282
+ <key>DiscardHibernateMap</key>
283
+ <false/>
284
+ <key>EnableSafeModeSlide</key>
285
+ <true/>
286
+ <key>EnableWriteUnprotector</key>
287
+ <true/>
288
+ <key>FixupAppleEfiImages</key>
289
+ <false/>
290
+ <key>ForceBooterSignature</key>
291
+ <false/>
292
+ <key>ForceExitBootServices</key>
293
+ <false/>
294
+ <key>ProtectMemoryRegions</key>
295
+ <false/>
296
+ <key>ProtectSecureBoot</key>
297
+ <false/>
298
+ <key>ProtectUefiServices</key>
299
+ <false/>
300
+ <key>ProvideCustomSlide</key>
301
+ <true/>
302
+ <key>ProvideMaxSlide</key>
303
+ <integer>0</integer>
304
+ <key>RebuildAppleMemoryMap</key>
305
+ <false/>
306
+ <key>ResizeAppleGpuBars</key>
307
+ <integer>-1</integer>
308
+ <key>SetupVirtualMap</key>
309
+ <false/>
310
+ <key>SignalAppleOS</key>
311
+ <false/>
312
+ <key>SyncRuntimePermissions</key>
313
+ <false/>
314
+ </dict>
315
+ </dict>
316
+ <key>DeviceProperties</key>
317
+ <dict>
318
+ <key>Add</key>
319
+ <dict>
320
+ <key>PciRoot(0x1)/Pci(0x1F,0x0)</key>
321
+ <dict>
322
+ <key>compatible</key>
323
+ <string>pci8086,2916</string>
324
+ <key>device-id</key>
325
+ <data>
326
+ FikA
327
+ </data>
328
+ <key>name</key>
329
+ <string>pci8086,2916</string>
330
+ </dict>
331
+ </dict>
332
+ <key>Delete</key>
333
+ <dict/>
334
+ </dict>
335
+ <key>Kernel</key>
336
+ <dict>
337
+ <key>Add</key>
338
+ <array>
339
+ <dict>
340
+ <key>Arch</key>
341
+ <string>Any</string>
342
+ <key>BundlePath</key>
343
+ <string>Lilu.kext</string>
344
+ <key>Comment</key>
345
+ <string>Patch engine</string>
346
+ <key>Enabled</key>
347
+ <true/>
348
+ <key>ExecutablePath</key>
349
+ <string>Contents/MacOS/Lilu</string>
350
+ <key>MaxKernel</key>
351
+ <string></string>
352
+ <key>MinKernel</key>
353
+ <string>8.0.0</string>
354
+ <key>PlistPath</key>
355
+ <string>Contents/Info.plist</string>
356
+ </dict>
357
+ <dict>
358
+ <key>Arch</key>
359
+ <string>Any</string>
360
+ <key>BundlePath</key>
361
+ <string>VirtualSMC.kext</string>
362
+ <key>Comment</key>
363
+ <string>SMC emulator</string>
364
+ <key>Enabled</key>
365
+ <false/>
366
+ <key>ExecutablePath</key>
367
+ <string>Contents/MacOS/VirtualSMC</string>
368
+ <key>MaxKernel</key>
369
+ <string></string>
370
+ <key>MinKernel</key>
371
+ <string>8.0.0</string>
372
+ <key>PlistPath</key>
373
+ <string>Contents/Info.plist</string>
374
+ </dict>
375
+ <dict>
376
+ <key>Arch</key>
377
+ <string>x86_64</string>
378
+ <key>BundlePath</key>
379
+ <string>WhateverGreen.kext</string>
380
+ <key>Comment</key>
381
+ <string>Video patches</string>
382
+ <key>Enabled</key>
383
+ <true/>
384
+ <key>ExecutablePath</key>
385
+ <string>Contents/MacOS/WhateverGreen</string>
386
+ <key>MaxKernel</key>
387
+ <string></string>
388
+ <key>MinKernel</key>
389
+ <string>10.0.0</string>
390
+ <key>PlistPath</key>
391
+ <string>Contents/Info.plist</string>
392
+ </dict>
393
+ <dict>
394
+ <key>Arch</key>
395
+ <string>Any</string>
396
+ <key>BundlePath</key>
397
+ <string>AppleALC.kext</string>
398
+ <key>Comment</key>
399
+ <string>Audio patches</string>
400
+ <key>Enabled</key>
401
+ <true/>
402
+ <key>ExecutablePath</key>
403
+ <string>Contents/MacOS/AppleALC</string>
404
+ <key>MaxKernel</key>
405
+ <string></string>
406
+ <key>MinKernel</key>
407
+ <string>8.0.0</string>
408
+ <key>PlistPath</key>
409
+ <string>Contents/Info.plist</string>
410
+ </dict>
411
+ <dict>
412
+ <key>Arch</key>
413
+ <string>x86_64</string>
414
+ <key>BundlePath</key>
415
+ <string>IntelMausi.kext</string>
416
+ <key>Comment</key>
417
+ <string>Intel Ethernet LAN</string>
418
+ <key>Enabled</key>
419
+ <false/>
420
+ <key>ExecutablePath</key>
421
+ <string>Contents/MacOS/IntelMausi</string>
422
+ <key>MaxKernel</key>
423
+ <string></string>
424
+ <key>MinKernel</key>
425
+ <string>13.0.0</string>
426
+ <key>PlistPath</key>
427
+ <string>Contents/Info.plist</string>
428
+ </dict>
429
+ <dict>
430
+ <key>Arch</key>
431
+ <string>x86_64</string>
432
+ <key>BundlePath</key>
433
+ <string>Legacy_USB3.kext</string>
434
+ <key>Comment</key>
435
+ <string>XHC ports configuration</string>
436
+ <key>Enabled</key>
437
+ <false/>
438
+ <key>ExecutablePath</key>
439
+ <string></string>
440
+ <key>MaxKernel</key>
441
+ <string></string>
442
+ <key>MinKernel</key>
443
+ <string>15.0.0</string>
444
+ <key>PlistPath</key>
445
+ <string>Contents/Info.plist</string>
446
+ </dict>
447
+ <dict>
448
+ <key>Arch</key>
449
+ <string>x86_64</string>
450
+ <key>BundlePath</key>
451
+ <string>MCEReporterDisabler.kext</string>
452
+ <key>Comment</key>
453
+ <string>AppleMCEReporter disabler</string>
454
+ <key>Enabled</key>
455
+ <true/>
456
+ <key>ExecutablePath</key>
457
+ <string></string>
458
+ <key>MaxKernel</key>
459
+ <string></string>
460
+ <key>MinKernel</key>
461
+ <string>19.0.0</string>
462
+ <key>PlistPath</key>
463
+ <string>Contents/Info.plist</string>
464
+ </dict>
465
+ <dict>
466
+ <key>Arch</key>
467
+ <string>x86_64</string>
468
+ <key>BundlePath</key>
469
+ <string>VoodooPS2Controller.kext</string>
470
+ <key>Comment</key>
471
+ <string></string>
472
+ <key>Enabled</key>
473
+ <false/>
474
+ <key>ExecutablePath</key>
475
+ <string>Contents/MacOS/VoodooPS2Controller</string>
476
+ <key>MaxKernel</key>
477
+ <string></string>
478
+ <key>MinKernel</key>
479
+ <string>15.0.0</string>
480
+ <key>PlistPath</key>
481
+ <string>Contents/Info.plist</string>
482
+ </dict>
483
+ <dict>
484
+ <key>Arch</key>
485
+ <string>x86_64</string>
486
+ <key>BundlePath</key>
487
+ <string>VoodooPS2Controller.kext/Contents/PlugIns/VoodooPS2Keyboard.kext</string>
488
+ <key>Comment</key>
489
+ <string></string>
490
+ <key>Enabled</key>
491
+ <false/>
492
+ <key>ExecutablePath</key>
493
+ <string>Contents/MacOS/VoodooPS2Keyboard</string>
494
+ <key>MaxKernel</key>
495
+ <string></string>
496
+ <key>MinKernel</key>
497
+ <string>15.0.0</string>
498
+ <key>PlistPath</key>
499
+ <string>Contents/Info.plist</string>
500
+ </dict>
501
+ <dict>
502
+ <key>Arch</key>
503
+ <string>x86_64</string>
504
+ <key>BundlePath</key>
505
+ <string>VoodooPS2Controller.kext/Contents/PlugIns/VoodooPS2Mouse.kext</string>
506
+ <key>Comment</key>
507
+ <string></string>
508
+ <key>Enabled</key>
509
+ <false/>
510
+ <key>ExecutablePath</key>
511
+ <string>Contents/MacOS/VoodooPS2Mouse</string>
512
+ <key>MaxKernel</key>
513
+ <string></string>
514
+ <key>MinKernel</key>
515
+ <string>15.0.0</string>
516
+ <key>PlistPath</key>
517
+ <string>Contents/Info.plist</string>
518
+ </dict>
519
+ <dict>
520
+ <key>Arch</key>
521
+ <string>x86_64</string>
522
+ <key>BundlePath</key>
523
+ <string>VoodooPS2Controller.kext/Contents/PlugIns/VoodooPS2Trackpad.kext</string>
524
+ <key>Comment</key>
525
+ <string></string>
526
+ <key>Enabled</key>
527
+ <false/>
528
+ <key>ExecutablePath</key>
529
+ <string>Contents/MacOS/VoodooPS2Trackpad</string>
530
+ <key>MaxKernel</key>
531
+ <string></string>
532
+ <key>MinKernel</key>
533
+ <string>15.0.0</string>
534
+ <key>PlistPath</key>
535
+ <string>Contents/Info.plist</string>
536
+ </dict>
537
+ <dict>
538
+ <key>Arch</key>
539
+ <string>x86_64</string>
540
+ <key>BundlePath</key>
541
+ <string>VoodooPS2Controller.kext/Contents/PlugIns/VoodooInput.kext</string>
542
+ <key>Comment</key>
543
+ <string></string>
544
+ <key>Enabled</key>
545
+ <false/>
546
+ <key>ExecutablePath</key>
547
+ <string>Contents/MacOS/VoodooInput</string>
548
+ <key>MaxKernel</key>
549
+ <string></string>
550
+ <key>MinKernel</key>
551
+ <string>15.0.0</string>
552
+ <key>PlistPath</key>
553
+ <string>Contents/Info.plist</string>
554
+ </dict>
555
+ <dict>
556
+ <key>Arch</key>
557
+ <string>x86_64</string>
558
+ <key>BundlePath</key>
559
+ <string>USBPorts.kext</string>
560
+ <key>Comment</key>
561
+ <string></string>
562
+ <key>Enabled</key>
563
+ <true/>
564
+ <key>ExecutablePath</key>
565
+ <string></string>
566
+ <key>MaxKernel</key>
567
+ <string></string>
568
+ <key>MinKernel</key>
569
+ <string></string>
570
+ <key>PlistPath</key>
571
+ <string>Contents/Info.plist</string>
572
+ </dict>
573
+ <dict>
574
+ <key>Arch</key>
575
+ <string>x86_64</string>
576
+ <key>BundlePath</key>
577
+ <string>AGPMInjector.kext</string>
578
+ <key>Comment</key>
579
+ <string></string>
580
+ <key>Enabled</key>
581
+ <true/>
582
+ <key>ExecutablePath</key>
583
+ <string></string>
584
+ <key>MaxKernel</key>
585
+ <string></string>
586
+ <key>MinKernel</key>
587
+ <string></string>
588
+ <key>PlistPath</key>
589
+ <string>Contents/Info.plist</string>
590
+ </dict>
591
+ <dict>
592
+ <key>Arch</key>
593
+ <string>x86_64</string>
594
+ <key>BundlePath</key>
595
+ <string>BrcmFirmwareData.kext</string>
596
+ <key>Comment</key>
597
+ <string>Bluetooth firmware</string>
598
+ <key>Enabled</key>
599
+ <true/>
600
+ <key>ExecutablePath</key>
601
+ <string>Contents/MacOS/BrcmFirmwareData</string>
602
+ <key>MaxKernel</key>
603
+ <string></string>
604
+ <key>MinKernel</key>
605
+ <string></string>
606
+ <key>PlistPath</key>
607
+ <string>Contents/Info.plist</string>
608
+ </dict>
609
+ <dict>
610
+ <key>Arch</key>
611
+ <string>x86_64</string>
612
+ <key>BundlePath</key>
613
+ <string>BrcmNonPatchRAM2.kext</string>
614
+ <key>Comment</key>
615
+ <string>Bluetooth support for macOS 10.11-10.14</string>
616
+ <key>Enabled</key>
617
+ <true/>
618
+ <key>ExecutablePath</key>
619
+ <string>Contents/MacOS/BrcmNonPatchRAM2</string>
620
+ <key>MaxKernel</key>
621
+ <string>18.99.99</string>
622
+ <key>MinKernel</key>
623
+ <string>15.0.0</string>
624
+ <key>PlistPath</key>
625
+ <string>Contents/Info.plist</string>
626
+ </dict>
627
+ <dict>
628
+ <key>Arch</key>
629
+ <string>x86_64</string>
630
+ <key>BundlePath</key>
631
+ <string>BrcmPatchRAM2.kext</string>
632
+ <key>Comment</key>
633
+ <string>Bluetooth support for macOS 10.11-10.14</string>
634
+ <key>Enabled</key>
635
+ <true/>
636
+ <key>ExecutablePath</key>
637
+ <string>Contents/MacOS/BrcmPatchRAM2</string>
638
+ <key>MaxKernel</key>
639
+ <string>18.99.99</string>
640
+ <key>MinKernel</key>
641
+ <string>15.0.0</string>
642
+ <key>PlistPath</key>
643
+ <string>Contents/Info.plist</string>
644
+ </dict>
645
+ <dict>
646
+ <key>Arch</key>
647
+ <string>x86_64</string>
648
+ <key>BundlePath</key>
649
+ <string>BrcmPatchRAM3.kext</string>
650
+ <key>Comment</key>
651
+ <string>Bluetooth support for macOS 10.15-</string>
652
+ <key>Enabled</key>
653
+ <true/>
654
+ <key>ExecutablePath</key>
655
+ <string>Contents/MacOS/BrcmPatchRAM3</string>
656
+ <key>MaxKernel</key>
657
+ <string></string>
658
+ <key>MinKernel</key>
659
+ <string>19.0.0</string>
660
+ <key>PlistPath</key>
661
+ <string>Contents/Info.plist</string>
662
+ </dict>
663
+ <dict>
664
+ <key>Arch</key>
665
+ <string>x86_64</string>
666
+ <key>BundlePath</key>
667
+ <string>BrcmBluetoothInjector.kext</string>
668
+ <key>Comment</key>
669
+ <string>Bluetooth support for macOS 10.15-11</string>
670
+ <key>Enabled</key>
671
+ <true/>
672
+ <key>ExecutablePath</key>
673
+ <string></string>
674
+ <key>MaxKernel</key>
675
+ <string>20.99.99</string>
676
+ <key>MinKernel</key>
677
+ <string>19.0.0</string>
678
+ <key>PlistPath</key>
679
+ <string>Contents/Info.plist</string>
680
+ </dict>
681
+ <dict>
682
+ <key>Arch</key>
683
+ <string>x86_64</string>
684
+ <key>BundlePath</key>
685
+ <string>BlueToolFixup.kext</string>
686
+ <key>Comment</key>
687
+ <string>Bluetooth support for macOS 12-</string>
688
+ <key>Enabled</key>
689
+ <true/>
690
+ <key>ExecutablePath</key>
691
+ <string>Contents/MacOS/BlueToolFixup</string>
692
+ <key>MaxKernel</key>
693
+ <string></string>
694
+ <key>MinKernel</key>
695
+ <string>21.0.0</string>
696
+ <key>PlistPath</key>
697
+ <string>Contents/Info.plist</string>
698
+ </dict>
699
+ <dict>
700
+ <key>Arch</key>
701
+ <string>x86_64</string>
702
+ <key>BundlePath</key>
703
+ <string>CryptexFixup.kext</string>
704
+ <key>Comment</key>
705
+ <string>Support for non-AVX2 CPUs in Ventura/Sonoma</string>
706
+ <key>Enabled</key>
707
+ <true/>
708
+ <key>ExecutablePath</key>
709
+ <string>Contents/MacOS/CryptexFixup</string>
710
+ <key>MaxKernel</key>
711
+ <string>23.99.99</string>
712
+ <key>MinKernel</key>
713
+ <string>22.1.0</string>
714
+ <key>PlistPath</key>
715
+ <string>Contents/Info.plist</string>
716
+ </dict>
717
+ </array>
718
+ <key>Block</key>
719
+ <array>
720
+ <dict>
721
+ <key>Arch</key>
722
+ <string>Any</string>
723
+ <key>Comment</key>
724
+ <string></string>
725
+ <key>Enabled</key>
726
+ <false/>
727
+ <key>Identifier</key>
728
+ <string>com.apple.driver.AppleTyMCEDriver</string>
729
+ <key>MaxKernel</key>
730
+ <string></string>
731
+ <key>MinKernel</key>
732
+ <string></string>
733
+ <key>Strategy</key>
734
+ <string>Disable</string>
735
+ </dict>
736
+ </array>
737
+ <key>Emulate</key>
738
+ <dict>
739
+ <key>Cpuid1Data</key>
740
+ <data>
741
+ VAYFAAAAAAAAAAAAAAAAAA==
742
+ </data>
743
+ <key>Cpuid1Mask</key>
744
+ <data>
745
+ ////AAAAAAAAAAAAAAAAAA==
746
+ </data>
747
+ <key>DummyPowerManagement</key>
748
+ <true/>
749
+ <key>MaxKernel</key>
750
+ <string></string>
751
+ <key>MinKernel</key>
752
+ <string></string>
753
+ </dict>
754
+ <key>Force</key>
755
+ <array>
756
+ <dict>
757
+ <key>Arch</key>
758
+ <string>Any</string>
759
+ <key>BundlePath</key>
760
+ <string>System/Library/Extensions/IONetworkingFamily.kext</string>
761
+ <key>Comment</key>
762
+ <string></string>
763
+ <key>Enabled</key>
764
+ <false/>
765
+ <key>ExecutablePath</key>
766
+ <string>Contents/MacOS/IONetworkingFamily</string>
767
+ <key>Identifier</key>
768
+ <string>com.apple.iokit.IONetworkingFamily</string>
769
+ <key>MaxKernel</key>
770
+ <string>13.99.99</string>
771
+ <key>MinKernel</key>
772
+ <string></string>
773
+ <key>PlistPath</key>
774
+ <string>Contents/Info.plist</string>
775
+ </dict>
776
+ </array>
777
+ <key>Patch</key>
778
+ <array>
779
+ <dict>
780
+ <key>Arch</key>
781
+ <string>x86_64</string>
782
+ <key>Base</key>
783
+ <string></string>
784
+ <key>Comment</key>
785
+ <string>algrey - cpuid_set_cpufamily - force CPUFAMILY_INTEL_PENRYN</string>
786
+ <key>Count</key>
787
+ <integer>1</integer>
788
+ <key>Enabled</key>
789
+ <true/>
790
+ <key>Find</key>
791
+ <data>
792
+ MduAPQAAAAAGdQA=
793
+ </data>
794
+ <key>Identifier</key>
795
+ <string>kernel</string>
796
+ <key>Limit</key>
797
+ <integer>0</integer>
798
+ <key>Mask</key>
799
+ <data>
800
+ /////wAAAP///wA=
801
+ </data>
802
+ <key>MaxKernel</key>
803
+ <string>20.3.99</string>
804
+ <key>MinKernel</key>
805
+ <string>17.0.0</string>
806
+ <key>Replace</key>
807
+ <data>
808
+ u7xP6njpXQAAAJA=
809
+ </data>
810
+ <key>ReplaceMask</key>
811
+ <data>
812
+ </data>
813
+ <key>Skip</key>
814
+ <integer>0</integer>
815
+ </dict>
816
+ <dict>
817
+ <key>Arch</key>
818
+ <string>x86_64</string>
819
+ <key>Base</key>
820
+ <string></string>
821
+ <key>Comment</key>
822
+ <string>algrey - thenickdude - cpuid_set_cpufamily - force CPUFAMILY_INTEL_PENRYN (Big Sur 11.3+, Monterey, Ventura, Sonoma)</string>
823
+ <key>Count</key>
824
+ <integer>1</integer>
825
+ <key>Enabled</key>
826
+ <true/>
827
+ <key>Find</key>
828
+ <data>
829
+ MdKzAYA9AAAAAAZ1
830
+ </data>
831
+ <key>Identifier</key>
832
+ <string>kernel</string>
833
+ <key>Limit</key>
834
+ <integer>0</integer>
835
+ <key>Mask</key>
836
+ <data>
837
+ ////////AAAAAP//
838
+ </data>
839
+ <key>MaxKernel</key>
840
+ <string>23.99.99</string>
841
+ <key>MinKernel</key>
842
+ <string>20.4.0</string>
843
+ <key>Replace</key>
844
+ <data>
845
+ urxP6nizAJCQkJDr
846
+ </data>
847
+ <key>ReplaceMask</key>
848
+ <data>
849
+ </data>
850
+ <key>Skip</key>
851
+ <integer>0</integer>
852
+ </dict>
853
+ <dict>
854
+ <key>Arch</key>
855
+ <string>x86_64</string>
856
+ <key>Base</key>
857
+ <string>_early_random</string>
858
+ <key>Comment</key>
859
+ <string>SurPlus v1 - PART 1 of 2 - Patch read_erandom (inlined in _early_random)</string>
860
+ <key>Count</key>
861
+ <integer>1</integer>
862
+ <key>Enabled</key>
863
+ <true/>
864
+ <key>Find</key>
865
+ <data>AHQjSIs=</data>
866
+ <key>Identifier</key>
867
+ <string>kernel</string>
868
+ <key>Limit</key>
869
+ <integer>800</integer>
870
+ <key>Mask</key>
871
+ <data></data>
872
+ <key>MaxKernel</key>
873
+ <string>21.1.0</string>
874
+ <key>MinKernel</key>
875
+ <string>20.4.0</string>
876
+ <key>Replace</key>
877
+ <data>AOsjSIs=</data>
878
+ <key>ReplaceMask</key>
879
+ <data></data>
880
+ <key>Skip</key>
881
+ <integer>0</integer>
882
+ </dict>
883
+ <dict>
884
+ <key>Arch</key>
885
+ <string>x86_64</string>
886
+ <key>Base</key>
887
+ <string>_register_and_init_prng</string>
888
+ <key>Comment</key>
889
+ <string>SurPlus v1 - PART 2 of 2 - Patch register_and_init_prng</string>
890
+ <key>Count</key>
891
+ <integer>1</integer>
892
+ <key>Enabled</key>
893
+ <true/>
894
+ <key>Find</key>
895
+ <data>ukgBAAAx9g==</data>
896
+ <key>Identifier</key>
897
+ <string>kernel</string>
898
+ <key>Limit</key>
899
+ <integer>256</integer>
900
+ <key>Mask</key>
901
+ <data></data>
902
+ <key>MaxKernel</key>
903
+ <string>21.1.0</string>
904
+ <key>MinKernel</key>
905
+ <string>20.4.0</string>
906
+ <key>Replace</key>
907
+ <data>ukgBAADrBQ==</data>
908
+ <key>ReplaceMask</key>
909
+ <data></data>
910
+ <key>Skip</key>
911
+ <integer>0</integer>
912
+ </dict>
913
+ <dict>
914
+ <key>Arch</key>
915
+ <string>x86_64</string>
916
+ <key>Base</key>
917
+ <string>_apfs_filevault_allowed</string>
918
+ <key>Comment</key>
919
+ <string>Force FileVault on Broken Seal (from OCLP project, for non-AVX2 Ventura/Sonoma)</string>
920
+ <key>Count</key>
921
+ <integer>0</integer>
922
+ <key>Enabled</key>
923
+ <true/>
924
+ <key>Find</key>
925
+ <data></data>
926
+ <key>Identifier</key>
927
+ <string>com.apple.filesystems.apfs</string>
928
+ <key>Limit</key>
929
+ <integer>0</integer>
930
+ <key>Mask</key>
931
+ <data></data>
932
+ <key>MaxKernel</key>
933
+ <string>23.99.99</string>
934
+ <key>MinKernel</key>
935
+ <string>22.1.0</string>
936
+ <key>Replace</key>
937
+ <data>uAEAAADD</data>
938
+ <key>ReplaceMask</key>
939
+ <data></data>
940
+ <key>Skip</key>
941
+ <integer>0</integer>
942
+ </dict>
943
+ </array>
944
+ <key>Quirks</key>
945
+ <dict>
946
+ <key>AppleCpuPmCfgLock</key>
947
+ <false/>
948
+ <key>AppleXcpmCfgLock</key>
949
+ <false/>
950
+ <key>AppleXcpmExtraMsrs</key>
951
+ <false/>
952
+ <key>AppleXcpmForceBoost</key>
953
+ <false/>
954
+ <key>CustomPciSerialDevice</key>
955
+ <false/>
956
+ <key>CustomSMBIOSGuid</key>
957
+ <false/>
958
+ <key>DisableIoMapper</key>
959
+ <false/>
960
+ <key>DisableIoMapperMapping</key>
961
+ <false/>
962
+ <key>DisableLinkeditJettison</key>
963
+ <true/>
964
+ <key>DisableRtcChecksum</key>
965
+ <false/>
966
+ <key>ExtendBTFeatureFlags</key>
967
+ <false/>
968
+ <key>ExternalDiskIcons</key>
969
+ <false/>
970
+ <key>ForceAquantiaEthernet</key>
971
+ <false/>
972
+ <key>ForceSecureBootScheme</key>
973
+ <true/>
974
+ <key>IncreasePciBarSize</key>
975
+ <false/>
976
+ <key>LapicKernelPanic</key>
977
+ <false/>
978
+ <key>LegacyCommpage</key>
979
+ <false/>
980
+ <key>PanicNoKextDump</key>
981
+ <false/>
982
+ <key>PowerTimeoutKernelPanic</key>
983
+ <false/>
984
+ <key>ProvideCurrentCpuInfo</key>
985
+ <true/>
986
+ <key>SetApfsTrimTimeout</key>
987
+ <integer>0</integer>
988
+ <key>ThirdPartyDrives</key>
989
+ <false/>
990
+ <key>XhciPortLimit</key>
991
+ <false/>
992
+ </dict>
993
+ <key>Scheme</key>
994
+ <dict>
995
+ <key>CustomKernel</key>
996
+ <false/>
997
+ <key>FuzzyMatch</key>
998
+ <true/>
999
+ <key>KernelArch</key>
1000
+ <string>Auto</string>
1001
+ <key>KernelCache</key>
1002
+ <string>Auto</string>
1003
+ </dict>
1004
+ </dict>
1005
+ <key>Misc</key>
1006
+ <dict>
1007
+ <key>BlessOverride</key>
1008
+ <array/>
1009
+ <key>Boot</key>
1010
+ <dict>
1011
+ <key>ConsoleAttributes</key>
1012
+ <integer>0</integer>
1013
+ <key>HibernateMode</key>
1014
+ <string>Auto</string>
1015
+ <key>HibernateSkipsPicker</key>
1016
+ <false/>
1017
+ <key>HideAuxiliary</key>
1018
+ <false/>
1019
+ <key>InstanceIdentifier</key>
1020
+ <string></string>
1021
+ <key>LauncherOption</key>
1022
+ <string>Disabled</string>
1023
+ <key>LauncherPath</key>
1024
+ <string>Default</string>
1025
+ <key>PickerAttributes</key>
1026
+ <integer>17</integer>
1027
+ <key>PickerAudioAssist</key>
1028
+ <false/>
1029
+ <key>PickerMode</key>
1030
+ <string>External</string>
1031
+ <key>PickerVariant</key>
1032
+ <string>Auto</string>
1033
+ <key>PollAppleHotKeys</key>
1034
+ <true/>
1035
+ <key>ShowPicker</key>
1036
+ <false/>
1037
+ <key>TakeoffDelay</key>
1038
+ <integer>0</integer>
1039
+ <key>Timeout</key>
1040
+ <integer>0</integer>
1041
+ </dict>
1042
+ <key>Debug</key>
1043
+ <dict>
1044
+ <key>AppleDebug</key>
1045
+ <false/>
1046
+ <key>ApplePanic</key>
1047
+ <false/>
1048
+ <key>DisableWatchDog</key>
1049
+ <false/>
1050
+ <key>DisplayDelay</key>
1051
+ <integer>0</integer>
1052
+ <key>DisplayLevel</key>
1053
+ <integer>2147483650</integer>
1054
+ <key>LogModules</key>
1055
+ <string>*</string>
1056
+ <key>SysReport</key>
1057
+ <false/>
1058
+ <key>Target</key>
1059
+ <integer>3</integer>
1060
+ </dict>
1061
+ <key>Entries</key>
1062
+ <array/>
1063
+ <key>Security</key>
1064
+ <dict>
1065
+ <key>AllowSetDefault</key>
1066
+ <false/>
1067
+ <key>ApECID</key>
1068
+ <integer>0</integer>
1069
+ <key>AuthRestart</key>
1070
+ <false/>
1071
+ <key>BlacklistAppleUpdate</key>
1072
+ <true/>
1073
+ <key>DmgLoading</key>
1074
+ <string>Signed</string>
1075
+ <key>EnablePassword</key>
1076
+ <false/>
1077
+ <key>ExposeSensitiveData</key>
1078
+ <integer>6</integer>
1079
+ <key>HaltLevel</key>
1080
+ <integer>2147483648</integer>
1081
+ <key>PasswordHash</key>
1082
+ <data></data>
1083
+ <key>PasswordSalt</key>
1084
+ <data></data>
1085
+ <key>ScanPolicy</key>
1086
+ <integer>18809603</integer>
1087
+ <key>SecureBootModel</key>
1088
+ <string>Disabled</string>
1089
+ <key>Vault</key>
1090
+ <string>Optional</string>
1091
+ </dict>
1092
+ <key>Serial</key>
1093
+ <dict>
1094
+ <key>Init</key>
1095
+ <false/>
1096
+ <key>Override</key>
1097
+ <false/>
1098
+ </dict>
1099
+ <key>Tools</key>
1100
+ <array>
1101
+ <dict>
1102
+ <key>Arguments</key>
1103
+ <string></string>
1104
+ <key>Auxiliary</key>
1105
+ <true/>
1106
+ <key>Comment</key>
1107
+ <string>Not signed for security reasons</string>
1108
+ <key>Enabled</key>
1109
+ <true/>
1110
+ <key>Flavour</key>
1111
+ <string>OpenShell:UEFIShell:Shell</string>
1112
+ <key>FullNvramAccess</key>
1113
+ <false/>
1114
+ <key>Name</key>
1115
+ <string>UEFI Shell</string>
1116
+ <key>Path</key>
1117
+ <string>Shell.efi</string>
1118
+ <key>RealPath</key>
1119
+ <false/>
1120
+ <key>TextMode</key>
1121
+ <false/>
1122
+ </dict>
1123
+ <dict>
1124
+ <key>Arguments</key>
1125
+ <string></string>
1126
+ <key>Auxiliary</key>
1127
+ <true/>
1128
+ <key>Comment</key>
1129
+ <string>Memory testing utility</string>
1130
+ <key>Enabled</key>
1131
+ <false/>
1132
+ <key>Flavour</key>
1133
+ <string>MemTest</string>
1134
+ <key>FullNvramAccess</key>
1135
+ <false/>
1136
+ <key>Name</key>
1137
+ <string>memtest86</string>
1138
+ <key>Path</key>
1139
+ <string>memtest86/BOOTX64.efi</string>
1140
+ <key>RealPath</key>
1141
+ <true/>
1142
+ <key>TextMode</key>
1143
+ <false/>
1144
+ </dict>
1145
+ <dict>
1146
+ <key>Arguments</key>
1147
+ <string>Shutdown</string>
1148
+ <key>Auxiliary</key>
1149
+ <true/>
1150
+ <key>Comment</key>
1151
+ <string>Perform shutdown</string>
1152
+ <key>Enabled</key>
1153
+ <false/>
1154
+ <key>Flavour</key>
1155
+ <string>Auto</string>
1156
+ <key>FullNvramAccess</key>
1157
+ <false/>
1158
+ <key>Name</key>
1159
+ <string>Shutdown</string>
1160
+ <key>Path</key>
1161
+ <string>ResetSystem.efi</string>
1162
+ <key>RealPath</key>
1163
+ <false/>
1164
+ <key>TextMode</key>
1165
+ <false/>
1166
+ </dict>
1167
+ </array>
1168
+ </dict>
1169
+ <key>NVRAM</key>
1170
+ <dict>
1171
+ <key>Add</key>
1172
+ <dict>
1173
+ <key>4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14</key>
1174
+ <dict>
1175
+ <key>DefaultBackgroundColor</key>
1176
+ <data>AAAAAA==</data>
1177
+ </dict>
1178
+ <key>4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102</key>
1179
+ <dict>
1180
+ <key>rtc-blacklist</key>
1181
+ <data></data>
1182
+ </dict>
1183
+ <key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
1184
+ <dict>
1185
+ <key>#INFO (prev-lang:kbd)</key>
1186
+ <string>en:252 (ABC), set 656e3a323532</string>
1187
+ <key>ForceDisplayRotationInEFI</key>
1188
+ <integer>0</integer>
1189
+ <key>SystemAudioVolume</key>
1190
+ <data>Rg==</data>
1191
+ <key>boot-args</key>
1192
+ <string>keepsyms=1</string>
1193
+ <key>csr-active-config</key>
1194
+ <data>Jg8=</data>
1195
+ <key>prev-lang:kbd</key>
1196
+ <data>ZW4tVVM6MA==</data>
1197
+ <key>run-efi-updater</key>
1198
+ <string>No</string>
1199
+ </dict>
1200
+ </dict>
1201
+ <key>Delete</key>
1202
+ <dict>
1203
+ <key>4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14</key>
1204
+ <array>
1205
+ <string>DefaultBackgroundColor</string>
1206
+ </array>
1207
+ <key>4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102</key>
1208
+ <array>
1209
+ <string>rtc-blacklist</string>
1210
+ </array>
1211
+ <key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
1212
+ <array>
1213
+ <string>boot-args</string>
1214
+ <string>ForceDisplayRotationInEFI</string>
1215
+ </array>
1216
+ </dict>
1217
+ <key>LegacyOverwrite</key>
1218
+ <false/>
1219
+ <key>LegacySchema</key>
1220
+ <dict>
1221
+ <key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
1222
+ <array>
1223
+ <string>EFILoginHiDPI</string>
1224
+ <string>EFIBluetoothDelay</string>
1225
+ <string>LocationServicesEnabled</string>
1226
+ <string>SystemAudioVolume</string>
1227
+ <string>SystemAudioVolumeDB</string>
1228
+ <string>SystemAudioVolumeSaved</string>
1229
+ <string>bluetoothActiveControllerInfo</string>
1230
+ <string>bluetoothInternalControllerInfo</string>
1231
+ <string>flagstate</string>
1232
+ <string>fmm-computer-name</string>
1233
+ <string>fmm-mobileme-token-FMM</string>
1234
+ <string>fmm-mobileme-token-FMM-BridgeHasAccount</string>
1235
+ <string>nvda_drv</string>
1236
+ <string>prev-lang:kbd</string>
1237
+ <string>backlight-level</string>
1238
+ <string>BootCampHD</string>
1239
+ </array>
1240
+ <key>8BE4DF61-93CA-11D2-AA0D-00E098032B8C</key>
1241
+ <array>
1242
+ <string>Boot0080</string>
1243
+ <string>Boot0081</string>
1244
+ <string>Boot0082</string>
1245
+ <string>BootNext</string>
1246
+ <string>BootOrder</string>
1247
+ </array>
1248
+ </dict>
1249
+ <key>WriteFlash</key>
1250
+ <true/>
1251
+ </dict>
1252
+ <key>PlatformInfo</key>
1253
+ <dict>
1254
+ <key>Automatic</key>
1255
+ <true/>
1256
+ <key>CustomMemory</key>
1257
+ <false/>
1258
+ <key>Generic</key>
1259
+ <dict>
1260
+ <key>AdviseFeatures</key>
1261
+ <false/>
1262
+ <key>MLB</key>
1263
+ <string>C02717306J9JG361M</string>
1264
+ <key>MaxBIOSVersion</key>
1265
+ <false/>
1266
+ <key>ProcessorType</key>
1267
+ <integer>0</integer>
1268
+ <key>ROM</key>
1269
+ <data>m7zhIYfl</data>
1270
+ <key>SpoofVendor</key>
1271
+ <true/>
1272
+ <key>SystemMemoryStatus</key>
1273
+ <string>Auto</string>
1274
+ <key>SystemProductName</key>
1275
+ <string>iMacPro1,1</string>
1276
+ <key>SystemSerialNumber</key>
1277
+ <string>C02TM2ZBHX87</string>
1278
+ <key>SystemUUID</key>
1279
+ <string>007076A6-F2A2-4461-BBE5-BAD019F8025A</string>
1280
+ </dict>
1281
+ <key>UpdateDataHub</key>
1282
+ <true/>
1283
+ <key>UpdateNVRAM</key>
1284
+ <true/>
1285
+ <key>UpdateSMBIOS</key>
1286
+ <true/>
1287
+ <key>UpdateSMBIOSMode</key>
1288
+ <string>Create</string>
1289
+ <key>UseRawUuidEncoding</key>
1290
+ <false/>
1291
+ </dict>
1292
+ <key>UEFI</key>
1293
+ <dict>
1294
+ <key>APFS</key>
1295
+ <dict>
1296
+ <key>EnableJumpstart</key>
1297
+ <true/>
1298
+ <key>GlobalConnect</key>
1299
+ <false/>
1300
+ <key>HideVerbose</key>
1301
+ <true/>
1302
+ <key>JumpstartHotPlug</key>
1303
+ <false/>
1304
+ <key>MinDate</key>
1305
+ <integer>-1</integer>
1306
+ <key>MinVersion</key>
1307
+ <integer>-1</integer>
1308
+ </dict>
1309
+ <key>AppleInput</key>
1310
+ <dict>
1311
+ <key>AppleEvent</key>
1312
+ <string>Builtin</string>
1313
+ <key>CustomDelays</key>
1314
+ <false/>
1315
+ <key>GraphicsInputMirroring</key>
1316
+ <true/>
1317
+ <key>KeyInitialDelay</key>
1318
+ <integer>50</integer>
1319
+ <key>KeySubsequentDelay</key>
1320
+ <integer>5</integer>
1321
+ <key>PointerDwellClickTimeout</key>
1322
+ <integer>0</integer>
1323
+ <key>PointerDwellDoubleClickTimeout</key>
1324
+ <integer>0</integer>
1325
+ <key>PointerDwellRadius</key>
1326
+ <integer>0</integer>
1327
+ <key>PointerPollMask</key>
1328
+ <integer>-1</integer>
1329
+ <key>PointerPollMax</key>
1330
+ <integer>80</integer>
1331
+ <key>PointerPollMin</key>
1332
+ <integer>10</integer>
1333
+ <key>PointerSpeedDiv</key>
1334
+ <integer>1</integer>
1335
+ <key>PointerSpeedMul</key>
1336
+ <integer>1</integer>
1337
+ </dict>
1338
+ <key>Audio</key>
1339
+ <dict>
1340
+ <key>AudioCodec</key>
1341
+ <integer>0</integer>
1342
+ <key>AudioDevice</key>
1343
+ <string></string>
1344
+ <key>AudioOutMask</key>
1345
+ <integer>1</integer>
1346
+ <key>AudioSupport</key>
1347
+ <false/>
1348
+ <key>DisconnectHda</key>
1349
+ <false/>
1350
+ <key>MaximumGain</key>
1351
+ <integer>-15</integer>
1352
+ <key>MinimumAssistGain</key>
1353
+ <integer>-30</integer>
1354
+ <key>MinimumAudibleGain</key>
1355
+ <integer>-55</integer>
1356
+ <key>PlayChime</key>
1357
+ <string>Auto</string>
1358
+ <key>ResetTrafficClass</key>
1359
+ <false/>
1360
+ <key>SetupDelay</key>
1361
+ <integer>0</integer>
1362
+ </dict>
1363
+ <key>ConnectDrivers</key>
1364
+ <true/>
1365
+ <key>Drivers</key>
1366
+ <array>
1367
+ <dict>
1368
+ <key>Arguments</key>
1369
+ <string></string>
1370
+ <key>Comment</key>
1371
+ <string></string>
1372
+ <key>Enabled</key>
1373
+ <false/>
1374
+ <key>LoadEarly</key>
1375
+ <true/>
1376
+ <key>Path</key>
1377
+ <string>OpenVariableRuntimeDxe.efi</string>
1378
+ </dict>
1379
+ <dict>
1380
+ <key>Arguments</key>
1381
+ <string></string>
1382
+ <key>Comment</key>
1383
+ <string></string>
1384
+ <key>Enabled</key>
1385
+ <true/>
1386
+ <key>LoadEarly</key>
1387
+ <false/>
1388
+ <key>Path</key>
1389
+ <string>OpenRuntime.efi</string>
1390
+ </dict>
1391
+ <dict>
1392
+ <key>Arguments</key>
1393
+ <string></string>
1394
+ <key>Comment</key>
1395
+ <string>HFS+ Driver</string>
1396
+ <key>Enabled</key>
1397
+ <true/>
1398
+ <key>LoadEarly</key>
1399
+ <false/>
1400
+ <key>Path</key>
1401
+ <string>OpenHfsPlus.efi</string>
1402
+ </dict>
1403
+ <dict>
1404
+ <key>Arguments</key>
1405
+ <string></string>
1406
+ <key>Comment</key>
1407
+ <string></string>
1408
+ <key>Enabled</key>
1409
+ <true/>
1410
+ <key>LoadEarly</key>
1411
+ <false/>
1412
+ <key>Path</key>
1413
+ <string>OpenCanopy.efi</string>
1414
+ </dict>
1415
+ <dict>
1416
+ <key>Arguments</key>
1417
+ <string></string>
1418
+ <key>Comment</key>
1419
+ <string></string>
1420
+ <key>Enabled</key>
1421
+ <false/>
1422
+ <key>LoadEarly</key>
1423
+ <false/>
1424
+ <key>Path</key>
1425
+ <string>AudioDxe.efi</string>
1426
+ </dict>
1427
+ <dict>
1428
+ <key>Arguments</key>
1429
+ <string></string>
1430
+ <key>Comment</key>
1431
+ <string></string>
1432
+ <key>Enabled</key>
1433
+ <true/>
1434
+ <key>LoadEarly</key>
1435
+ <false/>
1436
+ <key>Path</key>
1437
+ <string>OpenPartitionDxe.efi</string>
1438
+ </dict>
1439
+ <dict>
1440
+ <key>Arguments</key>
1441
+ <string></string>
1442
+ <key>Comment</key>
1443
+ <string></string>
1444
+ <key>Enabled</key>
1445
+ <false/>
1446
+ <key>LoadEarly</key>
1447
+ <false/>
1448
+ <key>Path</key>
1449
+ <string>OpenUsbKbDxe.efi</string>
1450
+ </dict>
1451
+ <dict>
1452
+ <key>Arguments</key>
1453
+ <string></string>
1454
+ <key>Comment</key>
1455
+ <string></string>
1456
+ <key>Enabled</key>
1457
+ <false/>
1458
+ <key>LoadEarly</key>
1459
+ <false/>
1460
+ <key>Path</key>
1461
+ <string>UsbMouseDxe.efi</string>
1462
+ </dict>
1463
+ <dict>
1464
+ <key>Arguments</key>
1465
+ <string></string>
1466
+ <key>Comment</key>
1467
+ <string></string>
1468
+ <key>Enabled</key>
1469
+ <false/>
1470
+ <key>LoadEarly</key>
1471
+ <false/>
1472
+ <key>Path</key>
1473
+ <string>Ps2KeyboardDxe.efi</string>
1474
+ </dict>
1475
+ <dict>
1476
+ <key>Arguments</key>
1477
+ <string></string>
1478
+ <key>Comment</key>
1479
+ <string></string>
1480
+ <key>Enabled</key>
1481
+ <false/>
1482
+ <key>LoadEarly</key>
1483
+ <false/>
1484
+ <key>Path</key>
1485
+ <string>Ps2MouseDxe.efi</string>
1486
+ </dict>
1487
+ <dict>
1488
+ <key>Arguments</key>
1489
+ <string></string>
1490
+ <key>Comment</key>
1491
+ <string></string>
1492
+ <key>Enabled</key>
1493
+ <false/>
1494
+ <key>LoadEarly</key>
1495
+ <false/>
1496
+ <key>Path</key>
1497
+ <string>HiiDatabase.efi</string>
1498
+ </dict>
1499
+ <dict>
1500
+ <key>Arguments</key>
1501
+ <string></string>
1502
+ <key>Comment</key>
1503
+ <string></string>
1504
+ <key>Enabled</key>
1505
+ <false/>
1506
+ <key>LoadEarly</key>
1507
+ <false/>
1508
+ <key>Path</key>
1509
+ <string>NvmExpressDxe.efi</string>
1510
+ </dict>
1511
+ <dict>
1512
+ <key>Arguments</key>
1513
+ <string></string>
1514
+ <key>Comment</key>
1515
+ <string></string>
1516
+ <key>Enabled</key>
1517
+ <false/>
1518
+ <key>LoadEarly</key>
1519
+ <false/>
1520
+ <key>Path</key>
1521
+ <string>XhciDxe.efi</string>
1522
+ </dict>
1523
+ <dict>
1524
+ <key>Arguments</key>
1525
+ <string></string>
1526
+ <key>Comment</key>
1527
+ <string></string>
1528
+ <key>Enabled</key>
1529
+ <false/>
1530
+ <key>LoadEarly</key>
1531
+ <false/>
1532
+ <key>Path</key>
1533
+ <string>ExFatDxe.efi</string>
1534
+ </dict>
1535
+ <dict>
1536
+ <key>Arguments</key>
1537
+ <string></string>
1538
+ <key>Comment</key>
1539
+ <string></string>
1540
+ <key>Enabled</key>
1541
+ <false/>
1542
+ <key>LoadEarly</key>
1543
+ <false/>
1544
+ <key>Path</key>
1545
+ <string>CrScreenshotDxe.efi</string>
1546
+ </dict>
1547
+ <dict>
1548
+ <key>Arguments</key>
1549
+ <string></string>
1550
+ <key>Comment</key>
1551
+ <string></string>
1552
+ <key>Enabled</key>
1553
+ <false/>
1554
+ <key>LoadEarly</key>
1555
+ <false/>
1556
+ <key>Path</key>
1557
+ <string>Ext4Dxe.efi</string>
1558
+ </dict>
1559
+ <dict>
1560
+ <key>Arguments</key>
1561
+ <string></string>
1562
+ <key>Comment</key>
1563
+ <string></string>
1564
+ <key>Enabled</key>
1565
+ <false/>
1566
+ <key>LoadEarly</key>
1567
+ <false/>
1568
+ <key>Path</key>
1569
+ <string>DpcDxe.efi</string>
1570
+ </dict>
1571
+ <dict>
1572
+ <key>Arguments</key>
1573
+ <string></string>
1574
+ <key>Comment</key>
1575
+ <string></string>
1576
+ <key>Enabled</key>
1577
+ <false/>
1578
+ <key>LoadEarly</key>
1579
+ <false/>
1580
+ <key>Path</key>
1581
+ <string>SnpDxe.efi</string>
1582
+ </dict>
1583
+ <dict>
1584
+ <key>Arguments</key>
1585
+ <string></string>
1586
+ <key>Comment</key>
1587
+ <string></string>
1588
+ <key>Enabled</key>
1589
+ <false/>
1590
+ <key>LoadEarly</key>
1591
+ <false/>
1592
+ <key>Path</key>
1593
+ <string>MnpDxe.efi</string>
1594
+ </dict>
1595
+ <dict>
1596
+ <key>Arguments</key>
1597
+ <string></string>
1598
+ <key>Comment</key>
1599
+ <string></string>
1600
+ <key>Enabled</key>
1601
+ <false/>
1602
+ <key>LoadEarly</key>
1603
+ <false/>
1604
+ <key>Path</key>
1605
+ <string>ArpDxe.efi</string>
1606
+ </dict>
1607
+ <dict>
1608
+ <key>Arguments</key>
1609
+ <string></string>
1610
+ <key>Comment</key>
1611
+ <string></string>
1612
+ <key>Enabled</key>
1613
+ <false/>
1614
+ <key>LoadEarly</key>
1615
+ <false/>
1616
+ <key>Path</key>
1617
+ <string>Dhcp4Dxe.efi</string>
1618
+ </dict>
1619
+ <dict>
1620
+ <key>Arguments</key>
1621
+ <string></string>
1622
+ <key>Comment</key>
1623
+ <string></string>
1624
+ <key>Enabled</key>
1625
+ <false/>
1626
+ <key>LoadEarly</key>
1627
+ <false/>
1628
+ <key>Path</key>
1629
+ <string>Ip4Dxe.efi</string>
1630
+ </dict>
1631
+ <dict>
1632
+ <key>Arguments</key>
1633
+ <string></string>
1634
+ <key>Comment</key>
1635
+ <string></string>
1636
+ <key>Enabled</key>
1637
+ <false/>
1638
+ <key>LoadEarly</key>
1639
+ <false/>
1640
+ <key>Path</key>
1641
+ <string>Udp4Dxe.efi</string>
1642
+ </dict>
1643
+ <dict>
1644
+ <key>Arguments</key>
1645
+ <string></string>
1646
+ <key>Comment</key>
1647
+ <string></string>
1648
+ <key>Enabled</key>
1649
+ <false/>
1650
+ <key>LoadEarly</key>
1651
+ <false/>
1652
+ <key>Path</key>
1653
+ <string>TcpDxe.efi</string>
1654
+ </dict>
1655
+ <dict>
1656
+ <key>Arguments</key>
1657
+ <string></string>
1658
+ <key>Comment</key>
1659
+ <string></string>
1660
+ <key>Enabled</key>
1661
+ <false/>
1662
+ <key>LoadEarly</key>
1663
+ <false/>
1664
+ <key>Path</key>
1665
+ <string>DnsDxe.efi</string>
1666
+ </dict>
1667
+ <dict>
1668
+ <key>Arguments</key>
1669
+ <string></string>
1670
+ <key>Comment</key>
1671
+ <string></string>
1672
+ <key>Enabled</key>
1673
+ <false/>
1674
+ <key>LoadEarly</key>
1675
+ <false/>
1676
+ <key>Path</key>
1677
+ <string>HttpDxe.efi</string>
1678
+ </dict>
1679
+ <dict>
1680
+ <key>Arguments</key>
1681
+ <string></string>
1682
+ <key>Comment</key>
1683
+ <string></string>
1684
+ <key>Enabled</key>
1685
+ <false/>
1686
+ <key>LoadEarly</key>
1687
+ <false/>
1688
+ <key>Path</key>
1689
+ <string>HttpUtilitiesDxe.efi</string>
1690
+ </dict>
1691
+ <dict>
1692
+ <key>Arguments</key>
1693
+ <string></string>
1694
+ <key>Comment</key>
1695
+ <string></string>
1696
+ <key>Enabled</key>
1697
+ <false/>
1698
+ <key>LoadEarly</key>
1699
+ <false/>
1700
+ <key>Path</key>
1701
+ <string>HttpBootDxe.efi</string>
1702
+ </dict>
1703
+ <dict>
1704
+ <key>Arguments</key>
1705
+ <string></string>
1706
+ <key>Comment</key>
1707
+ <string></string>
1708
+ <key>Enabled</key>
1709
+ <false/>
1710
+ <key>LoadEarly</key>
1711
+ <false/>
1712
+ <key>Path</key>
1713
+ <string>OpenLinuxBoot.efi</string>
1714
+ </dict>
1715
+ <dict>
1716
+ <key>Arguments</key>
1717
+ <string></string>
1718
+ <key>Comment</key>
1719
+ <string></string>
1720
+ <key>Enabled</key>
1721
+ <true/>
1722
+ <key>LoadEarly</key>
1723
+ <false/>
1724
+ <key>Path</key>
1725
+ <string>ResetNvramEntry.efi</string>
1726
+ </dict>
1727
+ <dict>
1728
+ <key>Arguments</key>
1729
+ <string></string>
1730
+ <key>Comment</key>
1731
+ <string></string>
1732
+ <key>Enabled</key>
1733
+ <false/>
1734
+ <key>LoadEarly</key>
1735
+ <false/>
1736
+ <key>Path</key>
1737
+ <string>ToggleSipEntry.efi</string>
1738
+ </dict>
1739
+ <dict>
1740
+ <key>Arguments</key>
1741
+ <string></string>
1742
+ <key>Comment</key>
1743
+ <string></string>
1744
+ <key>Enabled</key>
1745
+ <false/>
1746
+ <key>LoadEarly</key>
1747
+ <false/>
1748
+ <key>Path</key>
1749
+ <string>FirmwareSettingsEntry.efi</string>
1750
+ </dict>
1751
+ </array>
1752
+ <key>Input</key>
1753
+ <dict>
1754
+ <key>KeyFiltering</key>
1755
+ <false/>
1756
+ <key>KeyForgetThreshold</key>
1757
+ <integer>5</integer>
1758
+ <key>KeySupport</key>
1759
+ <true/>
1760
+ <key>KeySupportMode</key>
1761
+ <string>Auto</string>
1762
+ <key>KeySwap</key>
1763
+ <false/>
1764
+ <key>PointerSupport</key>
1765
+ <false/>
1766
+ <key>PointerSupportMode</key>
1767
+ <string>ASUS</string>
1768
+ <key>TimerResolution</key>
1769
+ <integer>50000</integer>
1770
+ </dict>
1771
+ <key>Output</key>
1772
+ <dict>
1773
+ <key>ClearScreenOnModeSwitch</key>
1774
+ <false/>
1775
+ <key>ConsoleFont</key>
1776
+ <string></string>
1777
+ <key>ConsoleMode</key>
1778
+ <string></string>
1779
+ <key>DirectGopRendering</key>
1780
+ <false/>
1781
+ <key>ForceResolution</key>
1782
+ <false/>
1783
+ <key>GopBurstMode</key>
1784
+ <false/>
1785
+ <key>GopPassThrough</key>
1786
+ <string>Disabled</string>
1787
+ <key>IgnoreTextInGraphics</key>
1788
+ <false/>
1789
+ <key>InitialMode</key>
1790
+ <string>Auto</string>
1791
+ <key>ProvideConsoleGop</key>
1792
+ <true/>
1793
+ <key>ReconnectGraphicsOnConnect</key>
1794
+ <false/>
1795
+ <key>ReconnectOnResChange</key>
1796
+ <false/>
1797
+ <key>ReplaceTabWithSpace</key>
1798
+ <false/>
1799
+ <key>Resolution</key>
1800
+ <string>1920x1080@32</string>
1801
+ <key>SanitiseClearScreen</key>
1802
+ <false/>
1803
+ <key>TextRenderer</key>
1804
+ <string>BuiltinGraphics</string>
1805
+ <key>UIScale</key>
1806
+ <integer>0</integer>
1807
+ <key>UgaPassThrough</key>
1808
+ <false/>
1809
+ </dict>
1810
+ <key>ProtocolOverrides</key>
1811
+ <dict>
1812
+ <key>AppleAudio</key>
1813
+ <false/>
1814
+ <key>AppleBootPolicy</key>
1815
+ <false/>
1816
+ <key>AppleDebugLog</key>
1817
+ <false/>
1818
+ <key>AppleEg2Info</key>
1819
+ <false/>
1820
+ <key>AppleFramebufferInfo</key>
1821
+ <false/>
1822
+ <key>AppleImageConversion</key>
1823
+ <false/>
1824
+ <key>AppleImg4Verification</key>
1825
+ <false/>
1826
+ <key>AppleKeyMap</key>
1827
+ <false/>
1828
+ <key>AppleRtcRam</key>
1829
+ <false/>
1830
+ <key>AppleSecureBoot</key>
1831
+ <false/>
1832
+ <key>AppleSmcIo</key>
1833
+ <false/>
1834
+ <key>AppleUserInterfaceTheme</key>
1835
+ <false/>
1836
+ <key>DataHub</key>
1837
+ <false/>
1838
+ <key>DeviceProperties</key>
1839
+ <false/>
1840
+ <key>FirmwareVolume</key>
1841
+ <true/>
1842
+ <key>HashServices</key>
1843
+ <false/>
1844
+ <key>OSInfo</key>
1845
+ <false/>
1846
+ <key>PciIo</key>
1847
+ <false/>
1848
+ <key>UnicodeCollation</key>
1849
+ <false/>
1850
+ </dict>
1851
+ <key>Quirks</key>
1852
+ <dict>
1853
+ <key>ActivateHpetSupport</key>
1854
+ <false/>
1855
+ <key>DisableSecurityPolicy</key>
1856
+ <false/>
1857
+ <key>EnableVectorAcceleration</key>
1858
+ <true/>
1859
+ <key>EnableVmx</key>
1860
+ <false/>
1861
+ <key>ExitBootServicesDelay</key>
1862
+ <integer>0</integer>
1863
+ <key>ForceOcWriteFlash</key>
1864
+ <false/>
1865
+ <key>ForgeUefiSupport</key>
1866
+ <false/>
1867
+ <key>IgnoreInvalidFlexRatio</key>
1868
+ <false/>
1869
+ <key>ReleaseUsbOwnership</key>
1870
+ <false/>
1871
+ <key>ReloadOptionRoms</key>
1872
+ <false/>
1873
+ <key>RequestBootVarRouting</key>
1874
+ <false/>
1875
+ <key>ResizeGpuBars</key>
1876
+ <integer>-1</integer>
1877
+ <key>ResizeUsePciRbIo</key>
1878
+ <false/>
1879
+ <key>ShimRetainProtocol</key>
1880
+ <false/>
1881
+ <key>TscSyncTimeout</key>
1882
+ <integer>0</integer>
1883
+ <key>UnblockFsConnect</key>
1884
+ <false/>
1885
+ </dict>
1886
+ <key>ReservedMemory</key>
1887
+ <array/>
1888
+ </dict>
1889
+ </dict>
1890
+ </plist>
kubernetes.yml ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ apiVersion: v1
2
+ kind: PersistentVolumeClaim
3
+ metadata:
4
+ name: macos-pvc
5
+ spec:
6
+ accessModes:
7
+ - ReadWriteOnce
8
+ resources:
9
+ requests:
10
+ storage: 64Gi
11
+ ---
12
+ apiVersion: v1
13
+ kind: Pod
14
+ metadata:
15
+ name: macos
16
+ labels:
17
+ name: macos
18
+ spec:
19
+ terminationGracePeriodSeconds: 120 # the Kubernetes default is 30 seconds and it may be not enough
20
+ containers:
21
+ - name: macos
22
+ image: dockurr/macos
23
+ ports:
24
+ - containerPort: 8006
25
+ protocol: TCP
26
+ - containerPort: 5000
27
+ protocol: TCP
28
+ - containerPort: 5000
29
+ protocol: UDP
30
+ securityContext:
31
+ privileged: true
32
+ env:
33
+ - name: RAM_SIZE
34
+ value: 4G
35
+ - name: CPU_CORES
36
+ value: "2"
37
+ - name: DISK_SIZE
38
+ value: "64G"
39
+ volumeMounts:
40
+ - mountPath: /storage
41
+ name: storage
42
+ - mountPath: /dev/kvm
43
+ name: dev-kvm
44
+ volumes:
45
+ - name: storage
46
+ persistentVolumeClaim:
47
+ claimName: macos-pvc
48
+ - name: dev-kvm
49
+ hostPath:
50
+ path: /dev/kvm
51
+ ---
52
+ apiVersion: v1
53
+ kind: Service
54
+ metadata:
55
+ name: macos
56
+ spec:
57
+ type: NodePort
58
+ selector:
59
+ name: macos
60
+ ports:
61
+ - name: tcp-8006
62
+ protocol: TCP
63
+ port: 8006
64
+ targetPort: 8006
65
+ - name: tcp-5900
66
+ protocol: TCP
67
+ port: 5900
68
+ targetPort: 5900
69
+ - name: udp-5900
70
+ protocol: UDP
71
+ port: 5900
72
+ targetPort: 5900
license.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
src/boot.sh ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -Eeuo pipefail
3
+
4
+ # Docker environment variables
5
+ : "${BOOT_MODE:="macos"}" # Boot mode
6
+
7
+ BOOT_DESC=""
8
+ BOOT_OPTS=""
9
+ SECURE="off"
10
+ OVMF="/usr/share/OVMF"
11
+
12
+ case "${HEIGHT,,}" in
13
+ "1080" )
14
+ DEST="$PROCESS"
15
+ ROM="OVMF_CODE.fd"
16
+ VARS="OVMF_VARS-1920x1080.fd"
17
+ ;;
18
+ "768" )
19
+ DEST="${PROCESS}_hd"
20
+ ROM="OVMF_CODE.fd"
21
+ VARS="OVMF_VARS-1024x768.fd"
22
+ ;;
23
+ *)
24
+ ROM="OVMF_CODE.fd"
25
+ VARS="OVMF_VARS.fd"
26
+ DEST="${PROCESS}_${HEIGHT}"
27
+ ;;
28
+ esac
29
+
30
+ BOOT_OPTS+=" -smbios type=2"
31
+ BOOT_OPTS+=" -rtc base=utc,base=localtime"
32
+ BOOT_OPTS+=" -global ICH9-LPC.disable_s3=1"
33
+ BOOT_OPTS+=" -global ICH9-LPC.disable_s4=1"
34
+ BOOT_OPTS+=" -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off"
35
+
36
+ osk=$(echo "bheuneqjbexolgurfrjbeqfthneqrqcyrnfrqbagfgrny(p)NccyrPbzchgreVap" | tr 'A-Za-z' 'N-ZA-Mn-za-m')
37
+ BOOT_OPTS+=" -device isa-applesmc,osk=$osk"
38
+
39
+ # OVMF
40
+ DEST="$STORAGE/$DEST"
41
+
42
+ if [ ! -s "$DEST.rom" ] || [ ! -f "$DEST.rom" ]; then
43
+ [ ! -s "$OVMF/$ROM" ] || [ ! -f "$OVMF/$ROM" ] && error "UEFI boot file ($OVMF/$ROM) not found!" && exit 44
44
+ cp "$OVMF/$ROM" "$DEST.rom"
45
+ fi
46
+
47
+ if [ ! -s "$DEST.vars" ] || [ ! -f "$DEST.vars" ]; then
48
+ [ ! -s "$OVMF/$VARS" ] || [ ! -f "$OVMF/$VARS" ]&& error "UEFI vars file ($OVMF/$VARS) not found!" && exit 45
49
+ cp "$OVMF/$VARS" "$DEST.vars"
50
+ fi
51
+
52
+ BOOT_OPTS+=" -drive if=pflash,format=raw,readonly=on,file=$DEST.rom"
53
+ BOOT_OPTS+=" -drive if=pflash,format=raw,file=$DEST.vars"
54
+
55
+ IMG="$STORAGE/boot.img"
56
+
57
+ if [ ! -f "$IMG" ]; then
58
+
59
+ FILE="OpenCore.img"
60
+ IMG="/tmp/$FILE"
61
+ rm -f "$IMG"
62
+
63
+ # OpenCoreBoot
64
+ ISO="/opencore.iso"
65
+ OUT="/tmp/extract"
66
+
67
+ rm -rf "$OUT"
68
+ mkdir -p "$OUT"
69
+
70
+ msg="Building boot image"
71
+ info "$msg..." && html "$msg..."
72
+
73
+ [ ! -f "$ISO" ] && gzip -dk "$ISO.gz"
74
+
75
+ if [ ! -f "$ISO" ] || [ ! -s "$ISO" ]; then
76
+ error "Could not find image file \"$ISO\"." && exit 10
77
+ fi
78
+
79
+ START=$(sfdisk -l "$ISO" | grep -i -m 1 "EFI System" | awk '{print $2}')
80
+ mcopy -bspmQ -i "$ISO@@${START}S" ::EFI "$OUT"
81
+
82
+ CFG="$OUT/EFI/OC/config.plist"
83
+ cp /config.plist "$CFG"
84
+
85
+ ROM="${MAC//[^[:alnum:]]/}"
86
+ ROM="${ROM,,}"
87
+ BROM=$(echo "$ROM" | xxd -r -p | base64)
88
+ RESOLUTION="${WIDTH}x${HEIGHT}@32"
89
+
90
+ sed -r -i -e 's|<data>m7zhIYfl</data>|<data>'"${BROM}"'</data>|g' "$CFG"
91
+ sed -r -i -e 's|<string>iMacPro1,1</string>|<string>'"${MODEL}"'</string>|g' "$CFG"
92
+ sed -r -i -e 's|<string>C02TM2ZBHX87</string>|<string>'"${SN}"'</string>|g' "$CFG"
93
+ sed -r -i -e 's|<string>C02717306J9JG361M</string>|<string>'"${MLB}"'</string>|g' "$CFG"
94
+ sed -r -i -e 's|<string>1920x1080@32</string>|<string>'"${RESOLUTION}"'</string>|g' "$CFG"
95
+ sed -r -i -e 's|<string>007076A6-F2A2-4461-BBE5-BAD019F8025A</string>|<string>'"${UUID}"'</string>|g' "$CFG"
96
+
97
+ # Build image
98
+
99
+ MB=256
100
+ CLUSTER=4
101
+ START=2048
102
+ SECTOR=512
103
+ FIRST_LBA=34
104
+
105
+ SIZE=$(( MB*1024*1024 ))
106
+ OFFSET=$(( START*SECTOR ))
107
+ TOTAL=$(( SIZE-(FIRST_LBA*SECTOR) ))
108
+ LAST_LBA=$(( TOTAL/SECTOR ))
109
+ COUNT=$(( LAST_LBA-(START-1) ))
110
+
111
+ if ! truncate -s "$SIZE" "$IMG"; then
112
+ rm -f "$IMG"
113
+ error "Could not allocate space to create image $IMG ." && exit 11
114
+ fi
115
+
116
+ PART="/tmp/partition.fdisk"
117
+
118
+ { echo "label: gpt"
119
+ echo "label-id: 1ACB1E00-3B8F-4B2A-86A4-D99ED21DCAEB"
120
+ echo "device: $FILE"
121
+ echo "unit: sectors"
122
+ echo "first-lba: $FIRST_LBA"
123
+ echo "last-lba: $LAST_LBA"
124
+ echo "sector-size: $SECTOR"
125
+ echo ""
126
+ echo "${FILE}1 : start=$START, size=$COUNT, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=05157F6E-0AE8-4D1A-BEA5-AC172453D02C, name=\"primary\""
127
+
128
+ } > "$PART"
129
+
130
+ sfdisk -q "$IMG" < "$PART"
131
+ echo "drive c: file=\"$IMG\" partition=0 offset=$OFFSET" > /etc/mtools.conf
132
+
133
+ mformat -F -M "$SECTOR" -c "$CLUSTER" -T "$COUNT" -v "EFI" "C:"
134
+ mcopy -bspmQ "$OUT/EFI" "C:"
135
+
136
+ rm -rf "$OUT"
137
+
138
+ if [[ "$DEBUG" == [Yy1]* ]]; then
139
+ info ""
140
+ info "Model: $MODEL"
141
+ info "Rom: $ROM"
142
+ info "Serial: $SN"
143
+ info "Board: $MLB"
144
+ info ""
145
+ fi
146
+
147
+ fi
148
+
149
+ BOOT_DRIVE_ID="OpenCore"
150
+
151
+ DISK_OPTS+=" -device virtio-blk-pci,drive=${BOOT_DRIVE_ID},bus=pcie.0,addr=0x5,bootindex=$BOOT_INDEX"
152
+ DISK_OPTS+=" -drive file=$IMG,id=$BOOT_DRIVE_ID,format=raw,cache=unsafe,readonly=on,if=none"
153
+
154
+ CPU_VENDOR=$(lscpu | awk '/Vendor ID/{print $3}')
155
+ DEFAULT_FLAGS="vendor=GenuineIntel,vmware-cpuid-freq=on,-pdpe1gb"
156
+
157
+ if [[ "$CPU_VENDOR" != "GenuineIntel" ]] || [[ "${KVM:-}" == [Nn]* ]]; then
158
+ [ -z "${CPU_MODEL:-}" ] && CPU_MODEL="Haswell-noTSX"
159
+ DEFAULT_FLAGS+=",+pcid,+ssse3,+sse4.2,+popcnt,+avx,+avx2,+aes,+fma,+bmi1,+bmi2,+smep,+xsave,+xsavec,+xsaveopt,+xgetbv1,+movbe,+rdrand,check"
160
+ fi
161
+
162
+ if [ -z "${CPU_FLAGS:-}" ]; then
163
+ CPU_FLAGS="$DEFAULT_FLAGS"
164
+ else
165
+ CPU_FLAGS="$DEFAULT_FLAGS,$CPU_FLAGS"
166
+ fi
167
+
168
+ CLOCK="/sys/devices/system/clocksource/clocksource0/current_clocksource"
169
+ [ -f "$CLOCK" ] && CLOCK=$(<"$CLOCK")
170
+
171
+ if [[ "${CLOCK,,}" == "kvm-clock" ]]; then
172
+ if [[ "$CPU_VENDOR" != "GenuineIntel" ]] && [[ "${CPU_CORES,,}" == "2" ]]; then
173
+ warn "Restricted processor to a single core because nested virtualization was detected!"
174
+ CPU_CORES="1"
175
+ else
176
+ warn "Nested virtualization was detected, this might cause issues running macOS!"
177
+ fi
178
+ fi
179
+
180
+ if [[ "${CLOCK,,}" == "hpet" ]]; then
181
+ warn "Your clocksource is HPET instead of TSC, this will cause issues running macOS!"
182
+ fi
183
+
184
+ case "$CPU_CORES" in
185
+ "" | "0" | "3" ) CPU_CORES="2" ;;
186
+ "5" ) CPU_CORES="4" ;;
187
+ "9" ) CPU_CORES="8" ;;
188
+ esac
189
+
190
+ case "$CPU_CORES" in
191
+ "1" | "2" | "4" | "8" ) SMP="$CPU_CORES,sockets=1,dies=1,cores=$CPU_CORES,threads=1" ;;
192
+ "6" | "7" ) SMP="$CPU_CORES,sockets=3,dies=1,cores=2,threads=1" ;;
193
+ "10" | "11" ) SMP="$CPU_CORES,sockets=5,dies=1,cores=2,threads=1" ;;
194
+ "12" | "13" ) SMP="$CPU_CORES,sockets=3,dies=1,cores=4,threads=1" ;;
195
+ "14" | "15" ) SMP="$CPU_CORES,sockets=7,dies=1,cores=2,threads=1" ;;
196
+ "16" | "32" | "64" ) SMP="$CPU_CORES,sockets=1,dies=1,cores=$CPU_CORES,threads=1" ;;
197
+ *)
198
+ error "Invalid amount of CPU_CORES, value \"${CPU_CORES}\" is not a power of 2!" && exit 35
199
+ ;;
200
+ esac
201
+
202
+ USB="nec-usb-xhci,id=xhci"
203
+ USB+=" -device usb-kbd,bus=xhci.0"
204
+ USB+=" -global nec-usb-xhci.msi=off"
205
+
206
+ return 0
src/entry.sh ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -Eeuo pipefail
3
+
4
+ : "${VGA:="vmware"}"
5
+ : "${DISK_TYPE:="blk"}"
6
+
7
+ APP="macOS"
8
+ SUPPORT="https://github.com/dockur/macos"
9
+
10
+ cd /run
11
+
12
+ . reset.sh # Initialize system
13
+ . install.sh # Get the OSX images
14
+ . disk.sh # Initialize disks
15
+ . display.sh # Initialize graphics
16
+ . network.sh # Initialize network
17
+ . boot.sh # Configure boot
18
+ . proc.sh # Initialize processor
19
+ . config.sh # Configure arguments
20
+
21
+ trap - ERR
22
+
23
+ version=$(qemu-system-x86_64 --version | head -n 1 | cut -d '(' -f 1 | awk '{ print $NF }')
24
+ info "Booting ${APP}${BOOT_DESC} using QEMU v$version..."
25
+
26
+ exec qemu-system-x86_64 ${ARGS:+ $ARGS}
src/fetch.py ADDED
@@ -0,0 +1,512 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+
3
+ """
4
+ Gather recovery information for Macs.
5
+ Copyright (c) 2019, vit9696
6
+ https://github.com/acidanthera/OpenCorePkg/blob/master/Utilities/macrecovery/macrecovery.py
7
+ """
8
+
9
+ import argparse
10
+ import hashlib
11
+ import json
12
+ import linecache
13
+ import os
14
+ import random
15
+ import struct
16
+ import string
17
+ import sys
18
+
19
+ try:
20
+ from urllib.request import Request, HTTPError, urlopen
21
+ from urllib.parse import urlparse
22
+ except ImportError:
23
+ print('ERROR: Python 2 is not supported, please use Python 3')
24
+ sys.exit(1)
25
+
26
+ SELF_DIR = os.path.dirname(os.path.realpath(__file__))
27
+
28
+ # MacPro7,1
29
+ RECENT_MAC = 'Mac-27AD2F918AE68F61'
30
+ MLB_ZERO = '00000000000000000'
31
+ MLB_VALID = 'F5K105303J9K3F71M'
32
+ MLB_PRODUCT = 'F5K00000000K3F700'
33
+
34
+ TYPE_SID = 16
35
+ TYPE_K = 64
36
+ TYPE_FG = 64
37
+
38
+ INFO_PRODUCT = 'AP'
39
+ INFO_IMAGE_LINK = 'AU'
40
+ INFO_IMAGE_HASH = 'AH'
41
+ INFO_IMAGE_SESS = 'AT'
42
+ INFO_SIGN_LINK = 'CU'
43
+ INFO_SIGN_HASH = 'CH'
44
+ INFO_SIGN_SESS = 'CT'
45
+ INFO_REQURED = [INFO_PRODUCT, INFO_IMAGE_LINK, INFO_IMAGE_HASH, INFO_IMAGE_SESS, INFO_SIGN_LINK, INFO_SIGN_HASH, INFO_SIGN_SESS]
46
+
47
+ def run_query(url, headers, post=None, raw=False):
48
+ if post is not None:
49
+ data = '\n'.join(entry + '=' + post[entry] for entry in post).encode()
50
+ else:
51
+ data = None
52
+ req = Request(url=url, headers=headers, data=data)
53
+ try:
54
+ response = urlopen(req)
55
+ if raw:
56
+ return response
57
+ return dict(response.info()), response.read()
58
+ except HTTPError as e:
59
+ print(f'ERROR: "{e}" when connecting to {url}')
60
+ sys.exit(1)
61
+
62
+
63
+ def generate_id(id_type, id_value=None):
64
+ return id_value or ''.join(random.choices(string.hexdigits[:16].upper(), k=id_type))
65
+
66
+
67
+ def product_mlb(mlb):
68
+ return '00000000000' + mlb[11:15] + '00'
69
+
70
+
71
+ def mlb_from_eeee(eeee):
72
+ if len(eeee) != 4:
73
+ print('ERROR: Invalid EEEE code length!')
74
+ sys.exit(1)
75
+
76
+ return f'00000000000{eeee}00'
77
+
78
+
79
+ # zhangyoufu https://gist.github.com/MCJack123/943eaca762730ca4b7ae460b731b68e7#gistcomment-3061078 2021-10-08
80
+ Apple_EFI_ROM_public_key_1 = 0xC3E748CAD9CD384329E10E25A91E43E1A762FF529ADE578C935BDDF9B13F2179D4855E6FC89E9E29CA12517D17DFA1EDCE0BEBF0EA7B461FFE61D94E2BDF72C196F89ACD3536B644064014DAE25A15DB6BB0852ECBD120916318D1CCDEA3C84C92ED743FC176D0BACA920D3FCF3158AFF731F88CE0623182A8ED67E650515F75745909F07D415F55FC15A35654D118C55A462D37A3ACDA08612F3F3F6571761EFCCBCC299AEE99B3A4FD6212CCFFF5EF37A2C334E871191F7E1C31960E010A54E86FA3F62E6D6905E1CD57732410A3EB0C6B4DEFDABE9F59BF1618758C751CD56CEF851D1C0EAA1C558E37AC108DA9089863D20E2E7E4BF475EC66FE6B3EFDCF
81
+
82
+ ChunkListHeader = struct.Struct('<4sIBBBxQQQ')
83
+ assert ChunkListHeader.size == 0x24
84
+
85
+ Chunk = struct.Struct('<I32s')
86
+ assert Chunk.size == 0x24
87
+
88
+
89
+ def verify_chunklist(cnkpath):
90
+ with open(cnkpath, 'rb') as f:
91
+ hash_ctx = hashlib.sha256()
92
+ data = f.read(ChunkListHeader.size)
93
+ hash_ctx.update(data)
94
+ magic, header_size, file_version, chunk_method, signature_method, chunk_count, chunk_offset, signature_offset = ChunkListHeader.unpack(data)
95
+ assert magic == b'CNKL'
96
+ assert header_size == ChunkListHeader.size
97
+ assert file_version == 1
98
+ assert chunk_method == 1
99
+ assert signature_method in [1, 2]
100
+ assert chunk_count > 0
101
+ assert chunk_offset == 0x24
102
+ assert signature_offset == chunk_offset + Chunk.size * chunk_count
103
+ for _ in range(chunk_count):
104
+ data = f.read(Chunk.size)
105
+ hash_ctx.update(data)
106
+ chunk_size, chunk_sha256 = Chunk.unpack(data)
107
+ yield chunk_size, chunk_sha256
108
+ digest = hash_ctx.digest()
109
+ if signature_method == 1:
110
+ data = f.read(256)
111
+ assert len(data) == 256
112
+ signature = int.from_bytes(data, 'little')
113
+ plaintext = int(f'0x1{"f"*404}003031300d060960864801650304020105000420{"0"*64}', 16) | int.from_bytes(digest, 'big')
114
+ assert pow(signature, 0x10001, Apple_EFI_ROM_public_key_1) == plaintext
115
+ elif signature_method == 2:
116
+ data = f.read(32)
117
+ assert data == digest
118
+ raise RuntimeError('Chunklist missing digital signature')
119
+ else:
120
+ raise NotImplementedError
121
+ assert f.read(1) == b''
122
+
123
+
124
+ def get_session(args):
125
+ headers = {
126
+ 'Host': 'osrecovery.apple.com',
127
+ 'Connection': 'close',
128
+ 'User-Agent': 'InternetRecovery/1.0',
129
+ }
130
+
131
+ headers, _ = run_query('http://osrecovery.apple.com/', headers)
132
+
133
+ if args.verbose:
134
+ print('Session headers:')
135
+ for header in headers:
136
+ print(f'{header}: {headers[header]}')
137
+
138
+ for header in headers:
139
+ if header.lower() == 'set-cookie':
140
+ cookies = headers[header].split('; ')
141
+ for cookie in cookies:
142
+ return cookie if cookie.startswith('session=') else ...
143
+
144
+ raise RuntimeError('No session in headers ' + str(headers))
145
+
146
+
147
+ def get_image_info(session, bid, mlb=MLB_ZERO, diag=False, os_type='default', cid=None):
148
+ headers = {
149
+ 'Host': 'osrecovery.apple.com',
150
+ 'Connection': 'close',
151
+ 'User-Agent': 'InternetRecovery/1.0',
152
+ 'Cookie': session,
153
+ 'Content-Type': 'text/plain',
154
+ }
155
+
156
+ post = {
157
+ 'cid': generate_id(TYPE_SID, cid),
158
+ 'sn': mlb,
159
+ 'bid': bid,
160
+ 'k': generate_id(TYPE_K),
161
+ 'fg': generate_id(TYPE_FG)
162
+ }
163
+
164
+ if diag:
165
+ url = 'http://osrecovery.apple.com/InstallationPayload/Diagnostics'
166
+ else:
167
+ url = 'http://osrecovery.apple.com/InstallationPayload/RecoveryImage'
168
+ post['os'] = os_type
169
+
170
+ headers, output = run_query(url, headers, post)
171
+
172
+ output = output.decode('utf-8')
173
+ info = {}
174
+ for line in output.split('\n'):
175
+ try:
176
+ key, value = line.split(': ')
177
+ info[key] = value
178
+ except KeyError:
179
+ continue
180
+ except ValueError:
181
+ continue
182
+
183
+ for k in INFO_REQURED:
184
+ if k not in info:
185
+ raise RuntimeError(f'Missing key {k}')
186
+
187
+ return info
188
+
189
+
190
+ def save_image(url, sess, filename='', directory=''):
191
+ purl = urlparse(url)
192
+ headers = {
193
+ 'Host': purl.hostname,
194
+ 'Connection': 'close',
195
+ 'User-Agent': 'InternetRecovery/1.0',
196
+ 'Cookie': '='.join(['AssetToken', sess])
197
+ }
198
+
199
+ if not os.path.exists(directory):
200
+ os.makedirs(directory)
201
+
202
+ if filename == '':
203
+ filename = os.path.basename(purl.path)
204
+ if filename.find(os.sep) >= 0 or filename == '':
205
+ raise RuntimeError('Invalid save path ' + filename)
206
+
207
+ print(f'Saving {url} to {directory}{os.sep}{filename}...')
208
+
209
+ with open(os.path.join(directory, filename), 'wb') as fh:
210
+ response = run_query(url, headers, raw=True)
211
+ headers = dict(response.headers)
212
+ totalsize = -1
213
+ for header in headers:
214
+ if header.lower() == 'content-length':
215
+ totalsize = int(headers[header])
216
+ break
217
+ size = 0
218
+ last = 0
219
+ while True:
220
+ chunk = response.read(2**20)
221
+ if not chunk:
222
+ break
223
+ fh.write(chunk)
224
+ size += len(chunk)
225
+ if totalsize > 0:
226
+ progress = size / totalsize
227
+ if (progress - last) >= 0.01 or progress >= 1:
228
+ last = progress
229
+ print(f'\r{progress*100:.1f}% downloaded', end='')
230
+ else:
231
+ # Fallback if Content-Length isn't available
232
+ progress = size / (2**20)
233
+ if (progress - last) >= 10:
234
+ last = progress
235
+ print(f'\r{progress} MB downloaded...', end='')
236
+ sys.stdout.flush()
237
+ print('\nDownload complete!')
238
+
239
+ return os.path.join(directory, os.path.basename(filename))
240
+
241
+
242
+ def verify_image(dmgpath, cnkpath):
243
+ print('Verifying image with chunklist...')
244
+
245
+ with open(dmgpath, 'rb') as dmgf:
246
+ last=0
247
+ for cnkcount, (cnksize, cnkhash) in enumerate(verify_chunklist(cnkpath), 1):
248
+ if (cnkcount - last) >= 10:
249
+ last = cnkcount
250
+ print(f'\rChunk {cnkcount} ({cnksize} bytes)', end='')
251
+ sys.stdout.flush()
252
+ cnk = dmgf.read(cnksize)
253
+ if len(cnk) != cnksize:
254
+ raise RuntimeError(f'Invalid chunk {cnkcount} size: expected {cnksize}, read {len(cnk)}')
255
+ if hashlib.sha256(cnk).digest() != cnkhash:
256
+ raise RuntimeError(f'Invalid chunk {cnkcount}: hash mismatch')
257
+ if dmgf.read(1) != b'':
258
+ raise RuntimeError('Invalid image: larger than chunklist')
259
+ print('\nImage verification complete!')
260
+
261
+
262
+ def action_download(args):
263
+ """
264
+ Reference information for queries:
265
+
266
+ Recovery latest:
267
+ cid=3076CE439155BA14
268
+ sn=...
269
+ bid=Mac-E43C1C25D4880AD6
270
+ k=4BE523BB136EB12B1758C70DB43BDD485EBCB6A457854245F9E9FF0587FB790C
271
+ os=latest
272
+ fg=B2E6AA07DB9088BE5BDB38DB2EA824FDDFB6C3AC5272203B32D89F9D8E3528DC
273
+
274
+ Recovery default:
275
+ cid=4A35CB95FF396EE7
276
+ sn=...
277
+ bid=Mac-E43C1C25D4880AD6
278
+ k=0A385E6FFC3DDD990A8A1F4EC8B98C92CA5E19C9FF1DD26508C54936D8523121
279
+ os=default
280
+ fg=B2E6AA07DB9088BE5BDB38DB2EA824FDDFB6C3AC5272203B32D89F9D8E3528DC
281
+
282
+ Diagnostics:
283
+ cid=050C59B51497CEC8
284
+ sn=...
285
+ bid=Mac-E43C1C25D4880AD6
286
+ k=37D42A8282FE04A12A7D946304F403E56A2155B9622B385F3EB959A2FBAB8C93
287
+ fg=B2E6AA07DB9088BE5BDB38DB2EA824FDDFB6C3AC5272203B32D89F9D8E3528DC
288
+ """
289
+
290
+ session = get_session(args)
291
+ info = get_image_info(session, bid=args.board_id, mlb=args.mlb, diag=args.diagnostics, os_type=args.os_type)
292
+ if args.verbose:
293
+ print(info)
294
+ print(f'Downloading {info[INFO_PRODUCT]}...')
295
+ cnkname = '' if args.basename == '' else args.basename + '.chunklist'
296
+ cnkpath = save_image(info[INFO_SIGN_LINK], info[INFO_SIGN_SESS], cnkname, args.outdir)
297
+ dmgname = '' if args.basename == '' else args.basename + '.dmg'
298
+ dmgpath = save_image(info[INFO_IMAGE_LINK], info[INFO_IMAGE_SESS], dmgname, args.outdir)
299
+ try:
300
+ verify_image(dmgpath, cnkpath)
301
+ return 0
302
+ except Exception as err:
303
+ if isinstance(err, AssertionError) and str(err) == '':
304
+ try:
305
+ tb = sys.exc_info()[2]
306
+ while tb.tb_next:
307
+ tb = tb.tb_next
308
+ err = linecache.getline(tb.tb_frame.f_code.co_filename, tb.tb_lineno, tb.tb_frame.f_globals).strip()
309
+ except Exception:
310
+ err = "Invalid chunklist"
311
+ print(f'\rImage verification failed. ({err})')
312
+ return 1
313
+
314
+
315
+ def action_selfcheck(args):
316
+ """
317
+ Sanity check server logic for recovery:
318
+
319
+ if not valid(bid):
320
+ return error()
321
+ ppp = get_ppp(sn)
322
+ if not valid(ppp):
323
+ return latest_recovery(bid = bid) # Returns newest for bid.
324
+ if valid(sn):
325
+ if os == 'default':
326
+ return default_recovery(sn = sn, ppp = ppp) # Returns oldest for sn.
327
+ else:
328
+ return latest_recovery(sn = sn, ppp = ppp) # Returns newest for sn.
329
+ return default_recovery(ppp = ppp) # Returns oldest.
330
+ """
331
+
332
+ session = get_session(args)
333
+ valid_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_VALID, diag=False, os_type='default')
334
+ valid_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_VALID, diag=False, os_type='latest')
335
+ product_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_PRODUCT, diag=False, os_type='default')
336
+ product_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_PRODUCT, diag=False, os_type='latest')
337
+ generic_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO, diag=False, os_type='default')
338
+ generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO, diag=False, os_type='latest')
339
+
340
+ if args.verbose:
341
+ print(valid_default)
342
+ print(valid_latest)
343
+ print(product_default)
344
+ print(product_latest)
345
+ print(generic_default)
346
+ print(generic_latest)
347
+
348
+ if valid_default[INFO_PRODUCT] == valid_latest[INFO_PRODUCT]:
349
+ # Valid MLB must give different default and latest if this is not a too new product.
350
+ print(f'ERROR: Cannot determine any previous product, got {valid_default[INFO_PRODUCT]}')
351
+ return 1
352
+
353
+ if product_default[INFO_PRODUCT] != product_latest[INFO_PRODUCT]:
354
+ # Product-only MLB must give the same value for default and latest.
355
+ print(f'ERROR: Latest and default do not match for product MLB, got {product_default[INFO_PRODUCT]} and {product_latest[INFO_PRODUCT]}')
356
+ return 1
357
+
358
+ if generic_default[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
359
+ # Zero MLB always give the same value for default and latest.
360
+ print(f'ERROR: Generic MLB gives different product, got {generic_default[INFO_PRODUCT]} and {generic_latest[INFO_PRODUCT]}')
361
+ return 1
362
+
363
+ if valid_latest[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
364
+ # Valid MLB must always equal generic MLB.
365
+ print(f'ERROR: Cannot determine unified latest product, got {valid_latest[INFO_PRODUCT]} and {generic_latest[INFO_PRODUCT]}')
366
+ return 1
367
+
368
+ if product_default[INFO_PRODUCT] != valid_default[INFO_PRODUCT]:
369
+ # Product-only MLB can give the same value with valid default MLB.
370
+ # This is not an error for all models, but for our chosen code it is.
371
+ print(f'ERROR: Valid and product MLB give mismatch, got {product_default[INFO_PRODUCT]} and {valid_default[INFO_PRODUCT]}')
372
+ return 1
373
+
374
+ print('SUCCESS: Found no discrepancies with MLB validation algorithm!')
375
+ return 0
376
+
377
+
378
+ def action_verify(args):
379
+ """
380
+ Try to verify MLB serial number.
381
+ """
382
+ session = get_session(args)
383
+ generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO, diag=False, os_type='latest')
384
+ uvalid_default = get_image_info(session, bid=args.board_id, mlb=args.mlb, diag=False, os_type='default')
385
+ uvalid_latest = get_image_info(session, bid=args.board_id, mlb=args.mlb, diag=False, os_type='latest')
386
+ uproduct_default = get_image_info(session, bid=args.board_id, mlb=product_mlb(args.mlb), diag=False, os_type='default')
387
+
388
+ if args.verbose:
389
+ print(generic_latest)
390
+ print(uvalid_default)
391
+ print(uvalid_latest)
392
+ print(uproduct_default)
393
+
394
+ # Verify our MLB number.
395
+ if uvalid_default[INFO_PRODUCT] != uvalid_latest[INFO_PRODUCT]:
396
+ print(f'SUCCESS: {args.mlb} MLB looks valid and supported!' if uvalid_latest[INFO_PRODUCT] == generic_latest[INFO_PRODUCT] else f'SUCCESS: {args.mlb} MLB looks valid, but probably unsupported!')
397
+ return 0
398
+
399
+ print('UNKNOWN: Run selfcheck, check your board-id, or try again later!')
400
+
401
+ # Here we have matching default and latest products. This can only be true for very
402
+ # new models. These models get either latest or special builds.
403
+ if uvalid_default[INFO_PRODUCT] == generic_latest[INFO_PRODUCT]:
404
+ print(f'UNKNOWN: {args.mlb} MLB can be valid if very new!')
405
+ return 0
406
+ if uproduct_default[INFO_PRODUCT] != uvalid_default[INFO_PRODUCT]:
407
+ print(f'UNKNOWN: {args.mlb} MLB looks invalid, other models use product {uproduct_default[INFO_PRODUCT]} instead of {uvalid_default[INFO_PRODUCT]}!')
408
+ return 0
409
+ print(f'UNKNOWN: {args.mlb} MLB can be valid if very new and using special builds!')
410
+ return 0
411
+
412
+
413
+ def action_guess(args):
414
+ """
415
+ Attempt to guess which model does this MLB belong.
416
+ """
417
+
418
+ mlb = args.mlb
419
+ anon = mlb.startswith('000')
420
+
421
+ with open(args.board_db, 'r', encoding='utf-8') as fh:
422
+ db = json.load(fh)
423
+
424
+ supported = {}
425
+
426
+ session = get_session(args)
427
+
428
+ generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO, diag=False, os_type='latest')
429
+
430
+ for model in db:
431
+ try:
432
+ if anon:
433
+ # For anonymous lookup check when given model does not match latest.
434
+ model_latest = get_image_info(session, bid=model, mlb=MLB_ZERO, diag=False, os_type='latest')
435
+
436
+ if model_latest[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
437
+ if db[model] == 'current':
438
+ print(f'WARN: Skipped {model} due to using latest product {model_latest[INFO_PRODUCT]} instead of {generic_latest[INFO_PRODUCT]}')
439
+ continue
440
+
441
+ user_default = get_image_info(session, bid=model, mlb=mlb, diag=False, os_type='default')
442
+
443
+ if user_default[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
444
+ supported[model] = [db[model], user_default[INFO_PRODUCT], generic_latest[INFO_PRODUCT]]
445
+ else:
446
+ # For normal lookup check when given model has mismatching normal and latest.
447
+ user_latest = get_image_info(session, bid=model, mlb=mlb, diag=False, os_type='latest')
448
+
449
+ user_default = get_image_info(session, bid=model, mlb=mlb, diag=False, os_type='default')
450
+
451
+ if user_latest[INFO_PRODUCT] != user_default[INFO_PRODUCT]:
452
+ supported[model] = [db[model], user_default[INFO_PRODUCT], user_latest[INFO_PRODUCT]]
453
+
454
+ except Exception as e:
455
+ print(f'WARN: Failed to check {model}, exception: {e}')
456
+
457
+ if len(supported) > 0:
458
+ print(f'SUCCESS: MLB {mlb} looks supported for:')
459
+ for model in supported.items():
460
+ print(f'- {model}, up to {supported[model][0]}, default: {supported[model][1]}, latest: {supported[model][2]}')
461
+ return 0
462
+
463
+ print(f'UNKNOWN: Failed to determine supported models for MLB {mlb}!')
464
+ return None
465
+
466
+
467
+ def main():
468
+ parser = argparse.ArgumentParser(description='Gather recovery information for Macs')
469
+ parser.add_argument('action', choices=['download', 'selfcheck', 'verify', 'guess'],
470
+ help='Action to perform: "download" - performs recovery downloading,'
471
+ ' "selfcheck" checks whether MLB serial validation is possible, "verify" performs'
472
+ ' MLB serial verification, "guess" tries to find suitable mac model for MLB.')
473
+ parser.add_argument('-o', '--outdir', type=str, default='com.apple.recovery.boot',
474
+ help='customise output directory for downloading, defaults to com.apple.recovery.boot')
475
+ parser.add_argument('-n', '--basename', type=str, default='',
476
+ help='customise base name for downloading, defaults to remote name')
477
+ parser.add_argument('-b', '--board-id', type=str, default=RECENT_MAC,
478
+ help=f'use specified board identifier for downloading, defaults to {RECENT_MAC}')
479
+ parser.add_argument('-m', '--mlb', type=str, default=MLB_ZERO,
480
+ help=f'use specified logic board serial for downloading, defaults to {MLB_ZERO}')
481
+ parser.add_argument('-e', '--code', type=str, default='',
482
+ help='generate product logic board serial with specified product EEEE code')
483
+ parser.add_argument('-os', '--os-type', type=str, default='default', choices=['default', 'latest'],
484
+ help=f'use specified os type, defaults to default {MLB_ZERO}')
485
+ parser.add_argument('-diag', '--diagnostics', action='store_true', help='download diagnostics image')
486
+ parser.add_argument('-v', '--verbose', action='store_true', help='print debug information')
487
+ parser.add_argument('-db', '--board-db', type=str, default=os.path.join(SELF_DIR, 'boards.json'),
488
+ help='use custom board list for checking, defaults to boards.json')
489
+
490
+ args = parser.parse_args()
491
+
492
+ if args.code != '':
493
+ args.mlb = mlb_from_eeee(args.code)
494
+
495
+ if len(args.mlb) != 17:
496
+ print('ERROR: Cannot use MLBs in non 17 character format!')
497
+ sys.exit(1)
498
+
499
+ if args.action == 'download':
500
+ return action_download(args)
501
+ if args.action == 'selfcheck':
502
+ return action_selfcheck(args)
503
+ if args.action == 'verify':
504
+ return action_verify(args)
505
+ if args.action == 'guess':
506
+ return action_guess(args)
507
+
508
+ assert False
509
+
510
+
511
+ if __name__ == '__main__':
512
+ sys.exit(main())
src/install.sh ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -Eeuo pipefail
3
+
4
+ # Docker environment variables
5
+
6
+ : "${SN:=""}" # Device serial
7
+ : "${MLB:=""}" # Board serial
8
+ : "${MAC:=""}" # MAC address
9
+ : "${UUID:=""}" # Unique ID
10
+ : "${WIDTH:="1920"}" # Horizontal
11
+ : "${HEIGHT:="1080"}" # Vertical
12
+ : "${VERSION:="13"}" # OSX Version
13
+ : "${MODEL:="iMacPro1,1"}" # Device model
14
+
15
+ TMP="$STORAGE/tmp"
16
+ BASE_IMG_ID="InstallMedia"
17
+ BASE_IMG="$STORAGE/base.dmg"
18
+ BASE_VERSION="$STORAGE/$PROCESS.version"
19
+
20
+ downloadImage() {
21
+
22
+ local board
23
+ local version="$1"
24
+ local file="BaseSystem"
25
+ local path="$TMP/$file.dmg"
26
+
27
+ case "${version,,}" in
28
+ "sequoia" | "15"* )
29
+ board="Mac-937A206F2EE63C01" ;;
30
+ "sonoma" | "14"* )
31
+ board="Mac-827FAC58A8FDFA22" ;;
32
+ "ventura" | "13"* )
33
+ board="Mac-4B682C642B45593E" ;;
34
+ "monterey" | "12"* )
35
+ board="Mac-B809C3757DA9BB8D" ;;
36
+ "bigsur" | "big-sur" | "11"* )
37
+ board="Mac-2BD1B31983FE1663" ;;
38
+ "catalina" | "10"* )
39
+ board="Mac-00BE6ED71E35EB86" ;;
40
+ *)
41
+ error "Unknown VERSION specified, value \"${version}\" is not recognized!"
42
+ return 1 ;;
43
+ esac
44
+
45
+ local msg="Downloading macOS ${version^}"
46
+ info "$msg recovery image..." && html "$msg..."
47
+
48
+ rm -rf "$TMP"
49
+ mkdir -p "$TMP"
50
+
51
+ /run/progress.sh "$path" "" "$msg ([P])..." &
52
+
53
+ if ! /run/fetch.py -b "$board" -n "$file" -os latest -o "$TMP" download; then
54
+ error "Failed to fetch macOS \"${version^}\" recovery image with board id \"$board\"!"
55
+ fKill "progress.sh"
56
+ return 1
57
+ fi
58
+
59
+ fKill "progress.sh"
60
+
61
+ if [ ! -f "$path" ] || [ ! -s "$path" ]; then
62
+ error "Failed to find file \"$path\" !"
63
+ return 1
64
+ fi
65
+
66
+ mv -f "$path" "$BASE_IMG"
67
+ rm -rf "$TMP"
68
+
69
+ echo "$version" > "$BASE_VERSION"
70
+ return 0
71
+ }
72
+
73
+ generateID() {
74
+
75
+ local file="$STORAGE/$PROCESS.id"
76
+
77
+ [ -n "$UUID" ] && return 0
78
+ [ -s "$file" ] && UUID=$(<"$file")
79
+ [ -n "$UUID" ] && return 0
80
+
81
+ UUID=$(cat /proc/sys/kernel/random/uuid 2> /dev/null || uuidgen --random)
82
+ UUID="${UUID^^}"
83
+ echo "$UUID" > "$file"
84
+
85
+ return 0
86
+ }
87
+
88
+ generateAddress() {
89
+
90
+ local file="$STORAGE/$PROCESS.mac"
91
+
92
+ [ -n "$MAC" ] && return 0
93
+ [ -s "$file" ] && MAC=$(<"$file")
94
+ [ -n "$MAC" ] && return 0
95
+
96
+ # Generate Apple MAC address based on Docker container ID in hostname
97
+ MAC=$(echo "$HOST" | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/00:16:cb:\3:\4:\5/')
98
+ MAC="${MAC^^}"
99
+ echo "$MAC" > "$file"
100
+
101
+ return 0
102
+ }
103
+
104
+ generateSerial() {
105
+
106
+ local file="$STORAGE/$PROCESS.sn"
107
+ local file2="$STORAGE/$PROCESS.mlb"
108
+
109
+ [ -n "$SN" ] && [ -n "$MLB" ] && return 0
110
+ [ -s "$file" ] && SN=$(<"$file")
111
+ [ -s "$file2" ] && MLB=$(<"$file2")
112
+ [ -n "$SN" ] && [ -n "$MLB" ] && return 0
113
+
114
+ # Generate unique serial numbers for machine
115
+ SN=$(/usr/local/bin/macserial --num 1 --model "${MODEL}" 2>/dev/null)
116
+
117
+ SN="${SN##*$'\n'}"
118
+ [[ "$SN" != *" | "* ]] && error "$SN" && return 1
119
+
120
+ MLB=${SN#*|}
121
+ MLB="${MLB#"${MLB%%[![:space:]]*}"}"
122
+ SN="${SN%%|*}"
123
+ SN="${SN%"${SN##*[![:space:]]}"}"
124
+
125
+ echo "$SN" > "$file"
126
+ echo "$MLB" > "$file2"
127
+
128
+ return 0
129
+ }
130
+
131
+ if [ ! -f "$BASE_IMG" ] || [ ! -s "$BASE_IMG" ]; then
132
+ if ! downloadImage "$VERSION"; then
133
+ rm -rf "$TMP"
134
+ exit 34
135
+ fi
136
+ fi
137
+
138
+ STORED_VERSION=""
139
+ if [ -f "$BASE_VERSION" ]; then
140
+ STORED_VERSION=$(<"$BASE_VERSION")
141
+ fi
142
+
143
+ if [ "$VERSION" != "$STORED_VERSION" ]; then
144
+ info "Different version detected, switching base image from \"$STORED_VERSION\" to \"$VERSION\""
145
+ if ! downloadImage "$VERSION"; then
146
+ rm -rf "$TMP"
147
+ exit 34
148
+ fi
149
+ fi
150
+
151
+ if ! generateID; then
152
+ error "Failed to generate UUID!" && exit 35
153
+ fi
154
+
155
+ if ! generateSerial; then
156
+ error "Failed to generate serialnumber!" && exit 36
157
+ fi
158
+
159
+ if ! generateAddress; then
160
+ error "Failed to generate MAC address!" && exit 37
161
+ fi
162
+
163
+ DISK_OPTS="-device virtio-blk-pci,drive=${BASE_IMG_ID},bus=pcie.0,addr=0x6"
164
+ DISK_OPTS+=" -drive file=$BASE_IMG,id=$BASE_IMG_ID,format=dmg,cache=unsafe,readonly=on,if=none"
165
+
166
+ return 0