Script to copy Bluetooth Key and MAC address of a device from Windows to Linux so that the device can work in both systems without re-paring.
I create this for personal use since bt-dualboot has not yet worked with my Bluetooth LE (Low Energy) devices. I try to keep it as simple as possible so for specific case you might want to check this ArchWiki page first.
-
Pair and connect the device in Linux FIRST
-
Pair and connect the device in Windows
-
Boot to Linux
-
Mount Windows partition
-
Install chntpw on Linux to read registry file
sudo apt install chntpw
-
Download
dbBluetooth.py
andrequirement.txt
and save it to a new folder -
In this folder, create a virtual environment to install required packages
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt
-
Still in the folder, run script with sudo privileges (to gain access to
/var/lib/bluetooth/
)sudo ./dbBluetooth.py
-
Rebooting
(You can try restart bluetooth service first using
systemctl restart bluetooth
but in my case the device only works after rebooting)