Giter Club home page Giter Club logo

osx-serial-generator's Introduction

OSX Serial Generator

Running mac osx in a docker container

Generate macOS valid serials, uuids, and board serials for good-faith Security Research & Apple Bug Bounty Research.

This project provides two tools for generating serial numbers for Hackintosh, OpenCore, Docker-OSX and OSX-KVM.

Author: Sick.Codes https://github.com/sickcodes | https://sick.codes | https://twitter.com/sickcodes

Follow @sickcodes on Twitter for updates! https://twitter.com/sickcodes

Terms & Conditions: Manipulation of serial numbers are an important aspect of conducting Cyber Security Research into the iMessage & Facetime frameworks. Finding and reporting vulnerabilities in Apple software before Threat Actors do is important. To use this project to find & discover vulnerabilities in said protocols, you should agree to Apple's Security Bounty program.

Upstream Thanks

This project was created for use with Docker-OSX and uses config.plist files from @Kholia's project https://github.com/kholia/OSX-KVM.

The config.plist files are also curated and maintained upstream by @thenickdude and we thank both of them for their excellent work. Upstream KVM changes are made at: https://github.com/thenickdude/KVM-Opencore

This project is a wrapper for the OpenCore project bootloader's fantastic tool called macserial.

Many thanks to the OpenCore Project for providing macserial.

See the project which drives Hackintosh: https://github.com/acidanthera/OpenCorePkg

As seen on Vice: Open-Source App Lets Anyone Create a Virtual Army of Hackintoshes

PR & Contributor Credits

https://github.com/sickcodes/osx-serial-generator/blob/master/CREDITS.md

Related

Purpose

These shell scripts were written by @sickcodes https://twitter.com/sickcodes and were created for automating the generation of unique & valid values at runtime in Docker-OSX.

This is for generating sets of serial numbers that simply work.

If this is your first time, just bash ./generate-unique-machine-values.sh and you will be given 1 complete serial number set.

With your new serial numbers, you can:

  • put them in your existing config.plist and reboot
  • tell the script to make a new OpenCore.qcow2
  • output as TSV and CSV, and more!
  • use --help to see all available goodies

Used at runtime in Docker-OSX.

Requirements

# Ubuntu, Debian, Pop
sudo apt update -y
sudo apt install libguestfs-tools build-essential wget git linux-generic gcc uuid-runtime sudo -y

# Fedora, RHEL, CentOS
sudo yum install libguestfs libguestfs-tools wget git kernel-devel gcc sudo -y
sudo yum groupinstall 'Development Tools' -y

# Arch, Manjaro
sudo pacman -Sy libguestfs wget git base-devel linux gcc sudo

Generating New Unique Serial Numbers

Example

# make 1 full serial set 
./generate-unique-machine-values.sh \
    -c 1 \
    --model="iMacPro1,1"

Done!

CSV file and TSV file should be saved in your current working directory.

Slip those values into your config.plist and reboot!

Extended options - Automation?

Need more serials?

git clone https://github.com/sickcodes/osx-serial-generator
cd osx-serial-generator

# make 100 serial sets
./generate-unique-machine-values.sh \
    -c 100 \
    --model="iMacPro1,1"

Want to make 50 OpenCore bootdisks AND 50 output plists?

# make 5 serial sets
# but also make config.plist for each set
# and OpenCore-nopicker.qcow2 for each serial set.
./generate-unique-machine-values.sh \
    -c 50 \
    --create-plists \
    --create-bootdisks

Already have your own config.plist?

If you want to automate creating the qcow bootdisk each time, you can use placeholders and let this script build the image each time you change anything.

If you want to use placeholders, you can supply that to either of the scripts in this repo and use:

--custom-plist=./my_config.plist

# make 5 serial sets
# but also use my config.plist for each set
# AND make qcow2 image for each set!
./generate-unique-machine-values.sh \
    -c 5 \
    --custom-plist=./my_config.plist \
    --create-bootdisks

You can also use an URL for the input plist using:

--master-plist-url.

