Skip to content

Repository files navigation

USB Bootable Drive Tool

macOS CI License: MIT macOS 13+ Swift

A native macOS AppKit utility for writing ISO and IMG images to removable USB drives. It provides strict target filtering, a system-controlled privilege boundary, and a polished glass-style interface.

简体中文

Application screenshot

The responsive workspace keeps preparation choices together, gives live activity its own flexible panel, and truncates long image or device names without resizing the window.

Caution

Writing an image permanently overwrites the selected USB drive. Back up important data and verify the device name, capacity, and identifier before confirming.

Features

  • Native AppKit interface with macOS system materials.
  • Resizable utility window with bounded sizing, responsive log space, and stable truncation for long image or device names.
  • ISO and IMG image selection.
  • Automatic discovery and hot-plug refresh for external USB media.
  • Shows only whole, external, removable, writable physical disks.
  • Revalidates disk identity and exact byte capacity before destructive work.
  • Uses the macOS system authorization UI instead of opening Terminal; macOS decides whether password, Touch ID, or Apple Watch is available.
  • Shows write state, dd progress, and errors in the app's 制作日志 panel.
  • Presents a native result sheet with image, target, elapsed time, and eject state.
  • Writes through /dev/rdiskN, then runs sync and safely ejects the drive.
  • Custom Dock/Finder icon, standard menus, and accessible UI labels.
  • Reproducible command-line build with no third-party runtime dependencies.

Requirements

  • macOS 13 Ventura or newer.
  • An Apple Silicon Mac (arm64) for the downloadable DMG.
  • Xcode Command Line Tools (xcode-select --install).
  • A removable USB drive.
  • A bootable/hybrid ISO or IMG compatible with the target computer.

Install

Download the latest macOS-arm64.dmg and matching .sha256 file from GitHub Releases, then verify them in the same directory:

shasum -a 256 -c USB-Bootable-Drive-Tool-*-macOS-arm64.dmg.sha256

The downloadable build is ad-hoc signed and is not Apple-notarized. See Distribution note before launching it.

Build and run

Clone the repository and run:

git clone https://github.com/fanny7d/USB-Bootable-Drive-Tool.git
cd USB-Bootable-Drive-Tool
./script/build_and_run.sh --verify

The generated application is USB启动盘工具.app in the repository root. You can also double-click build.command.

Available development modes:

./script/build_and_run.sh --build-only
./script/build_and_run.sh --debug
./script/build_and_run.sh --logs
./script/build_and_run.sh --telemetry
./script/build_and_run.sh --verify

Create the same Apple Silicon DMG and checksum used for releases:

./script/package_dmg.sh

Artifacts are written to dist/. The packaging script rejects non-arm64 binaries and verifies the app signature and disk image before returning success.

Usage

  1. Insert the removable USB drive. The app refreshes automatically.
  2. Select an .iso or .img system image.
  3. Confirm the exact target name, capacity, identifier, and protocol.
  4. Click 制作启动盘 and review the destructive confirmation.
  5. Complete the macOS system authorization request. The app never receives or stores the credential.
  6. Keep the drive connected until writing, synchronization, and eject complete.

Safety model

The app deliberately maintains two independent validation layers:

  • The GUI filters candidates using diskutil plist data.
  • The authorized task re-reads the target and image size immediately before unmounting and writing.

The app never reads or saves an administrator password, and task output returns to the in-app log through a controlled pipe. See Architecture for the full write boundary and safety invariants.

Testing

Run the complete non-destructive validation suite:

./script/test.sh

Build, launch, disk discovery, and code-signing checks do not prove that a real image was written or that the target computer can boot it. Follow the isolated disposable-media procedure in Testing for destructive acceptance.

Project structure

Sources/USBBootableDriveTool/  AppKit application source
Assets/                        App and sidebar artwork
script/                        Build, run, test, and icon tooling
docs/                          Architecture and testing documentation
.github/                       CI and contribution templates

Contributing and security

Contributions are welcome. Read CONTRIBUTING.md before opening a pull request. Report security issues privately according to SECURITY.md, especially anything that could weaken disk selection or privilege boundaries.

Distribution note

Local and current downloadable builds are ad-hoc signed. They are not Apple-notarized because this project does not yet have a configured Apple Developer ID certificate. macOS Gatekeeper may therefore require an explicit user approval. Building from source does not require a paid Apple developer account.

License

Released under the MIT License.

About

Native macOS AppKit utility for safely creating bootable USB drives from ISO and IMG images.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages