Keep Bluetooth devices paired on macOS and Windows - profzei/Matebook-X-Pro-2018 GitHub Wiki
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.
- In Windows, pair your Bluetooth devices.
- Now reboot into macOS and pair your devices again there.
- 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 calledBluetooth.reg
on yourDesktop
. Finally transfer the file to your Windows partition (for example using a USB drive...). - Boot back into Windows and turn off Bluetooth, get your
Bluetooth.reg
file, install PSTools - Windows Sysinternals inWindows\system32
folder (i.e. on Windows, install by dragging everything inside thePSTools.zip
intoWindows\system32
), and then openCMD
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
!
- When
regedit
opens, navigate to:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys
. - Now right click on
Bluetooth.reg
and click edit:Notepad
will open up. - In
Bluetooth.reg
file look for the key addresses that match the ones inregedit
underKeys
. Click on the matching key address and inside, look for matching names between theBluetooth.reg
and inregedit
too.
- 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. - 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.
- Pair the device with Windows.
- Reboot and pair the device with macOS.
- Open the
Keychain Access
application. - Type
bluetooth
in the search field, then double-click on the latestMobileBluetooth
entry. - At the bottom of the new window, tick
Show password
and enter your credentials (twice). - The now revealed password is in fact a full
XML
file. Click on the field, pressOption + A
then copy-paste it to a text editor. - 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.
- Reboot to Windows.
- Run
regedit
with admin rights i.e. use PSTools - Windows Sysinternals and refer to step #4 in previous Big Sur guide. - Navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Keys\BD_ADDR
- Edit the key and replace the value with the one you got (as is).
- Enjoy!