jwise / HoRNDIS

Android USB tethering driver for Mac OS X
Other
2.96k stars 327 forks source link

32-bit build needed for Macs running a 32-bit kernel by default #3

Closed nfriedly closed 11 years ago

nfriedly commented 11 years ago

was: Mac OS X 10.6.8 Install issues - "no code for running kernel's architecture"

Hi, I downloaded the HoRNDIS-rel1.pkg installer and ran it, and it appeared to work, but my Mac didn't detect my phone when I plugged it in, even after rebooting. I fired up console.app and searched for "horndis" and found this:

11/16/12 2:42:42 PM Installer[69496]    HoRNDIS  Installation Log
11/16/12 2:42:42 PM Installer[69496]    Opened from: /Volumes/Old Macintosh HD/downloads/HoRNDIS-rel1.pkg
11/16/12 2:42:56 PM Installer[69496]        Install: "HoRNDIS"
11/16/12 2:42:56 PM Installer[69496]        Install: "HoRNDIS Kernel Extension"
11/16/12 2:43:08 PM com.apple.kextd[17] Can't load /System/Library/Extensions/HoRNDIS.kext - no code for running kernel's architecture.
11/16/12 2:43:08 PM com.apple.kextd[17] Failed to load /System/Library/Extensions/HoRNDIS.kext - (libkern/kext) requested architecture/executable not found.
11/16/12 2:43:08 PM installd[69532] Installed "HoRNDIS" ()
11/16/12 2:47:53 PM com.apple.kextd[17] Can't load /System/Library/Extensions/HoRNDIS.kext - no code for running kernel's architecture.
11/16/12 2:47:53 PM com.apple.kextd[17] Failed to load /System/Library/Extensions/HoRNDIS.kext - (libkern/kext) requested architecture/executable not found.
11/16/12 2:47:53 PM com.apple.kextd[17] Load com.joshuawise.kexts.HoRNDIS failed; removing personalities.

I plugged in the phone at the last step of the install when it had instructions up, so I re-ran the installer with the phone disconnected the entire time and got this:

11/16/12 2:58:01 PM Installer[1751] HoRNDIS  Installation Log
11/16/12 2:58:01 PM Installer[1751] Opened from: /Volumes/Old Macintosh HD/downloads/HoRNDIS-rel1.pkg
11/16/12 2:58:11 PM com.apple.kextcache[689]    /System/Library/Extensions/HoRNDIS.kext doesn't support architecture i386; omitting from prelinked kernel.
11/16/12 2:58:13 PM Installer[1751]     Upgrade: "HoRNDIS"
11/16/12 2:58:13 PM Installer[1751]     Upgrade: "HoRNDIS Kernel Extension"
11/16/12 2:58:24 PM com.apple.kextd[17] Can't load /System/Library/Extensions/HoRNDIS.kext - no code for running kernel's architecture.
11/16/12 2:58:24 PM com.apple.kextd[17] Failed to load /System/Library/Extensions/HoRNDIS.kext - (libkern/kext) requested architecture/executable not found.
11/16/12 2:58:24 PM installd[1782]  Installed "HoRNDIS" ()

I don't think there's anything really special about my mac - it's a 2010 model with an i7 - it should run i386 code just fine. So I'm not sure what to make of that error.

The phone is a rooted Samsung Galaxy S III running Clean Rom (basically stock but without all the trials and Verizon crap). It has a USB Tethering checkbox in the menu and it puts a "USB Tethering, Tap to configure" line in the Ongoing section of my top pull-down menu.

Any ideas?

jwise commented 11 years ago

Ok. Looks like most mid-2010 Macs use a 32-bit kernel by default in Lion. As a temporary workaround, you can boot the system while holding the '6' and '4' keys; I'll investigate building for a 32-bit kernel, too, but I'm gone this weekend, so it probably won't be until Monday.

nfriedly commented 11 years ago

Aha, that makes sense. Thanks.

jwise commented 11 years ago

Can you try this package? If that works, I'll call that a release.

nfriedly commented 11 years ago

Well, the errors were different this time:

11/19/12 1:17:10 PM Installer[55616]    HoRNDIS  Installation Log
11/19/12 1:17:10 PM Installer[55616]    Opened from: /Volumes/Old Macintosh HD/downloads/HoRNDIS-32bit-test.pkg
11/19/12 1:17:21 PM Installer[55616]        Upgrade: "HoRNDIS"
11/19/12 1:17:21 PM Installer[55616]        Upgrade: "HoRNDIS Kernel Extension"
11/19/12 1:17:33 PM com.apple.kextd[17] Failed to load /System/Library/Extensions/HoRNDIS.kext - (libkern/kext) link error.
11/19/12 1:17:33 PM installd[55645] Installed "HoRNDIS" ()
11/19/12 1:17:33 PM kernel  kxld[com.joshuawise.kexts.HoRNDIS]: The Mach-O file is malformed: Invalid segment type in MH_OBJECT kext: 38.
11/19/12 1:17:33 PM kernel  Can't load kext com.joshuawise.kexts.HoRNDIS - link failed.
11/19/12 1:17:33 PM kernel  Failed to load executable for kext com.joshuawise.kexts.HoRNDIS.
11/19/12 1:17:33 PM kernel  Kext com.joshuawise.kexts.HoRNDIS failed to load (0xdc008016).
11/19/12 1:17:33 PM kernel  Failed to load kext com.joshuawise.kexts.HoRNDIS (error 0xdc008016).
jwise commented 11 years ago

Sigh. I ran into this before on Snow Leopard, but I forgot how I solved it. I'll do some digging tomorrow.

jwise commented 11 years ago

Looks like I did manage to solve it on x86_64, but not on i386; it appears to be a known issue. Someone filed a rdar for it, but it is probably pretty low priority for Apple. I'll keep searching for a workaround, but I fear that the only solution I really have available for you is to boot into 64-bit mode.

nfriedly commented 11 years ago

Hum.. I apparently have a way-old version of xcode - Version 3.2.6 (1761) - maybe I'll try and figure out how to build it. You should probably just change the min requirements to be 64-bit OSX and put up a note about the "reboot holding 64" thing, though.

Thanks for figuring it out though.

jwise commented 11 years ago

Okay, I have finally figured out how to programmatically detect whether the kernel is 32-bit or 64-bit on OS X. I'll add a check in the installer.

billatq commented 11 years ago

Apple claims to have fixed this issue in the new Xcode preview, per http://www.openradar.me/12353507. I'd verify this myself, but I can't, since I'm on a slow tethered connection at the moment: https://developer.apple.com/xcode/

jwise commented 11 years ago

Reopened pending an actual release. I can't download it, since I am not either an iOS or Mac developer program member, but presumably 4.6 final will exist sooner or later...

frickinspam commented 11 years ago

I, for one, would GREATLY appreciate a 32-bit release, as I'm using a 6 yr old black macbook -- which was manufactured before 64-bit tech macs came into being. It's running Snow Leopard just fine, but since my cellphone's wifi hardware is both newer and faster and its ability to pick up wifi signal from afar is better, being able to grab wifi with my cell and pass it to my laptop via USB would be a very useful option to have right now, to keep my Verizon bill affordable.

I'd be glad to provide testing help, just let me know.

jwise commented 11 years ago

@frickinspam and @nfriedly, I have a package built using the new Xcode preview. Can you try out:

http://nyus.joshuawise.com/HoRNDIS-32bit-test.pkg

If that works, I'll call it a real release.

billatq commented 11 years ago

Works for me: http://www.speedtest.net/result/2401001347.png

(I'm on a 13-inch Late 2006 Macbook with a 32-bit kernel with 10.7.5)

jwise commented 11 years ago

Wow that was fast. You are awesome; thanks. Now to figure out where I'm going to put this now that GitHub's downloads page isn't a thing anymore.

frickinspam commented 11 years ago

I saw it at about the same time billatq did, but my results weren't so good:

Still no option to tether via USB on my mac's system preferences -> network. So, unsuccessful here.

How'd billatq get it to produce USB tethering option on the mac?

jwise commented 11 years ago

Can you confirm that the USB tether config box is checked on the phone side, as well?

frickinspam commented 11 years ago

On the HTC Droid Incredible 4G LTE (verizon), the option is called, "Internet Connection Mode" -- and it's enabled, yes.

jwise commented 11 years ago

Ok, if you can open a new bug for this one, that'd be great. Can you follow the steps in #2 (with USB prober) to get a USB descriptor dump?

One of these days, I will write a 'HoRNDIS diagnostic' tool that will do this automatically, but until now, we'll have to do it the hard way :-)

frickinspam commented 11 years ago

Oh, THANK YOU: an option to do something the hard way ;) laugh Just what I needed.

Got any chocolate ice cream? --I feel a need to boost my blood-chocolate levels.

frickinspam commented 11 years ago

Umm... I think I may have found the problem. While I was looking for where the .zip put the prober tool (gee, that sounds just slightly dirty ;) ), I found an unexpectedly-mounted (okay, enough mental goofiness) "cdrom" containing a bunch of .exe's.

Is that, by chance, what your package (god, just shoot me; obviously I really NEED chocolate tonight ;) ) created? -- FYI: I don't do windoze (:

--Meri

jwise commented 11 years ago

No, that is probably the virtual CD full of drivers that the phone created.

Let's move this to a new bug so that the other folks don't catch so much e-mail?

joshua

frickinspam commented 11 years ago

Just give me a url to follow :)

Btw, the prober tool won't run on this mac (sorry, it gave me a very *nix-y error message; I'm assuming it wants a 64-bit machine -- and this ain't one).

What do we do next?

...I'm still up for ice cream. With cookies, if this gets any more difficult ;)

jwise commented 11 years ago

https://github.com/jwise/HoRNDIS/issues/new

nfriedly commented 11 years ago

Sorry I was so slow to respond, but I just tried out http://joshuawise.com/downloads/HoRNDIS-rel3.pkg and it works perfectly now - I'm posting this over my phone's network connection via the built-in USB tethering. Thanks!