Or you can manually enter the values generated above:

    <key>MLB</key>
    <string>{{BOARD_SERIAL}}</string>
    <key>ROM</key>
    <data>{{ROM}}</data>
    <key>SpoofVendor</key>
    <true/>
    <key>SystemProductName</key>
    <string>{{DEVICE_MODEL}}</string>
    <key>SystemSerialNumber</key>
    <string>{{SERIAL}}</string>
    <key>SystemUUID</key>
    <string>{{UUID}}</string>
    ...
    ...
    ...
    <string>{{WIDTH}}x{{HEIGHT}}@32</string>
    ...
    ...
    ...
    <key>boot-args</key>
    <string>-v keepsyms=1 tlbto_us=0 vti=9 {{KERNEL_ARGS}}</string>
    {{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}},
    {{UUID}}, {{ROM}}, {{WIDTH}}, {{HEIGHT}}, {{KERNEL_ARGS}}
General options:
    --count, -n, -c <count>         Number of serials to generate
    --model, -m <model>             Device model, e.g. 'iMacPro1,1'
    --csv <filename>                Optionally change the CSV output filename
    --tsv <filename>                Optionally change the TSV output filename
    --output-dir <directory>        Optionally change the script output location
    --width <string>                Resolution x axis length in px, default 1920
    --height <string>               Resolution y axis length in px, default 1080
    --kernel-args <string>          Additional boot-args
    --master-plist-url <url>        Specify an alternative master plist, via URL
    --master-plist <filename>       Optionally change the input plist
    --custom-plist <filename>       Same as --master-plist
    --output-bootdisk <filename>    Optionally change the bootdisk filename
    --envs                          Create all corresponding sourcable envs
    --plists                        Create all corresponding config.plists
    --bootdisks                     Create all corresponding bootdisks [SLOW]
    --help, -h, help                Display this help and exit

Additional options only if you are creating ONE serial set:
    --output-bootdisk <filename>    Optionally change the bootdisk filename
    --output-env <filename>         Optionally change the serials env filename

Custom plist placeholders:
    {{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}},
    {{UUID}}, {{ROM}}, {{WIDTH}}, {{HEIGHT}}, {{KERNEL_ARGS}}

Example:
    ./generate-unique-machine-values.sh --count 1 --plists --bootdisks --envs

Defaults:
    - One serial, for 'iMacPro1,1', in the current working directory
    - CSV and TSV output
    - plists in ./plists/ & bootdisks in ./bootdisks/ & envs in ./envs
    - if you set --bootdisk name, --bootdisks is assumed
    - if you set --custom-plist, --plists is assumed
    - if you set --output-env, --envs is assumed

Generating A Bootdisk Using Specific Serial Numbers

If you already know the serial numbers, or you've generated them above in the past, then you can use this script:

Required options:
    --model <string>                Device model, e.g. 'iMacPro1,1'
    --serial <string>               Device Serial number
    --board-serial <string>         Main Logic Board Serial number (MLB)
    --uuid <string>                 SMBIOS UUID (SmUUID)
    --mac-address <string>          Used for both the MAC address and to set ROM
                                    ROM is lowercased sans any colons
Optional options:
    --width <integer>               Resolution x axis length in px, default 1920
    --height <integer>              Resolution y axis length in px, default 1080
    --kernel-args <string>          Additional boot-args
    --master-plist-url <url>        Specify an alternative master plist, via URL
    --custom-plist <filename>       
       || --master-plist <filename> Optionally change the input plist.
    --output-bootdisk <filename>    Optionally change the bootdisk filename
    --output-plist <filename>       Optionally change the output plist filename
    --help, -h, help                Display this help and exit

Placeholders:   {{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}}, {{UUID}},
                {{ROM}}, {{WIDTH}}, {{HEIGHT}}, {{KERNEL_ARGS}}

Example using your serials generated earlier:

CUSTOM_PLIST=https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-nopicker-custom.plist

