• Stars
    star
    19,908
  • Rank 1,279 (Top 0.03 %)
  • Language
    Python
  • Created about 9 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Run macOS on QEMU/KVM. With OpenCore + Monterey + Ventura + Sonoma support now! Only commercial (paid) support is available now to avoid spammy issues. No Mac system is required.

Note

This README.md documents the process of creating a Virtual Hackintosh system.

Note: All blobs and resources included in this repository are re-derivable (all instructions are included!).

๐Ÿ’š Looking for commercial support with this stuff? I am available over email for a chat for commercial support options only. Note: Project sponsors get access to the Private OSX-KVM repository, and direct support.

Struggling with Content Caching stuff? We can help.

Working with Proxmox and macOS? See Nick's blog for sure.

Yes, we support offline macOS installations now ๐ŸŽ‰

Contributing Back

This project can always use your help, time and attention. I am looking for help (pull-requests!) with the following work items:

  • Documentation around running macOS on popular cloud providers (Hetzner, GCP, AWS). See the Is This Legal? section and associated references.

  • Document (share) how you use this project to build + test open-source projects / get your stuff done.

  • Document how to use this project for XNU kernel debugging and development.

  • Document the process to launch a bunch of headless macOS VMs (build farm).

  • Document usage of munki to deploy software to such a build farm.

  • Enable VNC + SSH support out of the box or more easily.

  • Robustness improvements are always welcome!

  • (Not so) crazy idea - automate the macOS installation via OpenCV.

Requirements

  • A modern Linux distribution. E.g. Ubuntu 22.04 LTS 64-bit or later.

  • QEMU >= 6.2.0

  • A CPU with Intel VT-x / AMD SVM support is required (grep -e vmx -e svm /proc/cpuinfo)

  • A CPU with SSE4.1 support is required for >= macOS Sierra

  • A CPU with AVX2 support is required for >= macOS Mojave

Note: Older AMD CPU(s) are known to be problematic. AMD FX-8350 works but Phenom II X3 720 does not. Ryzen processors work just fine.

Installation Preparation

  • KVM may need the following tweak on the host machine to work.

    echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs
    

    To make this change permanent, you may use the following command.

    sudo cp kvm.conf /etc/modprobe.d/kvm.conf  # for intel boxes only, after cloning the repo below
    
  • Install QEMU and other packages.

    sudo apt-get install qemu uml-utilities virt-manager git \
        wget libguestfs-tools p7zip-full make dmg2img -y
    

    This step may need to be adapted for your Linux distribution.

  • Add user to the kvm and libvirt groups (might be needed).

    sudo usermod -aG kvm $(whoami)
    sudo usermod -aG libvirt $(whoami)
    sudo usermod -aG input $(whoami)
    

    Note: Re-login after executing this command.

  • Clone this repository on your QEMU system. Files from this repository are used in the following steps.

    cd ~
    
    git clone --depth 1 --recursive https://github.com/kholia/OSX-KVM.git
    
    cd OSX-KVM
    

    Repository updates can be pulled via the following command:

    git pull --rebase
    

    This repository uses rebase based workflows heavily.

  • Fetch macOS installer.

    ./fetch-macOS-v2.py
    

    You can choose your desired macOS version here. After executing this step, you should have the BaseSystem.dmg file in the current folder.

    ATTENTION: Let >= Big Sur setup sit at the Country Selection screen, and other similar places for a while if things are being slow. The initial macOS setup wizard will eventually succeed.

    Sample run:

    $ ./fetch-macOS-v2.py
    1. High Sierra (10.13)
    2. Mojave (10.14)
    3. Catalina (10.15)
    4. Big Sur (11.7) - RECOMMENDED
    5. Monterey (12.6)
    6. Ventura (13)
    
    Choose a product to download (1-6): 4
    

    Note: Modern NVIDIA GPUs are supported on HighSierra but not on later versions of macOS.

  • Convert the downloaded BaseSystem.dmg file into the BaseSystem.img file.

    dmg2img -i BaseSystem.dmg BaseSystem.img
    
  • Create a virtual HDD image where macOS will be installed. If you change the name of the disk image from mac_hdd_ng.img to something else, the boot scripts will need to be updated to point to the new image name.

    qemu-img create -f qcow2 mac_hdd_ng.img 128G
    

    NOTE: Create this HDD image file on a fast SSD/NVMe disk for best results.

  • Now you are ready to install macOS ๐Ÿš€

