
adityatr64/QShare-linux

Linux에서 Google의 Quick Share 프로토콜을 오픈소스로 구현한 것으로, AI의 도움을 받아 Nearby 연결을 연구하여 만들어졌으며 Linux에서 Android로 파일을 보낼 수 있다.

adityatr64/QShare-linux

Linux에서 Google의 Quick Share 프로토콜을 오픈소스로 구현한 것으로, AI의 도움을 받아 Nearby 연결을 연구하여 만들어졌으며 Linux에서 Android로 파일을 보낼 수 있다.
등재 이유: 상호 운용성: Linux가 Android와 통신할 수 있게 해주는 프로토콜 구현. MIT 라이선스이며 벤더 코드를 복사하지 않았다.
설치 방법은 원본 출처를 확인하세요.
An interoperable, native Linux implementation of the Google Quick Share (formerly Nearby Share) protocol, providing bidirectional file transfer capabilities between Linux workstations, Android devices, and ChromeOS systems.
QShare Linux is an open-source client and receiver daemon reverse-engineered from the Google Nearby Connections and Quick Share protocol specifications. It allows Linux desktop environments and headless servers to discover, authenticate, send, and receive files with Android and ChromeOS devices over local networks and Bluetooth Low Energy.
The project provides:
Supported environments include modern Linux distributions running systemd and glibc or musl: Arch Linux, Fedora, Ubuntu, Debian, openSUSE, and Alpine Linux. Both Wayland and X11 display servers are supported.
The Quick Share protocol stack operates in four distinct phases: Discovery, Pairing and Key Exchange, Secure Framing, and Payload Streaming.
0xFEF3 for Nearby Sharing, and optionally 0xFE2C for Fast Pair) using the standard Linux BlueZ D-Bus interface. The advertisement packet carries a 4-byte ephemeral endpoint ID, a 3-byte service ID hash (0xFC9F5E, computed as SHA-256("NearbySharing")[0..3]), and encoded device metadata. Nearby Android devices detect this beacon and immediately populate the Quick Share share sheet._FC9F5ED42C8A._tcp.local. on port 8765 (with dynamic fallback up to 8815). The instance name and n TXT attribute contain base64-encoded WifiLanServiceInfo structures containing the endpoint ID and sanitized device name./proc/net/arp and Netlink neighbors) combined with targeted port probes (53601, 53317, 8765).Upon TCP connection establishment, both endpoints execute the UKEY2 (Universal Key Exchange 2) protocol:
ClientInit, ServerInit, ClientFinished).SecureMessage envelope.flags = 0.flags = 1 (LAST_CHUNK), followed by socket flushing, PAYLOAD_RECEIVED_ACK control packets, and clean DisconnectionFrame negotiations.This implementation was developed with the assistance of artificial intelligence systems during reverse-engineering exploration, packet analysis, and code generation.
While the protocol logic, cryptographic primitives, and state machines have been tested against production Android 14/15 and ChromeOS devices, community review is actively requested. Developers and security researchers are encouraged to audit edge cases, protocol state machines, and cryptographic boundary implementations.
This project is intended strictly for interoperability purposes in accordance with reverse-engineering protections for software compatibility. No proprietary binaries or keys from Google LLC or Samsung Electronics are distributed within this repository.
This implementation builds upon the foundational reverse-engineering research and documentation produced by the open-source community:
sudo apt update
sudo apt install -y build-essential pkg-config libadwaita-1-dev libgtk-4-dev libgdk-pixbuf-2.0-dev libssl-dev protobuf-compiler avahi-daemon bluez
sudo pacman -S --needed base-devel libadwaita gtk4 gdk-pixbuf2 openssl protobuf avahi bluez bluez-utils
sudo dnf install -y gcc gcc-c++ pkgconf-pkg-config libadwaita-devel gtk4-devel gdk-pixbuf2-devel openssl-devel protobuf-compiler avahi bluez
avahi-daemon.service is active for local DNS-SD operation:
sudo systemctl enable --now avahi-daemon.service
sudo systemctl enable --now bluetooth.service
bluetooth, hci_uart or btusb) and network multicast support enabled by default in distribution kernels.Quick Share requires local subnet connectivity between your Linux machine and mobile devices.
| Protocol | Port / Range | Type | Purpose | Direction | |---|---|---|---|---| | UDP | 5353 | Multicast (224.0.0.251) | mDNS / DNS-SD Device Discovery | Inbound / Outbound | | TCP | 8765 - 8815 | Unicast (Stream) | Incoming Encrypted File Transfer Socket | Inbound | | TCP | Ephemeral (53601, 53317, dynamic) | Unicast (Stream) | Outgoing Transfers to Android Targets | Outbound | | BLE | Service UUID 0xFEF3 / 0xFE2C | D-Bus / HCI Broadcast | Fast Device Advertisement Beacon | Outbound Broadcast |
You can configure the local firewall automatically using the included setup script or binary CLI command:
# Using the helper script (auto-detects UFW, firewalld, nftables)
sudo ./scripts/setup-firewall.sh
# Or using the application binary directly
QShare-linux --setup-firewall
# Allow mDNS discovery multicast
sudo ufw allow 5353/udp comment "Quick Share mDNS Discovery"
# Allow incoming file transfer TCP port range
sudo ufw allow 8765:8815/tcp comment "Quick Share File Transfers"
# Optional: Restrict incoming connections to your local subnet
# sudo ufw allow from 192.168.1.0/24 to any port 8765 proto tcp comment "Quick Share LAN Only"
sudo ufw reload
# Enable mDNS service
sudo firewall-cmd --permanent --add-service=mdns
# Open Quick Share transfer port range
sudo firewall-cmd --permanent --add-port=8765-8815/tcp
# Apply changes
sudo firewall-cmd --reload
# Allow mDNS UDP traffic
sudo iptables -A INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
# Allow incoming TCP transfers on local subnet
sudo iptables -A INPUT -p tcp --dport 8765:8815 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
sudo nft add rule inet filter input udp dport 5353 ip daddr 224.0.0.251 accept comment "Quick Share mDNS"
sudo nft add rule inet filter input tcp dport 8765-8815 ct state new,established accept comment "Quick Share TCP"
The repository includes a comprehensive installer (install.sh) and standard Makefile that install the binary, register the .desktop launcher, install scalable application icons, set up systemd services, and configure the firewall:
Installs to /usr/local/bin, installs .desktop launcher into /usr/local/share/applications, and configures the system firewall:
git clone https://github.com/adityatr64/QShare-linux.git
cd QShare-linux
cargo build --release
sudo ./install.sh
Or using make:
make
sudo make install
Installs into ~/.local/bin and ~/.local/share/applications:
./install.sh --user
To cleanly remove all installed binaries, desktop launchers, and systemd services:
sudo ./install.sh --uninstall
Once installed, Quick Share is fully indexed by your desktop environment's application runner:
Before initiating transfers, you can verify your local network readiness using the built-in diagnostic tool:
QShare-linux --check-network
This checks:
For servers, NAS devices, or headless setups:
QShare-linux --headless --name "Linux Storage" --port 8765 --download-dir /mnt/storage/transfers
Run Quick Share continuously in the background upon user login:
# Enable and start service
systemctl --user daemon-reload
systemctl --user enable --now qshare-linux.service
# View status and live transfer logs
systemctl --user status qshare-linux.service
journalctl --user -u qshare-linux.service -f
Transmit files directly to a specific target IP without opening the graphical interface:
QShare-linux --target 192.168.1.150:53601 --send /path/to/document.pdf /path/to/archive.tar.gz
QShare-linux --check-network
sudo systemctl status avahi-daemon
avahi-browse -rt _FC9F5ED42C8A._tcp
bluetoothctl show
8765:8815/tcp is open in your firewall:
sudo ./scripts/setup-firewall.sh
RUST_LOG=debug QShare-linux).This project is licensed under the MIT License. See LICENSE for complete details.
Contributions, bug reports, and pull requests are welcomed. If you identify discrepancies with upstream Android releases, packet framing variations on newer OEM skins (One UI, MIUI, OxygenOS), or edge cases in the UKEY2 state machine, please submit an issue with sanitized packet dumps and trace logs.