mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2025-06-21 17:12:47 +02:00
Implements the "Skyscope macOS on PC USB Creator Tool" with core features: 1. **GUI (PyQt6):** For macOS version selection, Docker interaction, image extraction, USB selection, and feedback. 2. **Docker Orchestration:** * Builds and runs Docker-OSX commands. * Streams logs to GUI; runs Docker in a separate thread. * Persists containers with unique names for file access. 3. **Image Extraction:** * Copies `mac_hdd_ng.img` and `OpenCore.qcow2` from the container. * Manages container lifecycle (stop/remove). 4. **USB Writing (Linux PoC):** * `usb_writer_linux.py` handles partitioning, formatting, and image writing. * Uses `qemu-img`, `parted`, `kpartx`, `rsync`, `mkfs.vfat`, `dd`. * Includes data erasure warning. * Known issue: `dd` for main image writes full sparse size; needs change to file-level copy. 5. **iGPU Config Review:** Confirmed Docker-OSX's use of WhateverGreen. 6. **Documentation:** Added `README.md` with overview, prerequisites, usage, known issues, and future work based on your feedback (image sizing, explicit pull, privilege handling). The application files include `main_app.py`, `utils.py`, `constants.py`, `usb_writer_linux.py`, and `README.md`. This commit reflects the state after incorporating your feedback regarding visibility of all created files in the repository. |
||
---|---|---|
.github | ||
custom | ||
helm | ||
osx-serial-generator@908b3d687a | ||
tests | ||
vnc-version | ||
.gitmodules | ||
CHANGELOG.md | ||
constants.py | ||
CREDITS.md | ||
discord-logo.svg | ||
docker-compose.yml | ||
Dockerfile | ||
Dockerfile.auto | ||
Dockerfile.monterey | ||
Dockerfile.naked | ||
Dockerfile.naked-auto | ||
FAQ.md | ||
fetch-macOS.py | ||
glibc-linux4-2.33-4-x86_64.pkg.tar.zst | ||
LICENSE | ||
main_app.py | ||
rankmirrors | ||
README.md | ||
running-mac-inside-docker-qemu.png | ||
usb_writer_linux.py | ||
utils.py | ||
Youtube-Screenshot-Docker-OSX-Setup.png | ||
Youtube-USBFLUXD-Screenshot-Docker-OSX.png |
Skyscope macOS on PC USB Creator Tool
Version: 0.4.0 (Alpha) Developer: Miss Casey Jay Topojani Business: Skyscope Sentinel Intelligence
Overview
This tool provides a graphical user interface to automate the creation of a bootable macOS USB drive for PC (Hackintosh) using the Docker-OSX project. It guides the user through selecting a macOS version, running the Docker-OSX container for macOS installation, extracting the necessary image files, and (currently for Linux users) writing these images to a USB drive.
Features
- User-friendly GUI for selecting macOS versions (Sonoma, Ventura, Monterey, Big Sur, Catalina).
- Automated Docker command generation and execution for Docker-OSX.
- Streams Docker logs directly into the application.
- Extraction of the generated
mac_hdd_ng.img
(macOS system) andOpenCore.qcow2
(EFI bootloader). - Management of the created Docker container (stop/remove).
- USB drive detection.
- Automated USB partitioning and image writing for Linux systems.
- Creates GPT partition table.
- Creates an EFI System Partition (ESP) and a main HFS+ partition for macOS.
- Copies EFI files and writes the macOS system image.
- Warning prompts before destructive operations like USB writing.
Current Status & Known Issues/Limitations
- USB Writing Platform Support: USB writing functionality is currently only implemented and tested for Linux. macOS and Windows users can use the tool to generate and extract images but will need to use other methods for USB creation.
- macOS Image Size for USB: The current Linux USB writing process for the main macOS system uses
dd
to write the converted raw image. While the sourcemac_hdd_ng.img
is sparse, the raw conversion makes it its full provisioned size (e.g., 200GB). This means:- The target USB drive must be large enough to hold this full raw size.
- This is inefficient and needs to be changed to a file-level copy (e.g., using
rsync
after mounting the source image) to only copy actual data and better fit various USB sizes. (This is a high-priority item based on recent feedback).
- Intel iGPU Compatibility: Relies on the generic iGPU support provided by WhateverGreen.kext within the OpenCore configuration from Docker-OSX. This works for many iGPUs but isn't guaranteed for all without specific
config.plist
tuning. - Dependency on Docker-OSX: This tool orchestrates Docker-OSX. Changes or issues in the upstream Docker-OSX project might affect this tool.
- Elevated Privileges: For USB writing on Linux, the application currently requires being run with
sudo
. It does not yet have in-app checks or prompts for this.
Prerequisites
- Docker: Docker must be installed and running on your system. The current user must have permissions to run Docker commands.
- Python: Python 3.8+
- Python Libraries:
PyQt6
psutil
- Installation:
pip install PyQt6 psutil
- (For Linux USB Writing ONLY): The following command-line utilities must be installed and accessible in your PATH:
qemu-img
(usually fromqemu-utils
package)parted
kpartx
(often part ofmultipath-tools
orkpartx
package)rsync
mkfs.vfat
(usually fromdosfstools
package)lsblk
(usually fromutil-linux
package)partprobe
(usually fromparted
orutil-linux
package)- You can typically install these on Debian/Ubuntu with:
sudo apt update sudo apt install qemu-utils parted kpartx rsync dosfstools util-linux
How to Run
- Clone this repository or download the source files (
main_app.py
,utils.py
,constants.py
,usb_writer_linux.py
). - Install the prerequisite Python libraries:
pip install PyQt6 psutil
. - (Linux for USB Writing): Ensure all command-line utilities listed under prerequisites are installed.
- Run the application:
(Linux for USB Writing): You will need to run the application withpython main_app.py
sudo
for USB writing operations to succeed, due to the nature of disk partitioning and direct write commands:sudo python main_app.py
Usage Steps
- Step 1: Create and Install macOS VM
- Select your desired macOS version from the dropdown.
- Click "Create VM and Start macOS Installation".
- A Docker container will be started, and a QEMU window will appear.
- Follow the on-screen instructions within the QEMU window to install macOS. This is an interactive process (formatting the virtual disk, installing macOS).
- Once macOS is installed and you have shut down or closed the QEMU window, the Docker process will finish.
- Step 2: Extract VM Images
- After the VM setup process is complete, the "Extract Images from Container" button will become enabled.
- Click it and select a directory on your computer where the
mac_hdd_ng.img
andOpenCore.qcow2
files will be saved. - Wait for both extraction processes to complete.
- Step 3: Container Management (Optional)
- After image extraction (or if the VM setup finished), you can "Stop Container" (if it's somehow still running) and then "Remove Container" to clean up the Docker container (which is no longer needed if images are extracted).
- Step 4: Select Target USB Drive and Write
- Connect your target USB drive.
- Click "Refresh List" to scan for USB drives.
- Select your intended USB drive from the dropdown. VERIFY CAREFULLY!
- WARNING: The next step will erase all data on the selected USB drive.
- If you are on Linux and have all dependencies, and the images from Step 2 are ready, the "Write Images to USB Drive" button will be enabled.
- Click it and confirm the warning dialog. The application will then partition the USB and write the images. This will take a significant amount of time.
Future Enhancements (Based on Feedback)
- Improve USB Writing for Image Sizing (High Priority): Modify the USB writing process (especially for the main macOS system) to use file-level copies (e.g.,
rsync
after mounting the source image) instead ofdd
for the entire raw image. This will correctly handle various USB drive sizes by only copying used data and fitting it to the partition. - Explicit Docker Image Pull: Add a separate step/feedback for
docker pull
beforedocker run
. - Privilege Handling: Add checks to see if the application is run with necessary privileges for USB writing and guide the user if not.
- USB Writing for macOS and Windows: Implement the
usb_writer_macos.py
andusb_writer_windows.py
modules. - GUI for Advanced Options: Potentially allow users to specify custom Docker parameters or OpenCore properties.
Contributing
Contributions are welcome! Please fork the repository and submit a pull request.
License
(To be decided - likely MIT or GPLv3)