Installation

  • CLI method (primary). Just run the OpenCore-Boot.sh script to start the installation process.

    ./OpenCore-Boot.sh
    

    Note: This same script works for Big Sur, Catalina, Mojave, and High Sierra.

  • Use the Disk Utility tool within the macOS installer to partition, and format the virtual disk attached to the macOS VM.

  • Go ahead, and install macOS ๐Ÿ™Œ

  • TIP: Using a non-APFS filesystem is recommended.

  • (OPTIONAL) Use this macOS VM disk with libvirt (virt-manager / virsh stuff).

    • Edit macOS-libvirt-Catalina.xml file and change the various file paths (search for CHANGEME strings in that file). The following command should do the trick usually.

      sed "s/CHANGEME/$USER/g" macOS-libvirt-Catalina.xml > macOS.xml
      
      virt-xml-validate macOS.xml
      
    • Create a VM by running the following command.

      virsh --connect qemu:///system define macOS.xml
    • If needed, grant necessary permissions to libvirt-qemu user,

      sudo setfacl -m u:libvirt-qemu:rx /home/$USER
      sudo setfacl -R -m u:libvirt-qemu:rx /home/$USER/OSX-KVM
      
    • Launch virt-manager and start the macOS virtual machine.

Headless macOS

Setting Expectations Right

Nice job on setting up a Virtual Hackintosh system! Such a system can be used for a variety of purposes (e.g. software builds, testing, reversing work), and it may be all you need, along with some tweaks documented in this repository.

However, such a system lacks graphical acceleration, a reliable sound sub-system, USB 3 functionality and other similar things. To enable these things, take a look at our notes. We would like to resume our testing and documentation work around this area. Please reach out to us if you are able to fund this area of work.

It is possible to have 'beyond-native-apple-hw' performance but it does require work, patience, and a bit of luck (perhaps?).

Post-Installation

  • See networking notes to setup guest networking.

    I have the following commands present in /etc/rc.local.

    #!/usr/bin/env bash
    
    sudo ip tuntap add dev tap0 mode tap
    sudo ip link set tap0 up promisc on
    sudo ip link set dev virbr0 up
    sudo ip link set dev tap0 master virbr0
    

    This has been enough for me so far.

    Note: You may need to enable the rc.local functionality manually on modern Ubuntu versions. Check out the notes included in this repository for details.

  • To passthrough GPUs and other devices, see these notes.

  • Need a different resolution? Check out the notes included in this repository.

  • Trouble with iMessage? Check out the notes included in this repository.

  • Highly recommended macOS tweaks - https://github.com/sickcodes/osx-optimizer

Is This Legal?

The "secret" Apple OSK string is widely available on the Internet. It is also included in a public court document available here. I am not a lawyer but it seems that Apple's attempt(s) to get the OSK string treated as a trade secret did not work out. Due to these reasons, the OSK string is freely included in this repository.

Please review the 'Legality of Hackintoshing' documentation bits from Dortania's OpenCore Install Guide.

Gabriel Somlo also has some thoughts on the legal aspects involved in running macOS under QEMU/KVM.

You may also find this 'Announcing Amazon EC2 Mac instances for macOS' article interesting.

Note: It is your responsibility to understand, and accept (or not accept) the Apple EULA.

Note: This is not legal advice, so please make the proper assessments yourself and discuss with your lawyers if you have any concerns (Text credit: Dortania)

Motivation

