Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10.11 #42

Closed
DiegoGiovany opened this issue Jun 19, 2015 · 470 comments
Closed

10.11 #42

DiegoGiovany opened this issue Jun 19, 2015 · 470 comments

Comments

@DiegoGiovany
Copy link

Not working on OSX El Capitain:

Jun 18 21:35:33 MBPRetiDeuschle kernel[0]: HoRNDIS: init: HoRNDIS tethering driver for Snow Leopard+, by Joshua Wise
Jun 18 21:35:33 MBPRetiDeuschle kernel[0]: 006028.794737 IOUSBHostHIDDevice@: IOUSBHostHIDDevice::start: unable to set device idle milliseconds
Jun 18 21:35:33 MBPRetiDeuschle kernel[0]: 006028.794750 IOUSBHostHIDDevice@: IOUSBHostHIDDevice::start: start has failed
Jun 18 21:35:33 MBPRetiDeuschle kernel[0]: 006028.797808 IOUSBHostHIDDevice@: IOUSBHostHIDDevice::start: unable to set device idle milliseconds
Jun 18 21:35:33 MBPRetiDeuschle kernel[0]: 006028.797820 IOUSBHostHIDDevice@: IOUSBHostHIDDevice::start: start has failed
Jun 18 21:35:33 MBPRetiDeuschle kernel[0]: IOHIDDevice::newUserClient failed to get a workloop

@jwise
Copy link
Owner

jwise commented Jun 19, 2015

Sorry to hear that. Unfortunately, I only have one Mac, and I cannot upgrade my 'production' machine to El Cap ... Yosemite broke my machine badly enough, and I don't want to run the risk of breaking it again with El Cap. So, until El Cap becomes final, I'm afraid I won't be able to provide much support for it. Sorry.

@DiegoGiovany
Copy link
Author

Thanks !!!!
You can install 10.11 on a usb drive, like I had done... I had the same issues with yosemite....
I can do some tests and traces if it helps.
Thanks again, you work is awesome!

@winsock
Copy link

winsock commented Jun 20, 2015

EDIT: As someone suggested that the link to the Rel 8. Pre 2 should closer to the top. Hopefully this is close enough for people to find:
#42 (comment)

Original Reply:
I'm willing to help on this, I am running 10.11 for updating some of my Apps. HoRNDIS also works if and only if you start tethering before the kext loads so right now my workflow is. Although I do not get any errors like @DiegoGiovany has in my kernel logs.

1. Start tethering
2. kextunload HoRNDIS.kext
3. kextload HoRNDIS.kext

@DiegoGiovany
Copy link
Author

Nice workaroud @winsock, just tried, and works !!!

@jwise
Copy link
Owner

jwise commented Jun 25, 2015

Is this any better in 10.11 b2?

@DiegoGiovany
Copy link
Author

Nops, still need the kext unload/load workaround... same erros on console...

@DiegoGiovany
Copy link
Author

Any news?

@jwise
Copy link
Owner

jwise commented Jul 24, 2015

Nope... Last time I installed an OS X beta on my laptop, it was version 10.10.0, and I got bitten by it :-) I'll probably hold off until 10.11.1 before I upgrade my production machine. Sorry.

@jwise
Copy link
Owner

jwise commented Aug 3, 2015

Another report with different logs:

kernel[0]: Couldn't alloc class "AppleUSBComposite"
kernel[0]: 006570.648877 SAMSUNG_Android@14100000: AppleUSBDevice::waitForInterfacesGated: timeout waiting for _interfacesMatched
kernel[0]: 006570.648909 SAMSUNG_Android@14100000: AppleUSBDevice::waitForInterfacesGated: timeout waiting for _interfacesMatched

@fuantaji
Copy link

fuantaji commented Aug 3, 2015

The kextunload/kextload workaround doesn't work for me.

On the side note I've tried compiling HoRNDIS with later SDK versions.
With 10.10 SDK I've hit a wall of invalid signature on kextload.
With 10.11 SDK HoRNDIS sources can't be compiled since IOKit/usb header structure seems to be different now or [more likely] it is missing some files.

@winsock
Copy link

winsock commented Aug 4, 2015

@fuantaji They rewrote the I/O code in 10.11 So the SDK is complete just well needs a ton of work to port. Almost all of the functions use deprecated methods/classes.

@LouisCAD
Copy link

Hi,
I should start learning iOS (so Swift and Obj-C) in less than 10 months. Right now, I'm an Android Developer, running El Capitan public beta on my Macbook. If I can help to make this work on next OS X, let me know. Note that I've little knowledge in C and C++ (in addition to Java, Android and web).

@N1Xua
Copy link

N1Xua commented Sep 11, 2015