./generate-specific-bootdisk.sh \
    --input-plist-url="${CUSTOM_PLIST}" \
    --model iMacPro1,1 \
    --serial C02TW0WAHX87 \
    --board-serial C027251024NJG36UE \
    --uuid 5CCB366D-9118-4C61-A00A-E5BAF3BED451 \
    --mac-address A8:5C:2C:9A:46:2F \
    --output-bootdisk ./OpenCore-nopicker.qcow2 \
    --width 1920 \
    --height 1080 \
    --kernel-args "-pmap_trace"

Examples from Docker-OSX

In the case example of why these scripts were written is:

GENERATE_UNIQUE is used as a Docker argument to randomly generate 1 set at runtime, for every new container.

GENERATE_SPECIFIC is used to specify an already known model, serial, board-serial, uuid and MAC address.

[[ "${GENERATE_UNIQUE}" == true ]] && { \
    ./Docker-OSX/custom/generate-unique-machine-values.sh \
        --master-plist-url="${MASTER_PLIST_URL}" \
        --count 1 \
        --tsv ./serial.tsv \
        --bootdisks \
        --width "${WIDTH:-1920}" \
        --height "${HEIGHT:-1080}" \
        --output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}" \
        --output-env "${ENV:=/env}" \
; } \
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \
        source "${ENV:=/env}" 2>/dev/null \
        ; ./Docker-OSX/custom/generate-specific-bootdisk.sh \
        --master-plist-url="${MASTER_PLIST_URL}" \
        --model "${DEVICE_MODEL}" \
        --serial "${SERIAL}" \
        --board-serial "${BOARD_SERIAL}" \
        --uuid "${UUID}" \
        --mac-address "${MAC_ADDRESS}" \
        --width "${WIDTH:-1920}" \
        --height "${HEIGHT:-1080}" \
        --output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore/OpenCore.qcow2}"

Special Update Notes

2021-10-28 - OpenCore-Catalina/OpenCore.qcow2 was moved to OpenCore/OpenCore.qcow2 in https://github.com/kholia/OSX-KVM/commit/1cc6430f96b452cb78b9a079c34bb9933144ce18

2021-06-15 - On June 15th 2021 we updated the config.plist from v12 to v13 via @thenickdude's upstream config.plist files from KVM-Opencore.

wget https://github.com/thenickdude/KVM-Opencore/compare/v12...v13.patch

patch -F 10 -p1 --verbose config-nopicker-custom.plist v12...v13.patch

patch -F 10 -p1 --verbose config-custom.plist v12...v13.patch

Rejected patch lines:

--- EFI/OC/config.plist
+++ EFI/OC/config.plist
@@ -644,43 +644,6 @@
        </array>
        <key>Patch</key>
        <array>
-           <dict>
-               <key>Arch</key>
-               <string>Any</string>
-               <key>Base</key>
-               <string>_cpu_topology_sort</string>
-               <key>Comment</key>
-               <string>algrey - cpu_topology_sort -disable _x86_validate_topology</string>
-               <key>Count</key>
-               <integer>1</integer>
-               <key>Enabled</key>
-               <true/>
-               <key>Find</key>
-               <data>
-               6AAA//8=
-               </data>
-               <key>Identifier</key>
-               <string>kernel</string>
-               <key>Limit</key>
-               <integer>0</integer>
-               <key>Mask</key>
-               <data>
-               /wAA//8=
-               </data>
-               <key>MaxKernel</key>
-               <string>20.99.99</string>
-               <key>MinKernel</key>
-               <string>17.0.0</string>
-               <key>Replace</key>
-               <data>
-               Dx9EAAA=
-               </data>
-               <key>ReplaceMask</key>
-               <data>
-               </data>
-               <key>Skip</key>
-               <integer>0</integer>
-           </dict>
            <dict>
                <key>Arch</key>
                <string>Any</string>
@@ -922,17 +891,19 @@
                <key>Arguments</key>
                <string></string>
                <key>Auxiliary</key>
-               <false/>
+               <true/>
                <key>Comment</key>
                <string>Memory testing utility</string>
                <key>Enabled</key>
                <false/>
+               <key>Flavour</key>
+               <string>MemTest</string>
                <key>Name</key>