My aim is to enable macOS based educational tasks, builds + testing, kernel debugging, reversing, and macOS security research in an easy, reproducible manner without getting 'invested' in Apple's closed ecosystem (too heavily).

These Virtual Hackintosh systems are not intended to replace the genuine physical macOS systems.

Personally speaking, this repository has been a way for me to 'exit' the Apple ecosystem. It has helped me to test and compare the interoperability of Canon CanoScan LiDE 120 scanner, and Brother HL-2250DN laser printer. And these devices now work decently enough on modern versions of Ubuntu (Yay for free software). Also, a long time back, I had to completely wipe my (then) brand new MacBook Pro (Retina, 15-inch, Late 2013) and install Xubuntu on it - as the OS X kernel kept crashing on it!

Backstory: I was a (poor) student in Canada in a previous life and Apple made my work on cracking Apple Keychains a lot harder than it needed to be. This is how I got interested in Hackintosh systems.

More Repositories

1

xvc-pico

Raspberry Pico powered Xilinx Virtual Cable - Xilinx JTAG Cable! This is now quite fast, thanks to tom01h! We also support JTAG + serial terminal over a single cable now. Now with (slow) WiFi support for Pico W!
C
368
star
2

dedrop

Looking inside the (Drop) box. Security Analysis of Dropbox. Updated WOOT '13 paper and other goodies.
C
327
star
3

RC4-40-brute-office

Guaranteed cracking of M$ Office files using RC4 40-bit encryption
C
81
star
4

xvc-esp32

Wireless JTAG 'cable' for Xilinx FPGAs. This is an 'English fork' of https://github.com/ciniml/xvc-esp32 project.
C++
74
star
5

checksec

checksec-ng. Elf checksec in Python. Does large-scale package analysis. Now with multi-core support!
Python
67
star
6

Easy-Digital-Beacons-v1

A simple and easy Arduino / Pi Pico / ESP8266-powered WSPR, FT8, and FT4 beacon system which uses NTP + DS3231 RTC for timing. Super extensible! Now comes with optional GPS support.
HTML
66
star
7

passe-partout

passe-partout is a tool to extract SSL private keys from process memory written by Nicolas Collignon and Jean-Baptiste Aviat ([email protected]).
C
62
star
8

DigitalRadioReceiverSupport

Support repository for the 'Digital Radio Receiver' / 'FT8 Decoder' / 'FT8 Radio' app.
C++
46
star
9

IPIP-NEO-PI

International Personality Item Pool Representation of the NEO PI-Rโ„ข. Tests designed to educate the public about the five-factor model of personality.
JavaScript
45
star
10

mips-hacking

Notes on QEMU and Debian MIPS (big-endian)
Python
42
star
11

Colorlight-5A-75B

Notes for Colorlight-5A-75B.
Verilog
41
star
12

HF-Balcony-Antenna-System

VU3CER's HF Balcony Antenna System. Freedom from HOA ;). Also a Window Antenna System (WAS)!
34
star
13

DDX

The 'Direct Digital Transceiver' (DDX) project. Some folks call it 'Dhiru's Digital Transceiver' :D
C++
29
star
14

xvcpi

Use Raspberry Pi as a wireless Xilinx JTAG 'cable'. Note: This is a portable, tested, maintained clone of https://github.com/strongleg/xvcpi and https://github.com/derekmulcahy/xvcpi projects.
C
29
star
15

AntiDrive

Reversing Google Drive and other goodies ;)
26
star
16

my-pcaps

My Packet Captures, Quagga Tutorial, and Cisco Reversing.
Python
25
star
17

PGPCrack-NG

PGPCrack-NG is a program designed to brute-force symmetrically encrypted PGP files. It is a replacment for the long dead PGPCrack.
C
24
star
18

xvc-esp8266

ESP8266 powered Xilinx Virtual Cable - Xilinx WiFi JTAG!
C++
22
star
19

UEFI-BIOS-Hacking-Notes

"Fixing" the USB Over Current problem on an ASUS Mobo. Hacking and patching for fun ;)
20
star
20

SecretZone

Reversing Samsung SecretZone. Decrypt MSR files without any password! All thanks to Francesco Picasso. Only commercial (paid) support is available.
Python
20
star
21

ReproducibleBuilds

Reproducible Builds in Fedora ("remock"). Updated for Fedora 23, and Rawhide.
Python
16
star
22

RC4-40-brute-pdf

Guaranteed cracking of PDF files using RC4 40-bit encryption
Perl
16
star
23

Si5351-Module-Clone-TCXO

Si5351-Module-Clone with low PPM TCXO! Drop-in replacement for the Adafruit's Si5351 module. 3.3v ONLY!
HTML
15
star
24

pico_ft8_xcvr

Fork of https://github.com/aa1gd/pico_ft8_xcvr project from AA1GD. Real-time FT8 decoding on Raspberry Pi Pico.
C
14
star
25

fvde2john

See README.txt for usage instructions. Use http://www.openwall.com/lists/john-users/ for support.
C
13
star
26

PKCS5_PBKDF2

Standalone PKCS5_PBKDF2 implementations. Salt lengths > 16 is handled correctly.
C
13
star
27

HF-PA-v5

VU3CER's Robust Class-D HF 'QRP' PA for 40-20-17-15-10 bands. Yes, IRF510 can work on 10m with a minimal design ;) Input is 8-10mW.
HTML
13
star
28

pico-cw-beacon-drs

Direct-RF-Synthesis CW Beacon PoC using Raspberry Pi Pico. No Si5351 is needed. HF and VHF fox! Have fun! ;) Comes with 5W amplifier + LPF!
Roff
12
star
29

john.old

John the Ripper jumbo - advanced offline password cracker, which supports hundreds of hash and cipher types, and runs on many operating systems, CPUs, GPUs, and even some FPGAs
C
12
star
30

Easy-Transceiver

Easy Digital 'FT8' Transceiver. Easy-Transceiver v0.01.
HTML
12
star
31

airspy-utils

Airspy-Utils is a small software collection to help with firmware related operations on Airspy HF+ devices.
Python
12
star
32

Easy-APRS

Easy and cheap APRS beacon using your existing phone and BaoFeng radio!
10
star
33

inAudible

Audible DRM scheme
10
star
34

HF-PA-v10

HF-PA-v10 ;) Is this the end of the search for a 5W Digital PA?
Prolog
10
star
35

pico-arduino-compat

Use Arduino libraries with the Raspberry PI Pico C/C++ SDK
CMake
9
star
36

HF-PA-v2

VU3CER's Portable Class-E HF PA for the 'DX Band'. 100% FOSS.
AGS Script
8
star
37

Easy-ESP8266-GPS-NTP-Server

Easy-ESP8266-GPS-NTP-Server
C++
8
star
38

Easy-Field-Strength-Meter

VU3CER's Easy Field Strength Meter for HF and VHF.
8
star
39

Easy-Beacons-STEM

Easy-Beacons project adapted for STEM education. Powered by Raspberry Pi Pico (W) boards. WSPR + FT8 beacons for science (TM).
HTML
8
star
40

Si5351-Pi-Pico

Native (C/C++ SDK) Si5351 library for Raspberry Pi Pico
C
7
star
41

G8GYW-QRP-RF-Meter

QRP RF Power + SWR meter. Fork of https://g8gyw.github.io/ work.
HTML
7
star
42

HF-PA-v4

VU3CER's Robust Class-D HF 'QRP' PA for 40-20-17-15-10 bands. Yes, IRF510 works fine on 10m ;)
7
star
43

HF-PA-v6

RF "Lego" blocks. Quite-Linear HF broadband RF amplifier experiments for higher bands.
HTML
7
star
44

inno2john

Cracks password protected Inno Setup generated installers using JtR.
Perl
6
star
45

uSDX_Beacon

Alternate standalone minimal firmware hack for uSDX which enables FT8 and WSPR beacons! NO SUPPORT!
C
6
star
46

