nectarlink README

项目的 README,来自 github.com/thtbee/nectarlink。合并为一个 markdown 文件:README.md。

NectarLink

Your Android phone and your PC, working as one.

Notifications, messages, calls, clipboard, files, photos, screen mirroring and phone apps in windows, between Android and Windows 10 (2004+), Windows 11 or Linux. Free and open source. Local-first, end-to-end encrypted, no account and no cloud.

Hi, I'm Bee, and yes, a bee built an app called NectarLink. I build cool stuff in the open on 𝕏 @thtbee_, so come see what's next. Feedback, bugs or ideas? DM me directly.

Latest release CI Apps: GPL-3.0-or-later Core: MPL-2.0

Buy me some honey

NectarLink for Windows: Home with the phone's notifications and music playing, Glass theme

NectarLink came out of my own frustration. I kept juggling Phone Link for notifications and messages, KDE Connect for the clipboard and LocalSend for files, and always wanted one app that did all of it. So I made one.

It covers what those three did for me, with one app on each side, plus a lot of new features I wanted that I think you'll enjoy having too.

Download

Download Needs
Windows (x64) Installer (.exe) Windows 10 (2004+) or 11, 64-bit Intel or AMD (Phone as webcam needs Windows 11)
Windows (ARM64) Installer (.exe) Windows 11 on ARM (Snapdragon)
Linux (x86_64) One command, or a .deb, .rpm, AppImage or .tar.gz Ubuntu 24.04 or newer, Debian 13, Fedora 40 or newer, 64-bit Intel or AMD
Android App (.apk) Android 8.0 or newer

The apps update themselves from GitHub Releases and check every download against its SHA-256 sums.

On Linux

One command installs NectarLink with everything it needs, and shows each step as it goes:

curl -fsSL https://github.com/thtbee/nectarlink/releases/latest/download/install.sh | sh

It picks the package for your system (.deb with apt, .rpm with dnf or zypper, the tarball elsewhere), checks it against the release's SHA-256 sums and installs it with its dependencies. Then it sets up the phone as a webcam, the phone as a keyboard and mouse, and the firewall for your local network only. To remove it all again, end the same command with sh -s -- --uninstall instead of sh. See Installing on Linux for the details.

[!NOTE] SmartScreen may warn about the Windows installer the first time, because it isn't code-signed yet: choose More info, then Run anyway. On Android, allow your browser or file manager to install apps when asked.

[!IMPORTANT] In India and many other countries, Google Play Protect blocks the APK with no Install anyway button. Pause Scan apps with Play Protect while you install it (Play Store › your profile › Play Protect › Settings), then turn it back on, or install it from a PC with adb install. See Play Protect blocks the APK.

Get started

  1. Install NectarLink on your PC and on your phone.
  2. On the PC, the setup walkthrough shows a QR code. Scan it with the phone (from the NectarLink app or any camera app), or pick the PC from the phone's list of nearby devices and compare a 6-digit code. A USB cable works too, with Android's adb running on the PC.
  3. Allow what you want to share. Every feature has its own switch per device, and the sensitive ones are off until you turn them on.
  4. Optional: set up Wireless debugging once in the phone app for the features Android reserves for privileged apps (phone apps in windows, real touch input, background clipboard sync). No root, nothing else to install.

The user guide walks through every step and feature.

What it does

Stay on top of your phone

Move things between devices

Use your phone from the PC

Use your PC from the phone

Camera and sound

And more: media controls both ways, battery alerts, Find my device, a searchable Timeline of everything that moved, a Command Palette (Ctrl+Alt+Space), a slide-out Shelf, a home-screen widget, and a Connection Doctor that finds and fixes what keeps devices from connecting. An optional Nectar Island at the top of the screen shows calls, music and transfers. Five themes, Hive, Bloom, Glass, Graphite and Fluent, each in light and dark. In English, German, Turkish, Simplified Chinese, Brazilian Portuguese, Vietnamese, Spanish and Russian.

Platform support

Feature Windows Linux macOS (Preview)
Pairing & mutual TLS Yes Yes Yes
Files & folder transfer Yes Yes Yes
Photos browser & download Yes Yes Yes
Continuity Camera Yes Yes Yes
Calls & SMS viewer Yes Yes Yes
Phone quick toggles & volume Yes Yes Yes
Clipboard text & image sync Yes Yes Yes (two-way text, incoming photo)
System notifications Yes Yes Yes (system banners)
Phone screen mirroring Yes Yes Yes (H.264)
Screen recording (MP4) Yes Yes Yes (H.264)
PC audio stream / phone mic Yes Yes Yes (PC audio needs Screen Recording permission)
Phone as webcam Yes Yes (with v4l2loopback) Not yet (needs a Developer ID signed build)
Phone storage in the file manager Yes Yes Yes (Finder via WebDAV)

Private by design

Details: Privacy and security and the security model.

Screenshots

Hive is an exclusive theme: honey, with a living honeycomb that breathes behind the app.

Hive, light Hive, dark
Home in the Hive theme, light Home in the Hive theme, dark

Also Bloom, soft and colorful; Glass, translucent cards over the Windows backdrop; and Graphite, ink on paper. All in light and dark.

Bloom Glass Graphite
Home with notifications and music playing on the PC, Bloom theme Home with notifications and music playing on the PC, Glass theme Home with notifications and music playing on the PC, Graphite theme
Settings, Bloom theme Settings, Glass theme Settings, Graphite theme, dark

The Apps page with two phone apps open in their own windows
The phone's apps on the PC, each in a window of its own.

Messages: a conversation from the phone, answered on the PC
The phone's texts on the PC.

The phone's screen mirrored in a window next to Home
The whole phone screen in a window, with mouse and keyboard control.

Pairing a phone by QR code, next to the Android app's Home with the PC connected
Pairing by QR code, and the Android app once connected.

How it works

 Android app (Kotlin, Compose)            Desktop app (Qt Quick, Rust)
          │ UniFFI                                │ cxx-qt
          ▼                                       ▼
 ┌─────────────────────┐   QUIC (iroh),   ┌─────────────────────┐
 │  nectarlink-core    │◄────────────────►│  nectarlink-core    │
 │  pairing, sessions, │  end-to-end      │  pairing, sessions, │
 │  storage, features  │  encrypted       │  storage, features  │
 └─────────────────────┘                  └─────────────────────┘

Repository layout

core/
  nectarlink-protocol/   Message types, framing, pairing cryptography      (MPL-2.0)
  nectarlink-core/       Identity, trust store, pairing, sessions, features (MPL-2.0)
  nectarlink-ffi/        UniFFI bindings used by the Android app          (MPL-2.0)
  nectarlink-adb/        Client for the PC's adb, for USB connections      (MPL-2.0)
  nectarlink-cli/        Command-line client (`nectarlink`)                (GPL)
desktop/
  app/                   Desktop app: Rust host, cxx-qt bridge, QML UI     (GPL)
  vcam/                  Windows 11 virtual camera Media Foundation DLL    (GPL)
  installer/             NSIS installer script and Sparse Package manifest (GPL)
  packaging/             Linux packages and the install script             (GPL)
android/                 Android app: Kotlin and Jetpack Compose (API 26+) (GPL)
assets/fonts/            Fonts both apps ship with                         (OFL-1.1)
assets/brand/            The app icon (see the trademark policy)
tools/xtask/             Code generation (theme tokens) and checks         (GPL)
third_party/             Patched copies of dependencies, under their own licenses
spikes/                  Technical experiments with their results
scripts/                 Build, packaging and check scripts
docs/                    Guide, technical docs, protocol, design system    (CC BY 4.0)

Building from source

Part Needs
Core and CLI Rust (stable, pinned in rust-toolchain.toml)
Windows app Windows 11, Visual Studio 2022 Build Tools (C++), Qt 6.12 for MSVC 2022 x64
Linux app Ubuntu 24.04 or newer (glibc 2.39), a C++17 compiler, pkg-config, the X11, Wayland and D-Bus development packages, Qt 6.12 (gcc_64, with Qt Shader Tools and Qt Wayland Compositor)
macOS app macOS 14+, Xcode Command Line Tools, Qt 6.12 (or Homebrew Qt 6)
Android app Android SDK (platform 37, NDK 30.0.16248370), JDK 17 or newer, cargo-ndk (see android/README.md)

For Linux hardware video encoding and decoding, install libavcodec-dev and libavutil-dev before building. The backend loads the matching FFmpeg runtime libraries when needed and tries available GPU drivers. Release packages support FFmpeg 6 through 9: the Ubuntu 24.04 release build includes an FFmpeg 6 backend, and separate adapters support versions 7, 8 and 9. Source builds use the matching runtime for their headers. Without matching libraries or a working hardware backend, the existing software H.264 path remains available. HEVC encoding requires hardware; if unavailable, screen sharing falls back to H.264.

cargo test -p nectarlink-protocol -p nectarlink-core -p nectarlink-ffi   # core and tests
cargo run -p nectarlink-cli -- --help                                     # command-line client
cargo run -p nectarlink-desktop                                           # desktop app (Qt's bin on PATH)
cd android && ./gradlew assembleDebug                                     # Android app
./scripts/package.ps1    # Windows installer: target\package\Nectarlink-<version>-x64-setup.exe
./scripts/check.ps1      # every check CI runs; add -Android and -Arm64 for the full set

Releases are built by CI from a v* tag; see docs/technical/releasing.md.

With Nix

Run or develop NectarLink using Nix flakes:

nix run                           # run desktop app
nix run .#cli                     # run CLI client
nix develop                       # enter development environment

Documentation

Questions and ideas

Ask questions, share ideas and show your setup in Discussions. Issues are for bugs and agreed feature work.

Contributing

Contributions are welcome. Please read CONTRIBUTING.md first; for anything larger than a small fix, open an issue to agree on the approach. Contributions are accepted under the Developer Certificate of Origin, and everyone is expected to follow the Code of Conduct.

To translate NectarLink into your language, see docs/translating.md.

To report a security issue, follow SECURITY.md. Please don't open a public issue.

License

See LICENSE for which license applies where. The NectarLink name and logo are covered by the trademark policy.

nectarlink (thtbee/nectarlink)

正在搜索数据库…

这是什么?NectarLink 将你的 Android 手机与 Windows 电脑(也支持 Linux,macOS 处于预览阶段)连接起来,让通知、消息、通话、剪贴板、文件、照片、屏幕镜像和手机应用能在两台设备之间协同使用,无需再单独使用 Phone Link、KDE Connect、LocalSend 等工具。
这是一个应用还是几个独立的程序?这是一个项目,由两个原生应用和共享的 Rust 核心组成:Windows 11 应用使用 Qt Quick 和 Rust 开发,Android 应用使用 Jetpack Compose 开发;同时支持 Linux,macOS 处于预览阶段。
我该怎么配对并运行?在电脑和手机上都安装 NectarLink,然后用手机扫描电脑设置向导中显示的二维码(也可以核对 6 位验证码,或使用 USB 数据线)。配对完成后,再按设备分别打开你需要的功能开关。
我需要什么系统版本?Windows 11 64 位 Intel 或 AMD 版本(ARM64 版即将推出),Android 8.0 或更高版本;Linux 需要 Ubuntu 24.04 及以上、Debian 13 或 Fedora 40 及以上;macOS 14 及以上以预览版形式支持。
所有功能在每个平台上都一样吗?并不完全一样:macOS 预览版不支持屏幕镜像、屏幕录制、电脑音频和麦克风串流,以及把手机当作摄像头使用的功能;HEVC 屏幕共享需要硬件支持,不支持时会退回到 H.264。Windows 安装程序尚未进行代码签名,因此首次运行时 SmartScreen 会发出警告;在部分国家和地区,Google Play Protect 会直接阻止安装 Android APK。
NectarLink 的灵感从何而来?作者同时在用 Phone Link 处理通知和消息、KDE Connect 处理剪贴板、LocalSend 传输文件,于是希望有一个应用能涵盖这些功能,并加入他们自己想要的额外功能。
我能把手机当作电脑的摄像头或麦克风吗?可以。手机可以变成 Zoom、Teams、Meet 和 OBS 的摄像头,也能充当电脑音频的扬声器或麦克风;还提供 Continuity Camera 模式,可直接拍照或扫描文档,结果会直接进入电脑剪贴板。
Deck 功能是什么?Deck 是电脑上类似 Stream Deck 的按钮网格,可用于媒体控制、快捷键、应用启动、OBS Studio 命令等,手机上还能实时显示音量和静音状态。
我怎样才能在电脑上的窗口里运行手机应用?NectarLink 可以让你把任意手机应用放进电脑上它自己的窗口中打开,窗口在任务栏上有独立图标,并与手机自身屏幕并行运行;开启无线调试后,还可以使用真实的触控输入。
作者
thtbee
大小
25.8 MB
星标
4.7K
时长
1个月
提交 · 90 天