-               <string>memcheck</string>
+               <string>memtest86</string>
                <key>Path</key>
-               <string>memcheck/memcheck.efi</string>
+               <string>memtest86/BOOTX64.efi</string>
                <key>RealPath</key>
-               <false/>
+               <true/>
                <key>TextMode</key>
                <false/>
            </dict>
@@ -981,11 +954,13 @@
                <key>boot-args</key>
                <string>keepsyms=1</string>
                <key>csr-active-config</key>
-               <data>AAAAAA==</data>
+               <data>Jg8=</data>
                <key>prev-lang:kbd</key>
                <data>ZW4tVVM6MA==</data>
                <key>run-efi-updater</key>
                <string>No</string>
+               <key>ForceDisplayRotationInEFI</key>
+               <integer>0</integer>
            </dict>
        </dict>
        <key>Delete</key>
--- Makefile
+++ Makefile
@@ -63,7 +63,7 @@ OpenCore-$(RELEASE_VERSION).iso : OpenCore-$(RELEASE_VERSION).dmg
 
 OpenCoreEFIFolder-$(RELEASE_VERSION).zip : Makefile $(EFI_FILES)
    rm -f $@
-   zip -r $@ EFI
+   zip -X -r $@ EFI
 
 %.gz : %
    gzip -f --keep $<
--- src/AppleALC
+++ src/AppleALC
@@ -1 +1 @@
-Subproject commit 3c2f6315e6aed0cc3c45a9f01f84ef42fb497044
+Subproject commit 93be275a4495a1bdb7ff2c3238053f66b9c5195d
--- src/Lilu
+++ src/Lilu
@@ -1 +1 @@
-Subproject commit 5aeba9f98106a5a8a3057712b74e1608faf5e276
+Subproject commit 614712caa9d84b6e90305839bd74f3872a44a522
--- src/MacKernelSDK
+++ src/MacKernelSDK
@@ -1 +1 @@
-Subproject commit 2b584e8e2081ed22fc619151518921c8636d4639
+Subproject commit e73a6fcd42c94b6a908ad9fe197034c8f4bf442a
--- src/OcBinaryData
+++ src/OcBinaryData
@@ -1 +1 @@
-Subproject commit ccf3d0c36784100293ccfb2865e10cd37f7a78ee
+Subproject commit 6dd2d92383edee522052ebbe2c634c92894b37e6
--- src/OpenCorePkg
+++ src/OpenCorePkg
@@ -1 +1 @@
-Subproject commit 5668fb62b50e8141d93ae6fce3e3fe238822f6ef
+Subproject commit ae515dd0b1efe79940ce94bfd235399ba873a3f0
--- src/VirtualSMC
+++ src/VirtualSMC
@@ -1 +1 @@
-Subproject commit 2a7455daf65c356c867a1d65b8f2520ae575ee3e
+Subproject commit 30a3fa2bd920a15e41ef1439585bcc19885b89e3
--- src/WhateverGreen
+++ src/WhateverGreen
@@ -1 +1 @@
-Subproject commit 1daa2563b5e6e40f195aba5dc006e14c1d55dfd6
+Subproject commit 79efd986ac5f4f17e09b880f25ea45be64863b2f

Delete lines 641 - 675 in both config-custom.plist and config-nopicker-custom.plist which is _cpu_topology_sort.

Add

+               <key>ForceDisplayRotationInEFI</key>
+               <integer>0</integer>

2021-05-04 - On May 4th 2021 we updated from v11 to v12 via @thenickdude's upstream config.plist files from KVM-Opencore.

As seen in a PR to OSX-KVM upstream: kholia/OSX-KVM#173

wget https://github.com/thenickdude/KVM-Opencore/compare/v11...v12.patch

patch -F 10 -p1 --verbose config-nopicker-custom.plist v11...v12.patch

patch -F 10 -p1 --verbose config-custom.plist v11...v12.patch

Rejected patch lines:

--- EFI/OC/config.plist
+++ EFI/OC/config.plist
@@ -224,17 +344,17 @@
            </dict>
            <dict>
                <key>Base</key>