Easy-FT8-Beacon-v3

A simple Arduino Nano powered FT8 beacon which uses DS3231 RTC for timing. Updated in July 2021. NO SUPPORT!
C++
6
star
47

Druva-inSync-Security

Inside Druva inSync, Security Analysis of Druva inSync, Druva inSync Security Overview, Druva inSync Security. Keywords: Druva Security, Blackbird Storage Engine, SSL fail, MiTM, bytecode reversing, Druva inSync Security.
Python
6
star
48

Light-Intuitive-Digital-Interface

LiDi (Light-Intuitive-Digital-Audio-Interface) for ยตBITX. Note: All the included designs (and some other ones) were simulated in LTspice, and then tested on air. Have fun, and 73!
Gnuplot
5
star
49

SunshineFT8

Solar-powered WiFi-enabled FT8 decoder, and spotter using a Raspberry Pi Pico W board.
C
5
star
50

Panasonic-Smart-AC-Research

Rough dump of my Panasonic Smart AC reverse-engineering work.
JavaScript
5
star
51

Simple-TR-Switch

VU3CER's non-RF-sensing, MCU controlled Simple T/R Switch with RX Grounding!
HTML
5
star
52

HF-PA-v3

VU3CER's Portable + Rugged HF PA for the 'DX Band'.
HTML
5
star
53

flags-scanner

Are correct and "approved" compilation flags being used?
Go
5
star
54

uBlox7_TimePulse

Accurate frequency reference with a >= NEO-7M (+ NEO-6M) U-Blox GPS module and Raspberry Pi Pico.
C++
4
star
55

SMPS-Noise-Filter

Clean power supply for Icom IC-705 and IC-7300. This cleans SMPS output noise. Thanks to Megas3300!
AGS Script
4
star
56

ConsensusBasedTimeSync

A portable, efficient, passive, consensus based (relative) time synchronization mechanism over radio waves. Cost-effective radio receivers too!
HTML
4
star
57

Easy-IR-System

Easy USB-powered IR-to-keyboard-translator using the Digispark USB Development Board.
C++
4
star
58

HF-PA-v8

An improvement over https://github.com/kholia/HF-PA-v6 work. 5W+ Linear PA for HF. Input is 8-10mW only.
4
star
59

Easy-Keyer

Easy portable WiFi keyer
CSS
4
star
60

Multi-WSPR

Three WSPR RF streams using one Si5351! Written for K1TE (Brad).
C++
4
star
61

QO-100-FT8-Detector

A program to detect if FT8 is active on QO-100 in real-time.
Python
4
star
62

amr-wbp-plus

A fully functional and portable AMR-WB+ decoder and encoder (not my code). My old glue work from March, 2020.
C
3
star
63

2SK-Driver-With-LPFs

3
star
64

Adjustable-Load-v1.1

Easy + Cost-Effective Variable Electronic Load.
C++
3
star
65

ft8d

Fork of https://github.com/pavel-demin/ft8d. Super efficient FT8 decoder.
Fortran
3
star
66

Easy-ICOM-CI-V

Interface Arduino with ICOM rigs using the CI-V interface easily. NO SUPPORT!
C++
3
star
67

EasyVFO

'Easy VFO' powered by Si5351 - based on uBITX code.
C++
3
star
68

transistortester

Tweaked Markus' firmware for the 'Blue Button' LCR-T4 model from techtonics.in. NO SUPPORT!
C
3
star
69

Easy-CW-Keyer

Easy CW Keyer for uSDX and other radios :-). Tested on Raspberry Pi Pico board.
C++
3
star
70

BeaconHelper

Works with https://github.com/kholia/Pico-W-Beacon-Server and https://github.com/kholia/Easy-Digital-Beacons-v1 for pushing time to the beacons.
Java
3
star
71

HF-Pre-Amp

A collections of HF Pre-Amps
HTML
2
star
72

chisel-examples