Hi ,Winsock/Fuantaji,

Did apple not deliver a ( non-working) RNDIS solution in El Capitan.
our Device that connected as CDC-ECN (Ethernet) class device suddenly connects over RNDIS and does not show up as network interface, as if the network part never gets set up

I think that you are better off with a defect about that @ the developer.apple.com in this case.

@winsock
Copy link

winsock commented Sep 11, 2015

I can try to leave a bug report in radar about the oversight of a RNDIS driver. However, who knows when/if apple will actually follow through with that bug report.
Edit:
For some reason my Two Factor login isn't working ATM so I'll get around to submitting it when it's working again.

@winsock
Copy link

winsock commented Sep 22, 2015

@jwise I'm not too experienced with kernel extension development/debugging. I think I got most of the code ported to 10.11, however I get a KP... Since you know your codebase better than me I thought my port still could be of use to you.

https://github.com/winsock/HoRNDIS/tree/elcaptian

Regards,

Andrew Querol

@winsock
Copy link

winsock commented Sep 23, 2015

I narrowed down my current kp to getting the input and output data pipes. To continue any further I'll have to setup a slave computer running the debug kernel so I can use lldb and step though the code -.-
winsock@c3182ba

@jwise
Copy link
Owner

jwise commented Sep 24, 2015

Andrew -- thanks for your efforts! I unfortunately don't have a 10.11 machine (I probably won't update for a while, given my experience with 10.10).

It surprises me that so much changed incompatibly. I wonder if there's a smaller, compatible, change that can be made? It would suck to have to maintain two versions of the driver (one for <=10.10, and one for 10.11+); I've avoided that so far, having support all the way back to 10.6 through 10.10.

Is the crash inside the kernel, or inside the kext? (i.e., is the crash on that line related to a potentially null endpointDescriptor, or does it have to do with the actual copyPipe operation?)

@winsock
Copy link

winsock commented Sep 24, 2015

From what I read of you keep compiling with the older sdk it'll still work on El Captain as long as it also works in Yosemite. My guess is since they changed so much with 10.11 a bug that was probably hidden or a non issue for 10.10 and below now shows up since the implementation of the older api would've changed. The reason I had to port so much was due to only having the 10.11 sdk. However while porting I noticed and fixed quite a few bugs and questionable code that might fix it with the old sdk as well. @jwise what is the exact build environment you use at the moment? What osx sdk/etc. With any luck back porting some of my general fixes and cleanup might do the trick ;)

@winsock
Copy link

winsock commented Sep 24, 2015

For what it's worth my KP on my port attempt was inside the extension itself at the top of the backtrace. Most likely the page fault was caused by the descriptor being incorrect when I ported it to the new style. Causing the function to return an invalid or null pointer since it can't find any matches. Then I access the invalid pointer and attempt to copy who knows what to use as the pipe.

@winsock
Copy link

winsock commented Sep 26, 2015

HoRNDIS: init: HoRNDIS tethering driver for Mac OS X, by Joshua Wise
HoRNDIS: init: PTR: I am:
HoRNDIS: start: start
HoRNDIS: createWorkLoop: creating workloop
HoRNDIS: openInterfaces: PTR: fCommInterface:
HoRNDIS: message: kIOUSBMessagePortHasBeenResumed
HoRNDIS: stop: stop

Hmmm building with the 10.6 SDK now. Made some changes to code that I thought looked funny but still no dice. Also the weird part is that after stop is called HoRNDIS actually retains control of the USB pipe! Whatever port I used will be locked up till reboot -.- @jwise Any idea why these things are happening? With the early stop call and holding the pipe?

@saamish
Copy link

saamish commented Oct 1, 2015

@winsock do there possibility to compile horndis over the 10.11.1 because of changes in IOKit framework:

https://developer.apple.com/library/prerelease/mac/releasenotes/General/APIDiffsMacOSX10_11/Objective-C/Kernel.html

I was upgrading the latest xcode from the apple store but it did not give any help for the compile issues. el capitan contains buch of limited rules for root priviliges. am I right that horndis is needed to port from yosemite to el capitan until it works like a charm.

@rdjs
Copy link

rdjs commented Oct 1, 2015

@winsock 's workaround didn't fix for me, is it still valid?

@easye
Copy link

easye commented Oct 1, 2015

On 10/1/15 14:10, Russell wrote:

@winsock 's workaround didn't fix for me, is it still valid?

Using kextunload/kextload worked for me: I just upgraded to OX 10.11
when it became generally available today.

I had to unplug/replug the phone a couple times as well as specify a
full absolute path to the kext, but it eventually worked.

"No, this is not a disentanglement from, but a progressive /knotting-into/

