
Show HN: HoRNDIS - an Android USB tethering driver for Mac OS X - jwise0
http://joshuawise.com/horndis
======
dkulchenko
I've been waiting for this for a very long time; works perfectly. Thanks!

------
gwillen
I am a beta tester, and probably the only person who has run this on 10.6, so
if you have 10.6-related problems let me know.

------
rob-olmos
Thanks for this! However, I'm unable to get this working, let me know if you'd
rather I post this as a github issue:

MacBook Pro 13" with 10.7.5 Droid Razr with Android 4.0.4 Verizon with mobile
hotspot and I believe I had tethering working on a Windows laptop before.

Steps: I have installed HoRNDIS and rebooted (tried install/reboot again just
to be sure) Plugged in my phone via USB Enabled USB tethering and it says
tethering error There are no changes in the Network preferences on the Mac

Saw it wasn't loaded so I manually loaded it:

sudo kextload /System/Library/Extensions/HoRNDIS.kext

Tried to tether again and noticed these errors in kernel.log:

    
    
      Nov 14 19:05:28 Robs-MacBook-Pro kernel[0]: 0        1 AppleUSBCDCACMData: start - Find CDC driver for ACM data interface failed
      Nov 14 19:05:28 Robs-MacBook-Pro kernel[0]: 0        1 AppleUSBCDCECMData: start - Find CDC driver for ECM data interface failed

~~~
jwise0
Hmm! Yes, please post this as a GitHub issue. It seems like it might be
something phone-side, given that the phone says 'tethering error'...

Post it to GitHub and I'll take a look there.

Thanks!

~~~
rob-olmos
Here you are:

<https://github.com/jwise/HoRNDIS/issues/2>

Thanks!

------
shardling
Folk give Linux flack for it's driver problems, but I've noticed OSX does have
it's own issues. :)

I'll be looking forward to testing this out, since it'll be more convenient
than wireless tethering in some circumstances.

------
sandGorgon
There is an alternative if you have the android sdk running on your laptop.

Use adb to forward a port from your machine to your Android device. Run a
SOCKS proxy app on your Android.

<http://graha.ms/androidproxy/>

I use a similar method for transferring media, since mtp doesn't work very
well on Linux.

I wonder why did Google decide to implement mtp as the protocol of choice. I
know why MSC was not ideal anymore, but it _already_ has working tcp over usb.
That can be used to implement so many different things like file sync,
tethering, etc.

~~~
rogerbinns
> I wonder why did Google decide to implement mtp as the protocol of choice

They presumably had iTunes in mind as the competition, MTP is a "standard" and
many apps already implemented it. Of course it turned out to be 4 steps
forward and one step back.

~~~
sandGorgon
Actually iTunes uses tcp over usb[1] . Which is why this is so
counterintuitive - adb already does everything on tcp over usb, why didn't
they just use it for everything.

I hope it is not patent encumbered - I'm hoping at least Cyanogenmod can
implement it.

[1] rant warning -[http://sandeep.wordpress.com/2012/10/15/the-fastest-way-
to-t...](http://sandeep.wordpress.com/2012/10/15/the-fastest-way-to-transfer-
files-on-a-one-xs-or-samsung-s3-why-mtp-sucks-and-a-note-to-google-engineers/)

~~~
rogerbinns
Apologies for not being clear - I meant iTunes' functionality (sync
collections of media) not implementation. Presumably Google thought it would
be a neat shortcut using MTP since others would then write the media sync
functionality (eg Media Monkey, Double Twist).

It was a good short term choice, but a bad one for the long term. And there is
nothing stopping them adding a TCP based sync later.

You'll note however that they prefer you sync to the cloud and then Google
handles cloud to your device rather going direct from local machines to the
device. See Google Music etc.

Thanks for the rant!

------
meemo
On OS X 10.7.5 with a Nexus S running Android 4.1.2 I get the following in
kernel.log:

    
    
        11/15/12 9:55:40.019 AM com.apple.kextd: Can't load /System/Library/Extensions/HoRNDIS.kext - no code for running kernel's architecture. 
        11/15/12 9:55:40.022 AM com.apple.kextd: Load com.joshuawise.kexts.HoRNDIS failed; removing personalities from kernel.
    

Great project, btw. Can't wait to try it on another phone/computer and get it
working.

~~~
jwise0
That's pretty weird! Do you know if there's any reason why your machine would
be running a 32-bit kernel? I didn't think that was still supported on Lion...

~~~
meemo
It's a 2007 MacBook, with a Core 2 Duo processor. I had been under the
impression that it was running a 64-bit kernel. But it seems I was wrong. I
believe that since Lion most Macs boot with a 64-bit kernel. I guess this
model was left out.

------
mocko
Thank you from the bottom of my battery. I have wanted usb tethering to work
on my mac for a long time.

------
shadowmint
Cool project; I was kind of hoping when I saw the title it was a way to
emulate USB over MTP, and not have to use the _absolutely rubbish_ Android
File Transfer application... but alas, not the case. Oh well.

~~~
grantland
The frameworks that AFT uses are open source if anyone wanted to make a better
one :P

<https://android.googlesource.com/platform/external/libmtp/>

<https://android.googlesource.com/platform/external/libusb/>

[https://android.googlesource.com/platform/external/libusb-
co...](https://android.googlesource.com/platform/external/libusb-compat/)

~~~
drivebyacct2
You've given my life purpose. By that I mean, AFT is the worst application
I've used in my life, ever. It is that (un)reliable. And I need yet another
side project.

------
ZoFreX
Tangentially related - if anyone is using native wifi tethering on their
Android with their Mac and having issues, try tethering over Bluetooth instead
- I found it to be much more reliable.

------
raverbashing
I plug my android phone and it works as a USB modem. I can use it in OS X or
Linux (as /dev/ttyACMx). Am I missing something?

(My old Nokia used to do the same thing)

~~~
threedaymonk
You might be missing out on an easier way to do it. When I plug my Nexus S
into Ubuntu and enable tethering, Network Manager recognises a new Ethernet
device, acquires an IP address via DHCP, and I'm connected. I've never had to
configure anything on the computer.

~~~
raverbashing
Oh NM recognises the device but didn't work properly when I tested

I prefer using wvdial because it allows me to see what's happening and fix
something if needed

------
DanBC
This looks really good.

What would be awesome is some kind of reverse tethering - use my computer's
Internet from my phone connected to the computer over USB.

~~~
jwise0
I think some HTC phones can do that; I don't think it was very popular,
though.

It should be possible to do without rooting your phone; I think Koush was
discussing a similar proposition (tethering a phone to a tablet) using
Android's support for usermode VPN applications.

I've no use case for it, though, so you're on your own there :-) It would also
not be quite so "plug it in and it works" to set up, since you'd at least
manually need to set up NAT.

------
seanalltogether
Awesome, I've always wondered if having to set up a WAP on the device to route
traffic through caused more delays then a straight tether.

------
Nate75Sanders
Serious question...not trying to be snarky...

Why would anyone use anything but FoxFi?

<http://foxfi.com/>

EDIT: I suppose FoxFi doesn't work on some phones + using both radios at the
same time might run down the battery quicker.

~~~
dkulchenko
From personal experience, USB tethering is both faster (bandwidth-wise) and
uses considerably less battery than Wifi tethering.

