Dev

HoRNDIS MacGyvers your Mac to get online with Androids


FOSS Fest These days, Macs will only talk to Apple phones to get online out of the box, but you can get around the restrictions if you’re determined enough.

If you want to use a smartphone to provide internet access for a laptop, the obvious way is to create a Wi-Fi hotspot. Look at the list of Wi-Fi networks on any public transport to see how many people do this, then forget about them. This, for the sake of clarity, works fine from Android to Mac. The snag is that this is ruinous for phones’ battery life. There are better ways, but Apple doesn’t make these easy.

A much more power-efficient way is to make a Bluetooth hotspot. Pair phone and laptop, then in the phone’s Settings, turn on Bluetooth internet connection sharing. From a Windows laptop, just connect to this and you’re away. In Linux, it depends on distro and desktop, but it’s still pretty easy. If you have super-fast phone, Bluetooth speed may prove a bottleneck, but for normal 4G downloads it’s fine and it uses a tiny fraction of the battery power.

This used to be easy from a Mac, but macOS 11 “Big Sur” made it harder, and since macOS 12 “Monterey” it’s gone.

All is not lost, though. You can still just plug your Android phone into a Mac’s USB port and tether that way. Joshua Wise’s tiny HoRNDIS driver is what makes this work and it’s a mere 46 kB GitHub download. The name is a pun on Microsoft’s RNDIS driver standard and is pronounced horrendous, which gave us a smile. Of course, if you need to be online to download it, that’s a slight snag, but you can use a temporary Wi-Fi hotspot to get the driver. If you have macOS FOSS package manager Homebrew installed, you can also install it that way:

brew install --cask horndis
sudo kextload /Library/Extensions/HoRNDIS.kext

Install the driver, possibly granting it permissions in System Settings | Privacy & Security, reboot, and you can plug in your phone, tick the “USB Tethering” box, and your Mac will be online.

You can also enjoy the small extra frisson of pleasure of having defied Google’s admonition on that page:

Important: Mac computers can’t tether with Android by USB.

Once you have HoRNDIS installed, yes, they can, and The Reg FOSS Desk can report that this worked fine on a desktop iMac with MacOS 10.14 “Mojave” when the Vulture Towers FOSS division relocated to the Isle of Man this time last year.

However, Apple is constantly increasing the security measures in macOS and more recent releases won’t let the driver install. There is a newer fork for macOS 11 and later. There’s also a workaround for installation, and this vulture can report that it worked successfully, even with the latest macOS 14.3 “Sonoma” on an M1 MacBook Air, from Brussels’ somewhat connectivity-challenged Midi station.

Other wins are increased privacy – nobody else can join a wired connection – as well as speed and reliability. Whether it’s a pro or a con that this also charges the phone from the laptop may depend on your situation at the time.

Because this is a kernel extension, you need to turn off modern macOS’s protections against installing these. Some might consider that worrying and an unacceptable price to pay, which is legitimate for the extra-paranoid. However, it works for us. ®



READ SOURCE

This website uses cookies. By continuing to use this site, you accept our use of cookies.