Keep Bluetooth devices paired on macOS and Windows - profzei/Matebook-X-Pro-2018 GitHub Wiki

Credits

Real dual-booters (i.e. not using BootCamp) know that dual-pairing between macOS and Windows is a bit annoying, as pairing with two OSes will generate two different link keys. Things seems to be different for Big Sur and Monterey.

Real mac owners do not have to follow these methods, as BootCamp can synchronize Bluetooth link keys between macOS and Windows.

I copied here the two methods for personal backup.

Pairing for Big Sur

  1. In Windows, pair your Bluetooth devices.
  2. Now reboot into macOS and pair your devices again there.
  3. Still in macOS, open hackintool, navigate to its Utilities tab, and click the Bluetooth icon for generating a Windows Bluetooth registry file: it'll make a file called Bluetooth.reg on your Desktop. Finally transfer the file to your Windows partition (for example using a USB drive...).
  4. Boot back into Windows and turn off Bluetooth, get your Bluetooth.reg file, install PSTools - Windows Sysinternals in Windows\system32 folder (i.e. on Windows, install by dragging everything inside the PSTools.zip into Windows\system32), and then open CMD prompt as admin. Now type in:
psexec -s -i regedit

and hit enter.

Note: We use PSTools and manually edit the registry because Windows won't let us edit these keys as just an admin, PSTools lets us edit as System!

  1. When regedit opens, navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys.
  2. Now right click on Bluetooth.reg and click edit: Notepad will open up.
  3. In Bluetooth.reg file look for the key addresses that match the ones in regedit under Keys. Click on the matching key address and inside, look for matching names between the Bluetooth.reg and in regedit too.
Bluetooth pairing devices
  1. For each matching name, right click on the name and modify in binary, delete everything, and type in the hex values from Bluetooth.reg in. (Some guides say to reverse the order of hex but hackintool has done that already, so enter it in as is). Press OK and do this for all matching names.
  2. That's it! Turn your Bluetooth back on and your already paired devices should start working right away in both Windows and macOS!

If you have issues with BT4LE devices (due to how BT4LE devices are encrypted compared to BT classic devices, you will need other methods to manually transplant the keys for BT4LE devices), please, refer to https://github.com/digitalbirdo/BT-LinkkeySync/issues/12 (credit to u/Cubelia for pointing it out)

Note: For genuine Apple Magic Keyboard and Mouse there shouldn't be problems when extracting the keys.

Pairing for Monterey

  1. Pair the device with Windows.
  2. Reboot and pair the device with macOS.
  3. Open the Keychain Access application.
  4. Type bluetooth in the search field, then double-click on the latest MobileBluetooth entry.
  5. At the bottom of the new window, tick Show password and enter your credentials (twice).
  6. The now revealed password is in fact a full XML file. Click on the field, press Option + A then copy-paste it to a text editor.
  7. Below <key>LinkKey</key>, copy the value between the <string>xx-xx-xx-xx</string> tags to something outside macOS (for example using a USB drive...).

Note: No need to reverse the key anymore: if you get 98-54-2f-... in macOS, you write 98 54 2f ... in the Windows registry.

  1. Reboot to Windows.
  2. Run regedit with admin rights i.e. use PSTools - Windows Sysinternals and refer to step #4 in previous Big Sur guide.
  3. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\BD_ADDR
  4. Edit the key and replace the value with the one you got (as is).
  5. Enjoy!
⚠️ **GitHub.com Fallback** ⚠️