[HN Gopher] OpenDrop: An open Apple AirDrop implementation writt...
___________________________________________________________________
OpenDrop: An open Apple AirDrop implementation written in Python
Author : tosh
Score : 307 points
Date : 2022-01-02 13:00 UTC (10 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| btown wrote:
| > OpenDrop automatically sets DYLD_LIBRARY_PATH to look for the
| Homebrew version. You may need to update the variable yourself if
| you install the libraries differently.
|
| FYI for those thinking of doing this, and who would implement it
| as looking in /usr/local - make sure you also search in
| /opt/homebrew as this is now the default for Homebrew
| installations on Apple Silicon based Macs.
|
| https://docs.brew.sh/Installation
|
| https://www.reddit.com/r/MacOS/comments/jw9guu/why_did_homeb...
| vinnymac wrote:
| I would be interested in an overview and comparison of all the
| available options to solve this kind of problem. Here is a list
| of some services I've used successfully in the past.
|
| SnapDrop
|
| - Site: https://snapdrop.net/
|
| - Source: https://github.com/RobinLinus/snapdrop
|
| ShareDrop
|
| - Site: https://www.sharedrop.io/
|
| - Source: https://github.com/szimek/sharedrop
|
| FilePizza
|
| - Site: https://file.pizza/
|
| - Source: https://github.com/kern/filepizza
|
| Wormhole
|
| - Site: https://wormhole.app/
|
| - Source: Closed (for now)
| teawrecks wrote:
| Doesn't look like any of those are airdrop compatible.
| hansel_der wrote:
| thx for the clarification
| Gadiguibou wrote:
| You can also take a look at the following:
|
| Croc:
|
| - Site: https://schollz.com/blog/croc6/
|
| - Source: https://github.com/schollz/croc
|
| Magic Wormhole:
|
| - Source: https://github.com/magic-wormhole/magic-wormhole
|
| Send (A fork of Mozilla's Send):
|
| - Site: https://send.vis.ee/
|
| - Source: https://github.com/timvisee/send
|
| - CLI: https://gitlab.com/timvisee/ffsend
|
| I've personally used Snapdrop and Croc before and they're both
| very nice
| rektide wrote:
| Note, none of these options seem to include device-to-device
| discovery/rendezvous.
|
| AirDrop's use of wireless technology to discover (bluetooth)
| & connect (wifi) devices remains a great frontier few have
| explored or tapped. Sad.
| Retr0id wrote:
| The original WebWormhole, from before its name got stolen and
| productized, is still available and open source:
|
| https://webwormhole.io/
|
| https://github.com/saljam/webwormhole
| minhmeoke wrote:
| Another option (also not Airdrop compatible) is
| https://github.com/akovacs/uploadserver which is a Rust
| (Rocket) web server that you can run on a local machine. Open a
| browser and navigate to the machine's IP address at port 8000
| to upload/download files from the web form.
|
| Disclaimer: I know the author.
| fragmede wrote:
| Batteries included. Run: python3 -m
| http.server
|
| and go to port 8000.
| ipsum2 wrote:
| You can't upload, but if its just download (on a single
| thread) this is pretty good.
| adidevsoft wrote:
| taf2 wrote:
| I wonder if this could work with circuit python to drop updated
| programs ...
| stevenhubertron wrote:
| Could this act as a dead drop? Just have this running on a Pi
| Zero in a public place as a way to covertly transfer info?
| matthewfcarlson wrote:
| Make me want to setup a raspberry pi in a public place and just
| see what sort of things people send to it.
| bellyfullofbac wrote:
| This was a thing: https://piratebox.cc/start : open WiFi
| network that's not connected to the Internet, but it had a
| forum software. I even bought a simple router and got it
| installed, but I sadly never set it up in public. A friend who
| was involved with a local hangout got interested in the idea of
| an "Internet" where you had to physically go to the location to
| access the content, although I don't think he set it up there
| either.
| matthewfcarlson wrote:
| Or the reverse of that where it sends a random meme to anyone
| walking by.
| patentatt wrote:
| Oh no, a thousand marketers just had the idea of
| automatically airdropping advertisements to passers-by. You
| could even structure it as a lottery-esque type of thing,
| only giving out good coupons or discounts to random
| individuals at random intervals, prompting people to loiter
| and wait for theirs.
| tinus_hn wrote:
| The default is to only accept transfers from people that
| are in your address book.
| fosefx wrote:
| If I understood their paper[1] correctly you can just use
| a popular phone number that a person walking by is likely
| to have in their contacts, like an emergency line number.
|
| My mobile telco's SIM comes with a couple of contacts on
| it like their customer support line. I don't know
| anything about AirDrop, but I assume this will work.
|
| [1]: https://www.usenix.org/conference/usenixsecurity21/p
| resentat...
| lxgr wrote:
| As far as I understand the protocol, you'd need a
| certificate signed by Apple in order to be able to
| masquerade as that contact in somebody's contact list,
| and Apple only signs these after phone number or email
| confirmation.
| bellyfullofbac wrote:
| Hah, make it give out cryptocoins, and take the idea of
| peasants waiting for royalty to make it rain money to the
| 21st century, where it all happens digitally/using a
| smartphone.
|
| Did kings and emperors even do that in the old times?
| [deleted]
| BeFlatXIII wrote:
| Before the pandemic, one of my friends used to have a hobby
| of going to bars and conventions and AirDropping pictures of
| ducks to strangers who left their AirDrop turned on.
| copperx wrote:
| Was it really ducks, or was it an autocorrection?
| k_bx wrote:
| wild guess: dickpics
| donkarma wrote:
| Wonder if there's anything like this for the iWatch and Android.
| jkepler wrote:
| As a Debian and Android user, can anyone help me understand how
| AirDrop and this python implementation differ from or are similar
| to Syncthing and/or Firefox Send? Is it basicly the same idea?
| lelandbatey wrote:
| Syncthing and Firefox send both incorporate a 3rd party
| publicly available server which both parties contact over the
| general internet.
|
| Airdrop is done direct device to direct device, without
| intermediate, over wifi.
| 1cvmask wrote:
| Is there a particular reason they chose GPL 3 over an MIT
| license?
| infinityplus1 wrote:
| There is "Open" in its name. Author probably doesn't want
| anyone to create more closed source software using it.
| barefeg wrote:
| Why is this downvoted?
| switch007 wrote:
| Asking "is there a particular reason" comes off as quite
| bitchy and dismissive.
| hk__2 wrote:
| Maybe because that's not the place where to ask that
| question. OP should open an issue on the project to ask them
| instead of the HN community (who probably don't know better).
| atoav wrote:
| Also: The creator probably _has_ a reason why they chose the
| license. This comment pretents to be a question, when in fact
| it just expresses unhappieness with that license choice.
|
| If you are curious why they chose the license, why not ask
| them?
| newaccount74 wrote:
| Presumably because the merits of GPL vs MIT are discussed so
| often on HN that people don't want any more of that.
| mrtksn wrote:
| AirDrop is brilliant but it fails silently, no error messages -
| nothing. At best, it says that it was cancelled.
|
| Does anyone knows how to debug it?
|
| I also wonder, why this type of file transfer isn't the industry
| standart. It's so straightforward(when it works), why would
| anyone transfer files in any other way? Okay, maybe a transfer
| history can also be useful.
| jbverschoor wrote:
| Also my experience.. Super unreliable. It works, as long as you
| don't touch your phone/laptop, and don't have _any_ network
| hickups.
|
| Still, it's the only thing that works
| cormacrelf wrote:
| I thought it multiplexed over Wifi, Wifi Direct and
| bluetooth? So much for that.
| supreme_berry wrote:
| When I was traveling from Sharm El Sheikh through Sinai to
| Israel in the bus I've transferred 40GB of photos and videos
| to my friends on iPhone 6S. Imagine this on Android 5 years
| ago - they (Google) only managed to copy AirDrop with same
| functionality (wifi + bluetooh) only in 2020 with Nearby
| Share.
| edf13 wrote:
| Yes - similar story... I had to use it at airport security
| in south east asia when I needed my hotel booking to get
| through... my colleague was able to airdrop it to me even
| though we had no cell or wifi connectivity
| xorcist wrote:
| Not sure if that's a real question, how you would have
| copied files 5+ years ago between phones? Support for USB
| host mode was introduced with Android 4, released in 2011,
| but would have required the use of an OTG cable so that
| would likely not have been an option.
|
| Popular Android file managers at the time had file transfer
| capabilities so that was probably the quickest. The
| advantage is that they used normal file transfer protocols
| which were available everywhere so the other party didn't
| require any special support.
|
| However a decade ago all phones had SD cards, because their
| internal memory storage was so small so you needed them
| should you wish to use the camera beyond any trivial
| amount. So just copying that way would probably have been
| what most people did.
| unixhero wrote:
| Why not just use a cable and copy the files? Oh wait you
| can't do that on an iPhone. You don't have the freedom to.
| mrtksn wrote:
| Of course you can use a cable, but they are unreliable.
| They tend to break, corrode, get dirty, disappear, have
| incomparable ends(one side USB-A, the other one micro
| USB, lightning - whatever) that one of the devices don't
| accept.
|
| They are also bulky and the transfer speeds are slow.
| Airdrop can transfer gigabytes of data in minutes, which
| is only possible with the latest wired interfaces that
| only the newest devices have and not all support file
| transfers.
|
| iPhones tend to last 3-5 years or even more and iPhones
| from different generations can transfer each other files
| through AirDrop. Not everyone has the money to update
| their phone each year and many who can update think it's
| wasteful to do so that they can use the latest wired file
| transfer method.
| supreme_berry wrote:
| You recommend buying 5-10m cable and connect people on
| different seats in the bus/plane/pool/whatever? Which
| century is this?
| vmception wrote:
| Android users are carrying around data transfer cables?
|
| Hey guys, get a load of this!
| jkepler wrote:
| Uh, I'm on Android ans I use Syncthing, not a cable.
| infamia wrote:
| " Android users are carrying around data transfer cables?
|
| Hey guys, get a load of this!"
|
| ...says the guy with a huge dongle in his pocket.
| vmception wrote:
| I would love to see this caricature of ios users, what
| dongle do you imagine we carry and what purpose does said
| dongle serve?
| marderfarker2 wrote:
| infamia wrote:
| I was mostly thinking about Macs at the time I made the
| joke, because very often an iOS user is also a Mac user.
| Where I work, Mac users always have to carry around
| dongles.
| vmception wrote:
| ah I see. with regard to Macs, I skipped from the 2015
| macbook model to the 2021 macbook model and I probably
| would have held out longer and therefore never needed a
| dongle, but I digress.
|
| back to iOS. no dongles for me there either. my
| headphones have been wireless for almost a decade, and
| the charging ports are pretty ubiquitous.
| laichzeit0 wrote:
| Really depends. Our company is entirely Mac. Everything
| "just works" wirelessly. Like AirPlay for conference
| rooms, my external monitor is USB-C, etc. No dongles
| necessary. It's only when going to other clients where I
| need to carry around dongles because they don't support
| AirPlay or their Wifi network requires several days
| advanced notice and a urine test before you can get
| access.
| bee_rider wrote:
| I think it is the other way around -- almost always a Mac
| user will be an iOS user, but there are plenty of iPhone
| users without Macs. At least in the US. iPhones seem to
| be around 50%-ish of sales in recent years, while Macs
| are not as popular, somewhere around 15%.
|
| https://9to5mac.com/2021/07/13/mac-market-share-q2-2021/
|
| https://www.phonearena.com/news/apple-iphone-record-
| sales-us...
|
| Of course, there are lots of competing estimates for this
| sort of thing, but the numbers are so far apart that I
| don't think it matters too much.
|
| Personally, I have an iPhone because I'm completely
| uninterested in cellphones and just want something that I
| don't have to think about too much/will be supported for
| a while. My computers all run Linux, because computers
| are cool, and fun to tinker with. Maybe someone who grew
| up in the era where cellphones weren't so useless will
| have a different perspective, though.
|
| WRT dongles -- I dunno. Some of the popular Macbook
| models don't have HDMI ports, right? That seems pretty
| annoying. But my ZenBook lacks a headphone jack! The
| moral of the story is I guess that OEMs just want to fill
| our pockets with dongles. Or maybe selling replacement
| dongles is the solution to the post Moore's law era,
| since we don't have to replace our PCs anymore.
| Tagbert wrote:
| " ...says the guy with a huge dongle in his pocket"
|
| No, just happy to see you
| GeekyBear wrote:
| > Does anyone knows how to debug it?
|
| Toggle Airplane mode on and off.
|
| Bluetooth is problematic on every platform. Restarting it is
| the usual fix.
| mrfusion wrote:
| A major failure point for me is devices simply not showing up
| as available.
| tgv wrote:
| I've got an MBP that doesn't show up, and never has, but it
| sees the rest. Any other macbook or iphone I've tried AirDrop
| with just works, but not my MBP.
| notreallyserio wrote:
| I've had trouble with airdrop from phone to mbp when the
| mbp was on VPN. I don't know how airdrop works but I'm
| guessing the fact the VPN takes over DNS (and blocks
| requests to all other nameservers) has something to do with
| it.
|
| Who knows though. Apple's engineers love writing software
| that doesn't produce useful logs.
| tgv wrote:
| They do love clogging the logs with useless messages,
| though, as anyone who's opened Console can testify.
| reaperducer wrote:
| I've had similar experiences.
|
| iOS devices always show up, no problem.
|
| Macs at home only do occasionally. Until the latest macOS
| update, my MacBook Pro would only show up if I opened an
| AirDrop Finder window.
|
| But when I was in the office, my work group of about 15
| people would AirDrop files back-and-forth to one another
| all day long, without a hiccup.
|
| It is a mysterious beast.
| Wowfunhappy wrote:
| > I also wonder, why this type of file transfer isn't the
| industry standart.
|
| I would assume because it's _technically_ complicated, using
| multiple protocols under the hood. That 's fine if you control
| all the hardware on every supported device, but not great for
| building interoperability.
|
| Bluetooth file transfer is a standard that works, but it's
| slooooooooow!
| Traubenfuchs wrote:
| It's brilliant until a pair of devices enters a state where the
| target does not receive airdrop notifications anymore, while
| the source is stuck on ,,waiting", which can only be resolved
| by restarting the devices.
| elondaits wrote:
| When AirDrop doesn't work I just turn Bluetooth off and on on
| the device. That's usually enough.
| fragmede wrote:
| The furthest I got was, on macOS, I restarted the daemon with
| `sudo launchctl stop com.apple.sharingd` followed by _start_.
| This however didn 't fix it for my case, and I was not able to
| find any deeper debugging steps on my iPhone. Perhaps rebooting
| the phone would have helped.
| emsy wrote:
| This is true for most Apple protocols in my experience. I'm
| supposed to be able to control my Homepod from my watch with a
| tap but it never works. Sometimes I can't use the Homepod for
| minutes until it shows up. iMessage regularly fails to show the
| blue name for contacts, FaceTime is randomly unavailable for
| certain contacts, Airpods randomly disconnect, Airdrop rarely
| works. Tethering is also kind of spotty. The watch Walkie-
| Talkie function is terrible, dropping bits of the message. How
| they even implemented a working TCP/IP stack is beyond me. Lo
| and behold the most reliable "protocol" is HomeKit, but even
| that is randomly unable to persist name changes.
| quitit wrote:
| I find a lot of the grief with these protocols is driven by
| which wifi router is in use. When using the old Apple wifi
| routers I never had trouble with homekit, airdrop, handoff,
| airplay or any of the zeroconfig network stuff: as soon as I
| switched to other brands the issues would pop up (including
| ones that oddly seem to persist even after disconnecting from
| wifi - but then disappear when using a different user account
| on the same machine).
|
| Because of this I feel Apple could do a hugely better job in
| all of their wireless protocols, as it stands the only truly
| stable networking appears to be between two iphones.
| FabHK wrote:
| Many "just works" things on the local network start failing
| for me when I'm using a VPN. Maybe check whether that's the
| reason. But yes, generally the reliability is so-so. Also,
| the feature to use Apple Watch to unlock the Mac or iPhone
| works mostly, at best.
| emsy wrote:
| I don't use a VPN and I don't think it's my network because
| I don't have any problems with "old" protocols (UPNP,
| samba, RDP/VNC, SSH, everything on top of HTTP). I wonder
| what Apple's protocols do that makes them so error prone.
| If it was one or two of those I'd say it's a bad department
| but the amount of errors suggests a deeper problem in the
| way Apple develops these things.
| Uupis wrote:
| My experience suggests that this is true for most Apple
| _products_. It either works the way Apple has decided it
| should work, or it fails silently and mysteriously.
| tomcam wrote:
| I bought 4 HomePods and they are easily the buggiest product
| I've bought non 30 years of buying almost everything Apple
| makes. Disgusting.
| macNchz wrote:
| I've encountered many of these as well and have always
| assumed this was somehow the result of trying to make
| everything "just work", wherein providing detailed user
| feedback or error messages would be some kind of admission
| that it hadn't "just worked".
| spicybright wrote:
| It either "just works" or "just doesn't work"
| aaaaaaaaaaab wrote:
| sudo killall bluetoothd
|
| This fixes if the error is on the Mac side. On iOS you have to
| reboot the device.
| ink404 wrote:
| Toggling bt/airplane mode can work for iOS instead
| _V_ wrote:
| I went from MacOS to Linux recently so I was going through
| similar projects and there is one _important caveat_ : You have
| to have WIFI adapter that supports special mode (active monitor
| mode with frame injection).
|
| Without compatible wifi adapter this will not work unfortunately
| :-(
| quyleanh wrote:
| Is there any Airdrop alternative for Android - Android and
| Android - Windows devices in the same network?
| grishka wrote:
| For Android-Android, there's Google's nearby share. It's built
| into GSF so every single Android phone out there has it out of
| the box.
|
| I reverse engineered enough of its protocol to be able to
| transfer a file from my phone to my computer over LAN. I really
| need to do a writeup on this stuff, and also finish my macOS
| app to be actually usable.
| adidevsoft wrote:
| Simplicitas wrote:
| BTW, is there one to share between iOS and Android?
| bilal4hmed wrote:
| I tend to use snapdrop.net when everyone is on the same network
| otherwise https://www.sharedrop.io/ works well too
| derwiki wrote:
| Corporate policy blocks Airdrop and removable media, so
| Sharedrop is my preferred method of transfer.
| adidevsoft wrote:
| Disclaimer: We built it. Airdrop like functionality for all
| platforms.
|
| Checkout https://quickit.adidevsoft.com
| kitotik wrote:
| This looks like a nice tool, but the killer feature of
| AirDrop is not requiring a local network. The p2p nature of
| it is why it's so nice to use.
| javajosh wrote:
| Syncthing
| Shish2k wrote:
| Syncthing is great software... but it isn't in the same genre
| of "send a random one-off file to a person physically close
| to you with no advanced setup"
| tosh wrote:
| (not exactly the same but when you control both devices:)
|
| Taildrop
|
| https://tailscale.com/kb/1106/taildrop/
| samwillis wrote:
| I believe AirDrop is a a great example of how Apples vertical
| integration and full ownership of software and hardware really
| thrives. It may not offer interoperability with other platforms,
| but that's because other platforms don't have the control needed
| to implement the same level of integration of hardware and
| software needed.
|
| Without the direct low level control of the radio hardware they
| would not have been able to integrate both Bluetooth and WiFi in
| the way that AirDrop does.
|
| I hope one day standards for this type of functionality appear so
| that other platforms can implement it. Ideally apple would
| contribute their tech to create the standard but that's probably
| wishful thinking.
| emsy wrote:
| Airdrop is a good example that a easy to use but unreliable
| technology will beat a hard to use but reliable solution.
| Airdrop sucks, but even my mom can use it.
| smoldesu wrote:
| > but that's because other platforms don't have the control
| needed to implement the same level of integration of hardware
| and software needed.
|
| I seriously doubt this is the case. We're in a thread where
| people are posting dozens of implementations that work
| perfectly fine on other hardware.
|
| > Without the direct low level control of the radio hardware
| they would not have been able to integrate both Bluetooth and
| WiFi in the way that AirDrop does.
|
| This... is also not necessarily true? Android lets you send
| arbitrary data through WiFi Direct and Bluetooth alike, I'd
| really like to see a detailed breakdown that explains how that
| modulation isn't possible on standard hardware/software stacks
| though.
| kiwijamo wrote:
| Does WiFi Direct et al even work? I've tried a couple of time
| to share stuff using a wireless methid from my android device
| to other Android devices and have never managed to do this
| successfully. What's the magic trick for doing this Android
| to Android?
| djxfade wrote:
| AirDrop works perfectly fine on a Hackintosh given you have
| compatible Bluetooth and WiFi hardware.
| quitit wrote:
| They historically have opened source similar protocols, e.g.
| they open sourced rendezvous. But generally there would need to
| be an interoperability reason for them to do so. AirDrop seems
| like a good candidate for this.
| nijave wrote:
| Windows has a lot of integrated solutions like that. I think
| Linux is the main outlier where there's nearly infinite ways to
| configure the whole OS and each component has at least 2-3
| software alternatives (init systems, desktop environments,
| network management components)
| dividuum wrote:
| > I believe AirDrop is a a great example of how Apples vertical
| integration and full ownership of software and hardware really
| thrives.
|
| I guess you don't have two iDevices then? Airdropping something
| constantly and randomly doesn't work with no popup on the other
| side. It's totally embarrasing given that they have control
| over soft and hardware. I'm puzzled how it's even possible to
| screw this up so badly and leaving it like this for years.
| samwillis wrote:
| No I do, and the 95% of the time it works makes up for the 5%
| of the time it doesn't.
| bredren wrote:
| It would be great to be able to drop .epub files to my main
| machine.
|
| Then have those automatically converted into .mobi format by
| calibre, and finally sent on to my kindle.
|
| I suppose I could set up something to just watch for new epubs in
| downloads though.
| sys_64738 wrote:
| Does Air Drop use bluetooth or is it network facing? I always
| worry about yet another attack vector being opened up. Usually
| any new usability feature like this is designed with security
| from the ground up which is a misnomer for riddled with unexposed
| security holes. I always recall the promotion of JAVA as being
| the security standard bearer but look where that ended up. The
| best way to secure an unwanted feature is to disable it
| permanently.
| supreme_berry wrote:
| AirDrop never was hacked. It uses bluetooth and wifi to
| auth/search/transfer. It doesn't require any existing network
| so it works in the desert or in the middle of the ocean.
| fragmede wrote:
| That's slicing it rather finely. After transfer is complete,
| the host device opens the transferred data. When combined
| with CVE-2016-4657 on an unpatched device, they allow an
| attacker to gain control of the victim's device after they
| accept the airdrop. We can call that a Webkit vulnerability
| instead of Airdrop (because it is), but end of the day,
| Airdrop is another route for attackers to gain access to your
| system. You can choose to enable it if you deem it useful
| enough, but it would be naive to blindly believe "it's fine".
|
| Now, the victim has to accept the Airdrop payload, and
| Airdrop has limited range, so it's not as scary as the
| Pegasus iMessage exploit which was totally remote, but I
| wouldn't bet my life on the Airdrop code having zero bugs.
| jamesgeck0 wrote:
| AirDrop has had several vulnerabilities. Some of them were
| reported by the same group of security researchers who
| developed OpenDrop.
|
| ADWL, the underlying protocol, had a zero-day that allowed
| pwning every iOS device in radio range with no user
| interaction.
|
| https://googleprojectzero.blogspot.com/2020/12/an-ios-
| zero-c...
| nojito wrote:
| Were any of them actively exploited?
| nojito wrote:
| Bluetooth to start the handshake than a protected adhoc WiFI
| network between the two devices.
___________________________________________________________________
(page generated 2022-01-02 23:00 UTC)