Combining the best - Canonical's Chisel with consumable SBOMs!
Python
2
star
73

Easy-DigiSkimmer

Something like https://github.com/lazywalker/DigiSkimmer but for my use case. CD2003 based multi-band band-hopping digital modes skimmer.
Python
2
star
74

wsjtx

My fork for WSJT-X. https://sourceforge.net/p/wsjt/wsjtx/ci/master/tree/.
C++
2
star
75

Alinco-FT8-Interface

FT8 interface for Alinco DX-10 transceiver
C++
2
star
76

ft8_encoder_web

https://kholia.github.io/ft8_encoder.html
JavaScript
2
star
77

YaesuEmulatorPico

Yaeseu FT-817 rig emulator using Raspberry Pi Pico.
C++
2
star
78

dxcc_daemon

Small daemon wrapper around the 'dxcc' program to enable fast (near realtime) lookups. NO SUPPORT IS PROVIDED.
Perl
2
star
79

Experimental-Transceiver

Experimental-Transceiver code for VU2UPX.
C
2
star
80

PDX-Plus-Plus

The design and implementation of the PDX++ Digital Transceiver.
HTML
2
star
81

Easy-DCR-WB2CBA

Easy-DCR-WB2CBA v3. POOR MANโ€™s HF RX - A simple Arduino based direct conversion HF digital modes SSB receiver. Use 'ADX Radio' instead of this ;)
C++
2
star
82

kholia.github.io

homepage
JavaScript
2
star
83

minijail-experiments

Some minjail experiments
Dockerfile
2
star
84

Security-Matrix

Security Matrix for Fedora (and others)
Python
2
star
85

Global-Communications-Transceiver

Open-source files for Global Communications Transceiver
HTML
2
star
86

pico-sdr

Fork of the magical https://code.porucha.net/mordae/pico-sdr project!
C
2
star
87

quick2wire-python-api

Fork of https://github.com/jemgoss/quick2wire-python-api and https://github.com/romilly/quick2wire-python-api. Tested with RPi Zero 2W. Supports Si473x 'allwave' radio chip.
Python
2
star
88

pysensy

PySensy - An exercise in learning USB + IR stuff ;)
Shell
1
star
89

wspr_encoder_web

https://kholia.github.io/wspr_encoder.html
JavaScript
1
star
90

SyncArduinoRTC

Android app to sync the DS3231 RTC module connected to an Arduino. NOT suitable for end users. NO SUPPORT!
Java
1
star
91

DigisparkICOM

Fork of DigiCDC - modified to emulate ICOM IC-7300 radio using a cheap Digispark USB board. Minimal PoC only. No SUPPORT!
Assembly
1
star
92

Adafruit-Trinket-USB

Local fork of https://github.com/adafruit/Adafruit-Trinket-USB.
C
1
star
93

libusb

A cross-platform library to access USB devices. Fork of https://github.com/libusb/libusb/.
C
1
star
94

Bad-Digirig

A bad clone of the 'Digirig Mobile' digital radio interface.
C++
1
star
95

zc-zookeeper-static

Updated community fork of https://github.com/python-zk/zc-zookeeper-static
Python
1
star
96

SupportPortableCPO

Support repository for 'Portable CPO' Android app
1
star
97

picoAMSine

Fork of https://github.com/TudbuT/picoAM. Transmit AM signal with sine tone / voice / melody / morse with RPi Pico! For educational purposes only!
C
1
star
98

pico-sdk-kholia

Clone of https://github.com/raspberrypi/pico-sdk
C
1
star
99

pico-tnc-plus

Standalone RF-enabled APRS IGate. Fork of https://github.com/amedes/pico_tnc.
C++
1
star
100

hal_wch

Open source minimal stack for the ch32 line of WCH processors, including the ch32v003, a 10ยข 48 MHz RISC-V Microcontroller - as well as many other chips within the ch32v/x line. Minimal copy of https://github.com/cnlohr/ch32v003fun.
C
1
star