-               <string></string>
+               <string>\_SB.PCI0.LPCB.HPET</string>
                <key>BaseSkip</key>
                <integer>0</integer>
                <key>Comment</key>
-               <string>_Q12 to XQ12</string>
+               <string>HPET _CRS to XCRS</string>
                <key>Count</key>
                <integer>1</integer>
                <key>Enabled</key>
                <false/>
                <key>Find</key>
-               <data>X1ExMg==</data>
+               <data>X0NSUw==</data>
                <key>Limit</key>
                <integer>0</integer>
                <key>Mask</key>
@@ -1056,9 +1302,9 @@
            <key>AppleEvent</key>
            <string>Builtin</string>
            <key>CustomDelays</key>
-           <string>Auto</string>
+           <false/>
            <key>KeyInitialDelay</key>
-           <integer>0</integer>
+           <integer>50</integer>
            <key>KeySubsequentDelay</key>
            <integer>5</integer>
            <key>PointerSpeedDiv</key>
--- src/OpenCorePkg
+++ src/OpenCorePkg
@@ -1 +1 @@
-Subproject commit 5cd223f03dd555c2ad0c6f45181808a5105bb605
+Subproject commit 5668fb62b50e8141d93ae6fce3e3fe238822f6ef

Replaced

                <key>Comment</key>
                <string>_Q12 to XQ12</string>

with

                <key>Base</key>
                <string>\_SB.PCI0.LPCB.HPET</string>
                <key>BaseSkip</key>
                <integer>0</integer>
                <key>Comment</key>
                <string>HPET _CRS to XCRS</string>

and

-               <data>X1ExMg==</data>
+               <data>X0NSUw==</data>

Ignored:

@@ -1056,9 +1302,9 @@
            <key>AppleEvent</key>
            <string>Builtin</string>
            <key>CustomDelays</key>
-           <string>Auto</string>
+           <false/>
            <key>KeyInitialDelay</key>
-           <integer>0</integer>
+           <integer>50</integer>
            <key>KeySubsequentDelay</key>
            <integer>5</integer>
            <key>PointerSpeedDiv</key>

osx-serial-generator's People

Contributors

chandonpierre avatar helvio88 avatar jayknott avatar kerta1n avatar sickcodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

osx-serial-generator's Issues

With WSL

WSL supports GUI apps natively now. What would need to be done to make this work on WSL? I ran the OpenCore-Boot.sh script, but it failed to run with "Could not initialize SDL(No available video device) - exiting." libsdl is installed on my instance of Ubuntu on WSL2.

Failed to boot OSX with GENERATE_UNIQUE #244

Looking at either OSX-KVM or libguestfs or new kernel changes...

-e LIBGUESTFS_DEBUG=1 \ -e LIBGUESTFS_TRACE=1 \

supermin: internal insmod libcrc32c.ko
supermin: root UUID is longer than 16 bytes
[    0.500880] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[    0.501609] CPU: 0 PID: 1 Comm: init Not tainted 5.11.13-arch1-1 #1
[    0.502171] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ArchLinux 1.14.0-1 04/01/2014
[    0.503026] Call Trace:
[    0.503268]  dump_stack+0x6b/0x83
[    0.503651]  panic+0x112/0x2e8
[    0.503929]  do_exit.cold+0xa7/0xb3
[    0.504235]  ? vfs_write+0x153/0x2a0
[    0.504608]  do_group_exit+0x33/0xa0
[    0.504935]  __x64_sys_exit_group+0x14/0x20
[    0.505296]  do_syscall_64+0x33/0x40
[    0.505612]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[    0.506119] RIP: 0033:0x441221
[    0.506400] Code: c0 ff ff ff be e7 00 00 00 ba 3c 00 00 00 eb 16 66 0f 1f 84 00 00 00 00 00 89 d0 0f 05 48 3d 00 f0 ff ff 77 1c f4 89 f0 0f 05 <48> 3d 00 f0 ff ff 76 e7 f7 d8 64 41 89 00 eb df 0f 1f 80 00 00 00
[    0.508124] RSP: 002b:00007fff73c76038 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
[    0.508777] RAX: ffffffffffffffda RBX: 00000000004b3230 RCX: 0000000000441221
[    0.509482] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
[    0.510097] RBP: 0000000000000001 R08: ffffffffffffffc0 R09: 0000000000000000
[    0.510706] R10: 0000000000441fb7 R11: 0000000000000246 R12: 00000000004b3230
[    0.511311] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
[    0.512030] Kernel Offset: 0x22a00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[    0.513092] Rebooting in 1 seconds..
libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages
libguestfs: child_cleanup: 0x55ea246719a0: child process died
libguestfs: sending SIGTERM to process 1195
libguestfs: qemu maxrss 182132K
libguestfs: error: guestfs_launch failed, see earlier error messages
libguestfs: trace: launch = -1 (error)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x55ea246719a0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsf8KJc3
libguestfs: trace: close
libguestfs: closing guestfs handle 0x55b9a48229a0 (state 0)
### cleaning up ...

Originally posted by @sickcodes in sickcodes/Docker-OSX#244 (comment)

"--create-bootdisks" doesn't work as expected

If I run ./generate-unique-machine-values.sh -c 1 --model iMacPro1,1 --custom-plist=./config-custom.plist --create-bootdisks file ./bootdisks/AAAAAAAAAAAA.OpenCore-nopicker.qcow2 with a size of 5.9MiB is created however /osx-serial-generator/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 is 16.1MiB.

  1. What does -nopicker argument do?
  2. Why is generated OpenCore.qcow2 smaller in size compared to /OSX-KVM/OpenCore-Catalina/OpenCore.qcow2?

When I run these commands:

rm ./OSX-KVM/OpenCore-Catalina/OpenCore.qcow2
rm ./OSX-KVM/OpenCore-Catalina/config.plist
cp ./bootdisks/AAAAAAAAAAAA.OpenCore-nopicker.qcow2 ./OSX-KVM/OpenCore-Catalina/OpenCore.qcow2
cp ./plists/AAAAAAAAAAAA.config.plist ./OSX-KVM/OpenCore-Catalina/config.plist

And try to run:

cd OSX-KVM/
./OpenCore-Boot.sh

I get these messages:

,0x0) /Sata (Ox2,OxFFFF .0x0)
BdsDxe: starting Boot0001 “UEFI QEMU HARDDISK QM00017 ” from PciRoot (0x0) /Pci (Ox
3,0x0) /Sata (Ox2,OxFFFF,0x0)
BS: Starting OpenCore application...
BS: Booter path - \EFI\BOOT\BOOTX64.EFI
OCFS: Trying to locate filesystem on 7E77DA98 7E88AF98
OCFS: Filesystem DP - \EFI\BOOT\BOOTX64.EFI
BS: Trying to load OpenCore image...
BS: Relative path - EFI
BS: Startup path - EFINOpenCore.efi (0)
BS: Fallback to absolute path - EFI\OC\OpenCore.efi
BS: Read OpenCore image of 892928 bytes
OCM: Loaded image has DeviceHandle 7E77DA98 FilePath 7DB24F98 ours DevicePath 7D
B2A018
OC: Starting OpenCore. . .
OC: Booter path - EFI\OC\OpenCore-efi
OCFS: Trying to locate filesystem on 7E77DA98 7DB24F98
OCFS: Filesystem DP - EFI\OC\OpenCore.efi
OC: Absolute booter path - EFI\OC\OpenCore.efi
OC: Storage root EFI\OC\OpenCore .efi
OCST: Missing vault data, ignoring...
OC: OcMiscEarlyInit...
OC: Failed to load configuration!

It says here in order to generate a valid OpenCore.qcow2 file from config.plist to execute:

cd OpenCore-Catalina
rm -f OpenCore.qcow2
sudo ./opencore-image-ng.sh --cfg config.plist --img OpenCore.qcow2

Now file OpenCore.qcow2 is 16.1MiB and

