{"id":22065292,"url":"https://github.com/sparronator9999/openbootcamp","last_synced_at":"2025-07-01T08:07:38.326Z","repository":{"id":265570422,"uuid":"855600627","full_name":"Sparronator9999/OpenBootCamp","owner":"Sparronator9999","description":"An open-source replacement for (some of) Apple's Boot Camp services, written in C#","archived":false,"fork":false,"pushed_at":"2025-04-30T01:38:39.000Z","size":306,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T02:35:53.328Z","etag":null,"topics":["apple","apple-computer","apple-mac","apple-macbook","csharp","imac","macbook","macbook-air","macbook-pro","macbookair","macbookpro","net-framework","net-framework-48","open-source","windows"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sparronator9999.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-11T06:23:56.000Z","updated_at":"2025-04-30T01:38:43.000Z","dependencies_parsed_at":"2025-01-01T20:28:11.259Z","dependency_job_id":"1c1db939-00ea-4404-b2b1-02b9f3ac5260","html_url":"https://github.com/Sparronator9999/OpenBootCamp","commit_stats":null,"previous_names":["sparronator9999/openbootcamp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sparronator9999/OpenBootCamp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sparronator9999%2FOpenBootCamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sparronator9999%2FOpenBootCamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sparronator9999%2FOpenBootCamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sparronator9999%2FOpenBootCamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sparronator9999","download_url":"https://codeload.github.com/Sparronator9999/OpenBootCamp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sparronator9999%2FOpenBootCamp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262924967,"owners_count":23385460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","apple-computer","apple-mac","apple-macbook","csharp","imac","macbook","macbook-air","macbook-pro","macbookair","macbookpro","net-framework","net-framework-48","open-source","windows"],"created_at":"2024-11-30T19:16:10.132Z","updated_at":"2025-07-01T08:07:38.299Z","avatar_url":"https://github.com/Sparronator9999.png","language":"C#","readme":"# OpenBootCamp\n\nAn open-source implementation of some of Boot Camp's keyboard services in C#.\n\n## Disclaimers\n\n- This program was developed by using clean-room reverse-engineering\n  techniques (including decompiling Boot Camp services) and publicly-available\n  information on Apple hardware (particularly the SMC).\n- This program, repository and its authors are **not** affiliated with Apple\n  Inc. in any way, shape, or form.\n\n## Features\n\nOpenBootCamp currently implements the following features of Boot Camp Manager:\n\n- **Fn behaviour switching:** Switch whether the default Fn behaviour should be\n  the standard Fn keys, or the special function printed on each key.\n- **Special Fn key handling:** This includes keys like the display brightness,\n  keyboard brightness, and optical drive eject keys.\n- **Fan control** (WIP): Fix Apple's garbage fan profiles without\n  having to decide between terrible thermals or terrible battery life\\*.\n\n\u003csub\u003e\\*When running on Windows, [Macs Fan Control](https://crystalidea.com/macs-fan-control)\nappears to install its own driver that significantly impacts battery life\n*even after closing Macs Fan Control*, and persists until a reboot. OBC uses\nthe `MacHALDriver` that comes with official Boot Camp services to control fan\nspeeds. Obviously, increasing your fan speeds from stock will still impact battery life.\u003c/sub\u003e\n\nAdditionally, the following bugs from the official Boot Camp Manager are fixed:\n\n- Keyboard backlight state is not remembered across reboots\n- Special Fn keys do not work before login (Apple's Boot Camp Manager doesn't\n  run until a user logs in)\n\n\u003csub\u003ealong with introducing a whole lot of other bugs/missing features, but still...\u003c/sub\u003e\n\n## Planned features\n\nRoughly in priority order:\n\n- A config application. Learn to edit XML for now.\n- A few power saving features:\n  - Set keyboard backlight state based on power source or battery charge (e.g.\n    low battery, switching between AC and battery power)\n- Volume control on older Windows versions (7 and earlier?)\n- Smooth keyboard backlight animations\n- More that I haven't thought of yet\n\n## Supported systems\n\nOnly Apple computers that can run Windows are supported (i.e. any Intel Mac).\nAny non-Apple Windows systems are not supported (even if using an external\nMagic Mouse/Trackpad/Keyboard).\n\nWindows 7 SP1 and later with .NET Framework 4.8 should mostly work without\nissues.\n\nWindows Vista/XP may work if you downgrade the project to .NET Framework 4.6\n(for Vista SP2) or 4.0 (for XP SP3), but are currently unsupported.\n\n## Additional requirements\n\nThe following drivers are required for OpenBootCamp to work:\n\n- The Apple Keyboard driver (`Keymagic.sys`) for OSX Fn behaviour switching\n  and enabling display brightness shortcuts on Windows 8 and later.\n- `KeyAgent.sys` for enabling other special Fn keys and for brightness/volume\n  keys on Windows 7 and lower.\n- `MacHALDriver.sys` for keyboard backlight and fan control support.\n\n## Download\n\nDownloads are currently unavailable.\n\nPlease [compile the program yourself](#compile) in the meantime.\n\n\u003c!--Development builds are available through [GitHub Actions](https://github.com/Sparronator9999/OpenBootCamp/actions).\n\nAlternatively, if you don't have a GitHub account, you can download the latest\nbuild from [nightly.link](https://nightly.link/Sparronator9999/OpenBootCamp/workflows/build/main?preview).\n\n(You probably want the `Release` build, unless you're debugging issues with the program)\n\nAlternatively, you can [compile the program yourself](#compile).--\u003e\n\n## Compile\n\n### Using Visual Studio\n\n1.  Install Visual Studio 2022 with the `.NET Desktop Development` workload\n    checked.\n2.  Download the code repository, or clone it with `git`.\n3.  Extract the downloaded code, if needed.\n4.  Open `OBC.sln` in Visual Studio.\n5.  Click `Build` \u003e `Build Solution` to build everything.\n6.  Your output, assuming default build settings, is located in\n    `OBC.Service\\bin\\Debug\\net48\\`.\n7.  ???\n8.  Profit!\n\n### From the command line\n\n1.  Follow steps 1-3 above to install Visual Studio and download the code.\n2.  Open `Developer Command Prompt for VS 2022` and `cd` to your project\n    directory.\n3.  Run `msbuild /t:restore` to restore the solution, including NuGet packages.\n4.  Run `msbuild OBC.sln /p:platform=\"Any CPU\" /p:configuration=\"Debug\"` to\n    build the project, substituting `Debug` with `Release` for a Release build\n    instead.\n5.  Your output should be located in `OBC.Service\\bin\\Debug\\net48\\` (or similar).\n6.  ???\n7.  Profit!\n\n## FAQ\n\n### Wait, you can install Windows on a Mac?\n\nYep, and it's [officially supported by Apple](https://support.apple.com/en-us/102622)\non any Intel Mac (with varying \"official\" Windows support, but I was able to get\nthe latest Windows 10 LTSC single-booting on a 2010 MacBook (the white unibody\nmodel) with few issues).\n\n### How did you make this?!\n\n(note: this information is slightly outdated. I recently started looking at\nsome Apple SMC-related projects on GitHub for more information on how Apple's\nSMCs work, including e.g. [VirtualSMC](https://github.com/acidanthera/VirtualSMC))\n\nBy decompiling `Bootcamp.exe` (located at `C:\\Program Files\\Boot Camp` on a Mac\nrunning Windows with Boot Camp installed) with [Binary Ninja](https://binary.ninja/).\n\nI was going to use [ghidra](https://github.com/NationalSecurityAgency/ghidra),\nbut found Binary Ninja produced more readable pseudo-code.\n\n### *Why* did you make this?\n\nBecause I was/am unhappy with the Apple-provided Boot Camp services.\n\nAlso, reverse-engineering is fun :D (if you know what you're doing, that is)\n\n### How do I install this?\n\n1. Obtain a copy of `KeyAgent.sys` and `MacHALDriver.sys` for your laptop (see\n   [below](#how-do-i-obtain-keyagentsys-and-machaldriversys)).\n2. Create a folder in the same location as `InstallMgr.exe` called `BootCamp`\n   (if it doesn't exist), and move both files there.\n3. Run `InstallMgr.exe`, and install both `KeyAgent.sys` and `MacHALDriver.sys`,\n   then reboot.\n4. Run `InstallMgr.exe` again, then install and run `OpenBootCamp service`.\n5. ???\n6. Profit!\n\nNOTE: if you try to uninstall `MacHALDriver.sys` in the future, it might still\nshow as \"Installed\" until you reboot. This will be fixed in a future commit.\n\n### How do I obtain `KeyAgent.sys` and `MacHALDriver.sys`?\n\n1. Download the Boot Camp support software for your Mac using Boot Camp\n   Assistant (or [Brigadier](https://github.com/timsutton/brigadier) if you're\n   already on Windows).\n2. Navigate to and open `Drivers\\Apple\\BootCamp.msi` in 7-Zip.\n3. Copy `KeyAgent.sys` and `MacHALDriver.sys` to a folder named `BootCamp` in\n   the same folder as `InstallMgr.exe`, then follow the [instructions](#how-do-i-install-this)\n   to install them with OpenBootCamp.\n\nWhile you're at it, install the Apple Keyboard drivers if you haven't already\n(the installer's called `AppleKeyboardInstaller64.exe`, and is in the same\nfolder as `BootCamp.msi`).\n\n### My Boot Camp support software has `KeyManager.sys`, but not `KeyAgent.sys`?\n\nIf you couldn't find `KeyAgent.sys`, but found `KeyManager.sys`, your laptop is\ncurrently too new for OpenBootCamp. Come back when someone adds support for\nthese laptops.\n\nI won't be able to do this, as I don't have access to a Mac with this\nconfiguration.\n\n### I want \\\u003cfeature X\\\u003e in OpenBootCamp!\n\nAsk nicely in the [issues](https://github.com/Sparronator9999/Sparronator9999/issues),\nand I might add your feature if I know how, have time, and I think it'll\nbenefit the project.\n\nAlternatively, create a [pull request](https://github.com/Sparronator9999/Sparronator9999/pulls)\nand add the feature yourself.\n\n### .NET/Core?\n\nNo.\n\n### Linux?\n\nLinux already has native support for Apple hardware (at least on the laptops\nI tested it on), so a Linux port would be pointless.\n\n## Special thanks\n\n- [VirtualSMC](https://github.com/acidanthera/VirtualSMC) for their detailed\n  SMC key documentation (check the `Docs` folder in the linked repo).\n- [SMCKit](https://github.com/beltex/SMCKit)/[libsmc](https://github.com/beltex/libsmc)\n  for the SMC function names used in\n  [MacHALDriverIoCtl.cs](https://github.com/Sparronator9999/OpenBootCamp/blob/main/OBC.Service/MacHALDriverIOCTL.cs).\n\n## License and Copyright\n\nCopyright © 2024-2025 Sparronator9999.\n\nThis program is free software: you can redistribute it and/or modify it under\nthe terms of the GNU General Public License as published by the Free Software\nFoundation, either version 3 of the License, or (at your option) any later\nversion.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the [GNU General Public License](LICENSE.md) for more\ndetails.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparronator9999%2Fopenbootcamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparronator9999%2Fopenbootcamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparronator9999%2Fopenbootcamp/lists"}