OpenDrop: An Open Source AirDrop Implementation in Python
OpenDrop is a Python command-line tool that implements the Apple AirDrop protocol, enabling file sharing with iOS and macOS devices over Wi-Fi.
What is OpenDrop?
OpenDrop is an open-source, command-line tool that implements the Apple AirDrop protocol, allowing you to share files directly over Wi-Fi with Apple devices running iOS and macOS. Developed by the Seemoo Lab at TU Darmstadt, it is the result of extensive reverse engineering of Apple's proprietary AirDrop protocol.
Why OpenDrop Matters
AirDrop is a convenient feature for Apple users, but it's locked within the Apple ecosystem. OpenDrop breaks down this wall by providing a cross-platform implementation that can send and receive files from Apple devices. This is particularly valuable for developers, researchers, and anyone who needs to transfer files between non-Apple and Apple systems without relying on cloud services or third-party apps.
Key Features
- Protocol Compatibility: OpenDrop is protocol-compatible with Apple AirDrop, meaning it can communicate directly with Apple devices.
- Command-Line Interface: Simple and scriptable, perfect for automation and integration into workflows.
- File and URL Sharing: Supports sending both files and web links (URLs) to Apple devices.
- Receiver Discovery: Can discover nearby Apple devices that are set to "everyone" discoverability mode.
- Automatic File Acceptance: When receiving, OpenDrop automatically accepts all incoming files and saves them to the current directory.
How It Works
OpenDrop operates over Apple Wireless Direct Link (AWDL), a proprietary Wi-Fi link layer used by Apple devices for peer-to-peer communication. This means it currently only works on macOS or Linux systems running an open re-implementation of AWDL, such as OWL.
Installation
Installing OpenDrop is straightforward via pip:
pip3 install opendrop
For the latest development version, clone the repository and install:
git clone https://github.com/seemoo-lab/opendrop.git
pip3 install ./opendrop
Sending a File
- Discover Receivers: Use the
findcommand to list nearby Apple devices.
$ opendrop find
Looking for receivers. Press Ctrl+C to stop ...
Found index 0 ID eccb2f2dcfe7 name John’s iPhone
Found index 1 ID e63138ac6ba8 name Jane’s MacBook Pro
- Send a File: Use the
sendcommand with the receiver index, ID, or name.
$ opendrop send -r 0 -f /path/to/some/file
Asking receiver to accept ...
Receiver accepted
Uploading file ...
Uploading has been successful
Sending a URL
Since v0.13, OpenDrop can send web links. The receiving Apple device will immediately open the URL in its browser upon acceptance.
$ opendrop send -r 0 -f https://owlink.org --url
Receiving Files
Receiving is even simpler. Just run the receive command, and OpenDrop will accept all incoming files automatically, saving them to the current directory.
$ opendrop receive
Technical Details
Requirements
- Python: >= 3.6
- AWDL: macOS or Linux with OWL
- libarchive: A current version is required. On macOS, install via Homebrew:
brew install libarchive
OpenDrop automatically sets DYLD_LIBRARY_PATH to use the Homebrew version. Linux distributions typically ship with up-to-date versions.
Limitations (and Research Opportunities)
OpenDrop is experimental research software, so it has some limitations:
- Bluetooth LE Triggering: Apple devices start their AWDL interface only after receiving a custom Bluetooth LE advertisement. This means OpenDrop may not discover receivers that are not actively advertising.
- No Peer Authentication: OpenDrop does not verify TLS certificates signed by Apple's root or validate Apple ID records. It automatically accepts all files.
- Single File Sending: Unlike Apple AirDrop, OpenDrop does not support sending multiple files at once.
- Contacts-Only Mode: OpenDrop only works with devices set to "everyone" discoverability. Contacts-only mode requires extracted Apple credentials from macOS.
Research Background
OpenDrop is part of the Open Wireless Link project, which aims to understand and document Apple's proprietary wireless protocols. The team has published several academic papers:
- PrivateDrop: A privacy-preserving authentication scheme for AirDrop (USENIX Security '21)
- A Billion Open Interfaces: Analysis of attacks on iOS and macOS through AWDL (USENIX Security '19)
Conclusion
OpenDrop is a powerful tool for developers and researchers who need to interact with the Apple ecosystem from non-Apple platforms. While it has limitations due to its research nature, it provides a solid foundation for understanding and extending AirDrop functionality. Whether you're automating file transfers, conducting security research, or just want to send files from Linux to an iPhone, OpenDrop is worth exploring.
For more information, visit the GitHub repository.
Source
seemoo-lab/opendrop: An open Apple AirDrop implementation written in Python