cd ..
./OpenCore-Boot.sh
  1. It seems to me that argument --create-bootdisks doesn't work as expected.

Needs to be updated to fix 404 error

Line 225 in the serial generator script needs to be changed to
https://gitlab.com/wireshark/wireshark/-/blob/master-2.4/manuf

because the wireshark master branch no longer contains the manuf file.

iCLOUD_UNSUPPORTED_DEVICE

Hi,

I have this message in macOS monterey when I try to connect iCloud account.
I try your script to obtain serial number, I modify setextradata of my virtualbox VM.
It changes correctly serial number.

But now, I always have the same error message.

What could I change ?

Getting USB to work

This script is awesome!! I'm having difficulty getting USB to work. I want to connect an iPhone to my host laptop and have it show in the MacOS guest. Also, my laptop's webcam is connected to the USB bus -- I would like for it to show so that FaceTime can be used. Do you have any information on this?

Thanks so much!

current version of opencore-image-ng.sh uses "BASE" before it is defined

Minor issue - the current version of opencore-image-ng.sh tries to use bash variable "BASE" at line 154, but doesn't define "BASE" until line 160.

As a result, generating an opencore boot image fails when it tries to copy $BASE/resources/OcBinaryData/Resource to the /ESP/EFI/OC directory as it looks in "." rather than "./OSX-KVM"

Thank you(!) for the work you've done on this and for making this tool available.

GitHub proposed changes to serial number generator

GitHub is proposing draconian changes on code that generates numbers.

github/site-policy#395

I encourage you to have your say regarding this topic as this affects

https://github.com/acidanthera/OpenCorePkg

https://github.com/sickcodes/Docker-eyeOS

https://github.com/sickcodes/osx-serial-generator

If you are using this repository to generate serial numbers for iServices, which is permitted so long as you report bugs to Apple (in which I personally have recently done in collaboration with a number of researchers) then I encourage you to make a comment or policy suggestion in the pull request: github/site-policy#395

https://twitter.com/sickcodes/status/1388247759031996416?s=21

Empty ROM data in config.plist

git clone https://github.com/sickcodes/osx-serial-generator
cd osx-serial-generator
./generate-unique-machine-values.sh -c 1 --model iMacPro1,1 --custom-plist=./config-custom.plist --bootdisks
grep -A 1 'ROM' ./plists/C02G20PDHX87.config.plist

Output:

                        <key>ROM</key>
                        <data></data>

In order to fix it change line 344 inside ./generate-unique-machine-values.sh

                ROM_VALUE="${MAC_ADDRESS//\:/}"
                ROM_VALUE="${ROM_VALUE,,}"
                sed -e s/\{\{DEVICE_MODEL\}\}/"${DEVICE_MODEL}"/g \
                    -e s/\{\{SERIAL\}\}/"${SERIAL}"/g \
                    -e s/\{\{BOARD_SERIAL\}\}/"${BOARD_SERIAL}"/g \
                    -e s/\{\{UUID\}\}/"${UUID}"/g \
-                   -e s/\{\{ROM\}\}/"${ROM"/g \
+                   -e s/\{\{ROM\}\}/"${ROM_VALUE}"/g \
                    -e s/\{\{WIDTH\}\}/"${WIDTH}"/g \
                    -e s/\{\{HEIGHT\}\}/"${HEIGHT}"/g \
./generate-unique-machine-values.sh -c 1 --model iMacPro1,1 --custom-plist=./config-custom.plist --bootdisks
grep -A 1 'ROM' ./plists/C02VP9Y4HX87.config.plist
                        <key>ROM</key>
                        <data>58b035aa47ef</data>

Running the script spits out an error

When the script is used, it throws out an error. macOS High Sierra 10.13.6

iMac-2:osx-serial-generator-master sigjnf3$ sudo ./generate-unique-machine-values.sh     -c 1     --model="MacPro6,1"
Password:
DEVICE_MODEL:       MacPro6,1
SERIAL_SET_COUNT:   1
OUTPUT_DIRECTORY:   .
cp: the -R and -r options may not be specified together.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.