@skylerbunny
Copy link

Another thing that 'made this work' that I just did myself, is a wipe of network preferences:

$ sudo rm -rf Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
$ sudo rm -rf /Library/Preferences/SystemConfiguration/preferences.plist

$ sudo reboot

It appears that it may only have worked for the first attempt after the reboot, to tether. On subsequent attempts it was not 'latching onto' the newly created device, nor creating a new one to work with it. This may be useful information, however.

@saamish
Copy link

saamish commented Oct 2, 2015

i have used command: kextunload -bundle and it seems to work but there is still something weird ongoing. .

are current issues direct relations baed on iokit framework changes? el capitan contains bunch of changes related to root privileges. @jwise what is your opinion do horndis needed to port for el capitan to get it work as charm because of changes in root rights. i know that "apple specific" (kernel??) extensions are loaded everytime when os x 10.11 is booted but how about 3rd party extensions? do there some of limited rules for 3rd party extension from el capitan onward?

@d235j
Copy link
Contributor

d235j commented Oct 2, 2015

@winsock you can set up two-machine debugging fairly easily using VMWare. I've done it before and I'm setting it up now to maybe do a little debugging here. http://ho.ax/posts/2012/02/debugging-the-mac-os-x-kernel-with-vmware-and-gdb/ has a decent though slightly dated walkthrough; http://ddeville.me/2015/08/kernel-debugging-with-lldb-and-vmware-fusion/ is much more up-to-date. (It's a bit tricky to turn off SIP in VMWare, but it's possible by adding bios.bootDelay = "5000" to the .vmx file, then selecting the disk rather than the partition in the boot manager while holding Cmd-R, then opening Terminal and running csrutil.)

@d235j
Copy link
Contributor

d235j commented Oct 2, 2015

@winsock you're getting a null pointer dereference at https://github.com/winsock/HoRNDIS/blob/elcaptian/HoRNDIS.cpp#L299 , with endpointDescriptor being null...

@d235j
Copy link
Contributor

d235j commented Oct 2, 2015

It might be worthwhile to look at https://github.com/RehabMan/OS-X-BrcmPatchRAM/blob/master/BrcmPatchRAM/USBHostDeviceShim.cpp for some guidance, or even perhaps use that shim directly (it is license-compatible with HoRNDIS).

@jwise
Copy link
Owner

jwise commented Oct 2, 2015

That might be useful. The thing that I find puzzling is that there are sporadic reports of the driver successfully loading, somehow! I wonder if it would be more productive to try to figure out what the conditions are under which the driver does successfully load, and then try to make those happen, rather than going down this dance of rewriting the driver to support an entirely new API?

@jwise
Copy link
Owner

jwise commented Sep 7, 2016

@HardSoftMac You have no idea how happy I would be if Apple stole my ideas.

@John-K
Copy link

John-K commented Sep 7, 2016

I’m unsure what you mean. Apple didn’t remove anything. A user above noted
that he thought Sierra added RNDIS support by default, I checked and found
this to not be the case.

On Wed, Sep 7, 2016 at 12:04 AM, HardSoftMac notifications@github.com
wrote:

@jadonk https://github.com/jadonk @John-K https://github.com/John-K,
that's definitely be disturbing news. I've not updated Sierra to the
current build. You think @jwise https://github.com/jwise is pressing
charges for stealing his ideas? Maybe that's why they removed the support
kext. Lol.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#42 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAYpVjZJ1cxiaWFcLglmGXn0wlHkjq9Gks5qnmITgaJpZM4FGzin
.

@HardSoftMac
Copy link

"Steal" without compensation, No.

@N1Xua
Copy link

N1Xua commented Sep 7, 2016

Did anyone algae notice issues with USB devices after the mac comes back
from sleep using sierra?

On 7 Sep 2016 09:08, "HardSoftMac" notifications@github.com wrote:

"Steal" without compensation, No.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#42 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ANksCcYu84ma1Ygy9lc5LCY2PrJOUjgKks5qnmLzgaJpZM4FGzin
.

@demonsked
Copy link

Thanks. rel8pre2 works fine with zte mf823 on my mb5.1 os x 10.11.6.

@szhu
Copy link

szhu commented Sep 15, 2016

Homebrew users wishing to install rel8pre2 can now do so with:

brew cask install szhu/personal/horndis-pre

Homebrew cask formula: horndis-pre.rb

@FabianFrank
Copy link

@szhu 's package works fine for me after a manual kextunload kextload cycle after plugging in the phone.

@ROM72
Copy link

ROM72 commented Sep 23, 2016

"
Working on Mac OS X 10.11.4 with these steps:

Download http://nyus.joshuawise.com/HoRNDIS-rel8pre2-dbg.pkg
In a terminal: sudo rm -rf /System/Library/Extensions/HoRNDIS.kext
Restart Mac.

Thanks!"

why this link is no longer valid ??

@aufa
Copy link

aufa commented Sep 25, 2016

Works like a charm on el-capitan using Stable Release
Just Load Kext , if still not detect just take it Reload

image

@ebretteville
Copy link

Working nice macos el capitan, xiaomi mi max! Thanks for the great work.
Don't know if I have to update to sierra...

On Sun, Sep 25, 2016 at 7:57 AM, NAWA notifications@github.com wrote:

Works like a charm on el-capitan using Stable Release
Just Load Kext , if still not detect just take it Reload

[image: image]
https://cloud.githubusercontent.com/assets/6134472/18813281/39b98da4-831f-11e6-8767-f204e76ac522.png


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#42 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADhCuwmxOennkz6e-Irr6CTXSZ2DZ8q0ks5qtg0xgaJpZM4FGzin
.

@ROM72
Copy link

ROM72 commented Sep 25, 2016

But where did you guys download it since it's no more available on joshuawise website ?
I can't get it from brew cask either, my terminal says "cask unknown command" and I can't install cask either (I tried and search about this cask problem and nothings works for me ).

thanks,

@giuliomoro
Copy link

@ROM72 this url is still active http://nyus.joshuawise.com/HoRNDIS-rel8pre2-dbg.pkg

@giuliomoro
Copy link

@ebretteville it has been reported that Sierra does not need jwise's HoRNDIS drivers. Maybe Apple rolled their own, at last?

@HardSoftMac
Copy link

Actually, I just discovered that my BlackBerry Z30 on El Capitan (10.11.5+) doesn't require HoRNDIS anymore. In case you're baffled, I erased the Hard Drive partition before I did clean install. Someone should confirm this, please.

@ebretteville
Copy link

@giuliomoro thx. After checking all my apps compatibility to sierra, i'll move.

@ROM72
Copy link

ROM72 commented Sep 25, 2016

thank you giuliomoro, that's weird, I couldn't go to this link a few days ago...

@mehmetaydogduu
Copy link

Pre 2 not effecting on 10.11.5

@HardSoftMac
Copy link

@likelazyeyes, you mean you were able to tether natively without HoRNDIS on 10.11.5?

@ghost
Copy link

ghost commented Oct 5, 2016

@liuyunglin, thanks alot. tested it even work on macOS 10.12
screen shot 2016-10-06 at 12 42 54 am

@soloincc
Copy link

HoRNDIS, Nexus 5 and El Capitan working
screen shot 2016-10-11 at 6 02 25 am

@jafd
Copy link

jafd commented Oct 11, 2016

rel8pre2 works with macOS Sierra. At least, initially; didn't try to run it for a long while.

It's not true that macOS Sierra supports RNDIS out of the box. I have tried tethering to a pristine installation, and failed.

@jwise jwise closed this as completed in 920d799 Oct 16, 2016
@jwise
Copy link
Owner

jwise commented Oct 16, 2016

Okay, the people have spoken! rel8pre2 shall be called rel8.

And wouldn't you know it, Apple are hosing us again: in order to build with an old SDK version, you have to go hack the MacOSX.Platform plist, as per https://forums.developer.apple.com/thread/43381 . Developing for OS X really is an adversarial process.

The build seems to work (sample size: n = 1; Mac OS X 10.11.6 + Nexus 5x running Android N). So I'll call what I have built here 'rel8', and that shall be that. Any remaining issues, then, shall go in a new bug!

Thanks all.

@jwise
Copy link
Owner

jwise commented Oct 16, 2016

OH, AND: If you're interested in taking over maintainership for HoRNDIS, I'm looking for someone to step up! Please have a look at issue #58 for that.

@giuliomoro
Copy link

Just to say that today I could not manage to connect to a BeagleBone Black running Debian on a fresh install of Sierra. I had to install horndis (used rel8pre2) and it worked straight away.

@sarim
Copy link

sarim commented Jun 4, 2017

I have to use kextunload/kextload workaround every time i plug in my phone. So made a quick tool to automate that https://github.com/sarim/HoRNDIS-Reloader

@ghost
Copy link

ghost commented Jun 6, 2017

Have same issue under 10.12.5. After disabling DeleteUnused_400000(unloading unused kexts) in Clover bootloader tethering and DHCP works perfect without any solutions(needed only one kext thats have lager size).

@mribichich
Copy link

I can confirm that it works on Sierra 10.12.6

Steps:

@MACJFT
Copy link

MACJFT commented Oct 9, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests