{"id":29013385,"url":"https://github.com/meowrch/bluevein","last_synced_at":"2026-03-17T08:34:57.737Z","repository":{"id":333861979,"uuid":"1110812895","full_name":"meowrch/BlueVein","owner":"meowrch","description":"Cross-platform tool to automatically synchronize Bluetooth pairing keys between Linux and Windows on dual-boot systems. ","archived":false,"fork":false,"pushed_at":"2026-01-21T12:41:39.000Z","size":1652,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-22T00:18:00.422Z","etag":null,"topics":["arch","ble","bluetooth","bluetooth-keys","bluetooth-le","bluetooth-sync","bt-dualboot","dualboot","key-sync","linux","windows"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/meowrch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-05T19:00:07.000Z","updated_at":"2026-01-21T12:41:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/meowrch/BlueVein","commit_stats":null,"previous_names":["meowrch/bluevein"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/meowrch/BlueVein","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowrch%2FBlueVein","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowrch%2FBlueVein/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowrch%2FBlueVein/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowrch%2FBlueVein/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meowrch","download_url":"https://codeload.github.com/meowrch/BlueVein/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meowrch%2FBlueVein/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30619216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T08:10:05.930Z","status":"ssl_error","status_checked_at":"2026-03-17T08:10:04.972Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["arch","ble","bluetooth","bluetooth-keys","bluetooth-le","bluetooth-sync","bt-dualboot","dualboot","key-sync","linux","windows"],"created_at":"2025-06-25T19:40:12.440Z","updated_at":"2026-03-17T08:34:57.730Z","avatar_url":"https://github.com/meowrch.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\".meta/logo.png\" width=300\u003e\n\n# 🩸 BlueVein\n\n### *Forget about re-pairing Bluetooth devices*\n**Dual-boot without the headache**\n\n\u003cbr\u003e\n\n[![Issues](https://img.shields.io/github/issues/meowrch/BlueVein?color=ffb29b\u0026labelColor=1C2325\u0026style=for-the-badge)](https://github.com/meowrch/BlueVein/issues)\n[![Stars](https://img.shields.io/github/stars/meowrch/BlueVein?color=fab387\u0026labelColor=1C2325\u0026style=for-the-badge)](https://github.com/meowrch/BlueVein/stargazers)\n[![License](https://img.shields.io/github/license/meowrch/BlueVein?color=FCA2AA\u0026labelColor=1C2325\u0026style=for-the-badge)](./LICENSE)\n\n\n[![README RU](https://img.shields.io/badge/README-RU-blue?color=cba6f7\u0026labelColor=1C2325\u0026style=for-the-badge)](./README.ru.md)\n[![README ENG](https://img.shields.io/badge/README-ENG-blue?color=C9CBFF\u0026labelColor=C9CBFF\u0026style=for-the-badge)](./README.md)\n\n[🚀 Quick Start](#quick-start) -  [⚡ How It Works](#how-it-works) - [🔬 Technical Details](#technical-details) - [💬 Support](#support)\n\n\u003c/div\u003e\n\n***\n\n## 🎯 The Problem We Solved\n\n### **Sound familiar?**\n\n\u003ctable\u003e \n  \u003ctr\u003e \n  \u003ctd\u003e\n  \n🎧 **You're in Windows** \n\nConnected Bluetooth headphones → Works perfectly!\n\n\u003c/td\u003e \n  \u003c/tr\u003e \n  \u003ctr\u003e \n  \u003ctd\u003e\n\n🔄 **Reboot to Linux**\n\nHeadphones don't work → Need to **pair again**\n\n\u003c/td\u003e \n  \u003c/tr\u003e\n  \u003ctr\u003e \n  \u003ctd\u003e\n\n🔁 **Back to Windows**\n\nHeadphones don't work again → **Pair again**\n\n\u003c/td\u003e \n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003e [!CAUTION]\n\u003e **This hell repeats EVERY time** you switch between OSes. \\\n\u003e With headphones. With mouse. With keyboard. With gamepad. With all devices.\n\n\u003e [!NOTE]\n\u003e Interesting fact. You typically spend 1 to 3 minutes reconfiguring bluetooth devices when switching between OSes. \\\n\u003e **3 minutes × 3 switches per day × 250 working days = 37.5 hours per year.**\n\n\n### **BlueVein is the solution:**\n\nPair your device **once** in any OS. \\\nSwitch between Windows and Linux. \\\n**Everything works automatically**. Forever.\n\n## 🌟 Why BlueVein?\n\n\u003cdiv align=\"center\"\u003e\n\n| Feature | What it gives you |\n|:---:|:---|\n| 🔄 **Bidirectional sync** | Changes in any OS are instantly synchronized |\n| 🚀 **Zero configuration** | Install → Run → Forget about the problem |\n| 💾 **Direct EFI access** | No partition mounting via [fat32-raw](https://github.com/meowrch/fat32-raw) |\n| 🛡️ **Security** | Works at system level with administrator privileges |\n| 📡 **Real-time monitoring** | Tracks changes instantly |\n| 🔍 **Periodic checking** | Checks for updates from the other OS every 30 seconds |\n\n\u003c/div\u003e\n\n## \u003ca name=\"quick-start\"\u003e\u003c/a\u003e🚀 Quick Start\n\n### Linux\n\n#### Option 1: Arch Linux (AUR)\n\n```bash\n# Install via AUR\nyay -S bluevein-bin\n\n# Start the service\nsudo systemctl enable --now bluevein\n\n# Check status\nsudo systemctl status bluevein\n```\n\n#### Option 2: Manual build (any distribution)\n\n```bash\n# 1. Clone and build\ngit clone https://github.com/meowrch/BlueVein.git\ncd BlueVein\ncargo build --release\n\n# 2. Install\nsudo cp target/release/bluevein /usr/bin/\nsudo cp ./systemd/bluevein.service /etc/systemd/system/\n\n# 3. Run\nsudo systemctl daemon-reload\nsudo systemctl enable --now bluevein\n\n# 4. Verify\nsudo systemctl status bluevein\n```\n\n### Windows\n\n#### Option 1: Pre-built release\n\n1. Go to [Releases](https://github.com/meowrch/BlueVein/releases)\n2. Download `bluevein.exe` from the latest release\n3. Open PowerShell as Administrator\n4. Execute:\n\n```bash\n# Install and start\n.\\bluevein.exe install\n.\\bluevein.exe start\n\n# Verify\nGet-Service BlueVeinService\n```\n\n#### Option 2: Manual build\n\n```bash\n# 1. Build\ncargo build --release\ncd target\\release\n\n# 2. Open PowerShell as Administrator\n\n# 3. Install and start\n.\\bluevein.exe install\n.\\bluevein.exe start\n\n# 4. Verify\nGet-Service BlueVeinService\n```\n\n## ⌨️ Service Management\n\n### Linux\n\n```bash\n# Start/stop/restart\nsudo systemctl start bluevein\nsudo systemctl stop bluevein\nsudo systemctl restart bluevein\n\n# Status and logs\nsudo systemctl status bluevein\nsudo journalctl -u bluevein -f\n\n# Autostart\nsudo systemctl enable bluevein   # enable\nsudo systemctl disable bluevein  # disable\n```\n\n### Windows\n\n```powershell\n# Service management\n.\\bluevein.exe start      # Start\n.\\bluevein.exe stop       # Stop\n.\\bluevein.exe install    # Install\n.\\bluevein.exe uninstall  # Uninstall\n\n# Or via net\nnet start BlueVeinService\nnet stop BlueVeinService\n\n# Check status\nGet-Service BlueVeinService\n```\n\n## \u003ca name=\"how-it-works\"\u003e\u003c/a\u003e🔥 How It Works?\n\n### System Architecture\n\n```mermaid\ngraph TB\n    subgraph Windows\n        WinBT[Registry Bluetooth]\n        WinMonitor[BlueVein Monitor]\n    end\n    \n    subgraph Linux\n        LinuxBT[BlueZ Bluetooth]\n        LinuxMonitor[BlueVein Monitor]\n    end\n    \n    subgraph EFI[\"EFI Partition\"]\n        Config[bluevein.json]\n    end\n    \n    WinBT \u003c--\u003e|Track changes| WinMonitor\n    LinuxBT \u003c--\u003e|Track changes| LinuxMonitor\n    \n    WinMonitor \u003c--\u003e|Read/Write keys| Config\n    LinuxMonitor \u003c--\u003e|Read/Write keys| Config\n    \n    style Config fill:#89b4fa,stroke:#313244,stroke-width:2px,color:#1e1e2e\n    style WinMonitor fill:#f38ba8,stroke:#313244,stroke-width:2px,color:#1e1e2e\n    style LinuxMonitor fill:#a6e3a1,stroke:#313244,stroke-width:2px,color:#1e1e2e\n```\n\n### Synchronization Algorithm\n\n```mermaid\nsequenceDiagram\nparticipant OS as Operating System\nparticipant Monitor as BlueVein Monitor\nparticipant EFI as EFI/bluevein.json\n\nNote over OS,EFI: 1️⃣ System boot\nMonitor-\u003e\u003eEFI: Reads keys from EFI\nMonitor-\u003e\u003eOS: Reads local devices\nMonitor-\u003e\u003eOS: Updates device keys from EFI if they differ\nMonitor-\u003e\u003eEFI: Adds new devices from OS to EFI\n\nNote over OS,EFI: 2️⃣ New device pairing\nOS-\u003e\u003eMonitor: Event: new device\nMonitor-\u003e\u003eEFI: Reads current bluevein.json\nMonitor-\u003e\u003eEFI: Adds/updates device key\n\nNote over OS,EFI: 3️⃣ Periodic check (every 30 sec)\nMonitor-\u003e\u003eEFI: Checks for changes from other OS\nMonitor-\u003e\u003eOS: Applies new keys to existing devices\n```\n\n### Key Operating Principles\n\n- **On boot:** BlueVein checks keys in EFI and updates them for devices present in the system. New devices from the system are added to EFI\n- **On new pairing:** The key is immediately saved to EFI and becomes available to the other OS\n- **On removal:** The device remains in EFI (it may be active on the other OS)\n- **Periodically:** Checks for changes every 30 seconds and applies key updates from EFI\n\n## \u003ca name=\"technical-details\"\u003e\u003c/a\u003e🔬 Technical Details\n\n### Bluetooth LE Support\n\nBlueVein fully supports Bluetooth Low Energy devices with all key types:\n\n| Key Type | Purpose | Support |\n|----------|---------|-------|\n| **LTK** | Long Term Key — main encryption key | ✅ Full |\n| **Peripheral LTK** | LTK for device in peripheral role | ✅ Full |\n| **IRK** | Identity Resolving Key — for privacy (random MAC) | ✅ Full |\n| **CSRK** | Connection Signature Resolving Key — for data signing | ✅ Full |\n| **AddressType** | Address type (public/random) | ✅ Full |\n\n### Architecture Decisions\n\n**Dual-mode devices:**\nBlueVein automatically merges Classic and LE keys for devices supporting both modes (e.g., many Bluetooth headphones).\n\n**CSRK SignCounter:**\n- Windows doesn't persist SignCounter in registry — it's kept in driver memory only\n- BlueVein stores Counter in `bluevein.json` and takes MAX value during sync\n- This prevents counter rollback and protects against replay attacks\n\n### Known Limitations\n\n**CSRK SignCounter on Windows:**\nWindows Bluetooth stack doesn't persist SignCounter in registry. BlueVein works around this by storing it in `bluevein.json`, but frequent OS switching may reduce accuracy.\n\n**Impact:** Minimal. Modern LE devices (keyboards, mice, headphones, gamepads) use LTK for encrypted connections, not CSRK for data signing. Issue may only affect specific IoT devices using unencrypted connections with signing.\n\n**Solution:** If device doesn't auto-connect after sync — re-pair once. Counter will reset and everything will work.\n\n## 📚 FAQ\n\n### Will this break my Bluetooth?\nNo. BlueVein only reads and writes pairing keys. It doesn't touch drivers or system files.\n\n### What devices are supported?\n**Any Bluetooth devices**: headphones (AirPods, Sony, Bose), mice (Logitech MX Master), keyboards, gamepads (Xbox, PS5).\n\n**Tested on:**\n- AirPods Pro 2\n- Sony WH-1000XM5\n- Logitech MX Master 3\n- Xbox Series X Controller\n\n### Is my data safe?\nYes. Pairing keys are stored in the EFI partition, which only root/admin can access. BlueVein runs with elevated privileges, but the [code is open](https://github.com/meowrch/BlueVein) — you can verify it yourself.\n\n### What about BitLocker or LUKS encryption?\nBlueVein works independently of disk encryption. The EFI partition is typically not encrypted and accessible before OS boot.\n\n### Does it work with triple-boot?\nYes. BlueVein synchronizes keys between **all** OSes on one machine, regardless of how many there are.\n\n### What if I already have `bt-dualboot` installed?\nBlueVein is **fully automatic** and works in real-time as a background service.\n\n`bt-dualboot`, besides requiring manual commands after each pairing, has several other drawbacks identified by the community:\n- **Crashes on real devices.** Doesn't support LE keyboards. Crashes on some configurations.\n- **Doesn't work with multiple Bluetooth adapters.** If you have built-in + external adapter — you'll get an error.\n- **Requires** mounting the Windows partition.\n- **Uses [hacky methods](https://www.kali.org/tools/chntpw/)** to modify Windows system registry\n- **Abandoned since 2022** — issues remain unanswered\n\n---\n\n## ⚒️ Troubleshooting\n\n| Problem | Solution |\n|---------|----------|\n| ❌ **Service won't start (Linux)** | Run `sudo systemctl status bluevein` and check logs: `sudo journalctl -u bluevein -n 50` |\n| ❌ **Service won't start (Windows)** | Make sure PowerShell is running **as Administrator** |\n| ❌ **Device still won't sync** | Check that EFI partition is mounted: `lsblk -f \\| grep vfat` (Linux) or verify the service is running |\n| ❌ **Permission denied** | BlueVein requires root/admin. On Linux use `sudo systemctl` or run the service as root |\n\n\u003e [!TIP]\n\u003e **Still not working?** \\\n\u003e [Open an issue](https://github.com/meowrch/BlueVein/issues) with logs and OS information.\n\n## \u003ca name=\"support\"\u003e\u003c/a\u003e💬 Support\n\n### 🐛 Found a bug?\n\n1. Collect logs:\n   ```bash\n   # Linux\n   sudo journalctl -u bluevein -n 100 \u003e bluevein_logs.txt\n   \n   # Windows\n   C:/ProgramData/BlueVein/bluevein.log\n   ```\n\n2. [Create an Issue](https://github.com/meowrch/BlueVein/issues) with detailed description and logs\n\n### 💡 Have an idea?\n\nOpen a [Feature Request](https://github.com/meowrch/BlueVein/issues/new) — we always welcome improvements!\n\n## 🤝 Contributing\n\nWant to improve BlueVein? We'd love your contribution!\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## ☕ Support the Project\n\n\u003cdiv align=\"center\"\u003e\n\n**Like BlueVein?** Help the project grow! 🚀\n\n| 💎 Cryptocurrency | 📬 Address |\n|:---:|:---|\n| **TON** | `UQB9qNTcAazAbFoeobeDPMML9MG73DUCAFTpVanQnLk3BHg3` |\n| **Ethereum** | `0x56e8bf8Ec07b6F2d6aEdA7Bd8814DB5A72164b13` |\n| **Bitcoin** | `bc1qt5urnw7esunf0v7e9az0jhatxrdd0smem98gdn` |\n| **Tron** | `TBTZ5RRMfGQQ8Vpf8i5N8DZhNxSum2rzAs` |\n\n\u003cbr\u003e\n\n*Every donation motivates us to continue developing the project! ❤️*\n\n\u003c/div\u003e\n\n## 📊 Project Statistics\n\n\u003ca href=\"https://star-history.com/#meowrch/BlueVein\u0026Date\"\u003e\n\u003cpicture\u003e\n\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=meowrch/BlueVein\u0026type=Date\u0026theme=dark\" /\u003e\n\u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=meowrch/BlueVein\u0026type=Date\" /\u003e\n\u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=meowrch/BlueVein\u0026type=Date\" /\u003e\n\u003c/picture\u003e\n\u003c/a\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Made with ❤️ for the Linux community**\n\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeowrch%2Fbluevein","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeowrch%2Fbluevein","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeowrch%2Fbluevein/lists"}