HoRNDIS
HoRNDIS copied to clipboard
M1 support?
In my testing of M1 MacBook Air HoRNDIS does not support M1 Macs right now.
I can build it for Apple M1, but I don't know how to sign it. 'Kext signature validation error code -67050'
https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG19
DJI Assistant software depends on this kext, so even though I don't need Android tethering per se, I can't use the software to access files from my drone. Will love to see a fix, too
I don't think it's working in M1, not atleast in my Mac Mini M1. I get "Incompatible architecture: Binary is for x86_64, but needed arch arm64e". Did somebody manage to install a version on the new mac mini?
Kind of crazy that Android USB connections rely on this open-source project. Google or Apple should have their own 1st part solution.
same issue here. I can compile from Xcode, but failed to load it because of signing errors.
➜ horndis git:(master) ✗ brew install --cask horndis
Updating Homebrew... ==> Caveats horndis requires a kernel extension to work. If the installation fails, retry after you enable it in: System Preferences → Security & Privacy → General
For more information, refer to vendor documentation or this Apple Technical Note: https://developer.apple.com/library/content/technotes/tn2459/_index.html
Error: macOS El Capitan, Sierra, High Sierra or Mojave is required for this software.
I succeed without kext signing on M1
( For Korean, check this page below ) https://itap.tistory.com/2
Open terminal in recovery mode, type csrutil enable --without kext
after, reboot
build kext, paste to Library/Extensions and repair permission and install(open terminal and type)
sudo chown -R root:wheel /Library/Extensions/horndis.kext
sudo chmod -R 755 /Library/Extensions/horndis.kext
sudo kextload -t /Library/Extensions/horndis.kext
after, open settings-security, and install button will be added. Install it and reboot
Done!
I succeed without kext signing on M1
( For Korean, check this page below ) https://itap.tistory.com/2
Open terminal in recovery mode, type csrutil enable --without kext
after, reboot
build kext, paste to Library/Extensions and repair permission and install(open terminal and type) sudo chown -R root:wheel /Library/Extensions/horndis.kext sudo chmod -R 755 /Library/Extensions/horndis.kext sudo kextload -t /Library/Extensions/horndis.kext
after, open settings-security, and install button will be added. Install it and reboot
Done!
Somebody Have an KEXT sign-able Apple developer account? HoRNDIS have to be rebuilt(for Universal or arm64) and signed.
When I try to do kextload -t ..... it appears the next text.
Executing: /usr/bin/kmutil load -p /Library/Extensions/horndis.kext Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e}
When I try to do kextload -t ..... it appears the next text.
Executing: /usr/bin/kmutil load -p /Library/Extensions/horndis.kext Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e}
You should build that code for Universal(x64, arm64e) in Xcode.
I succeed without kext signing on M1
( For Korean, check this page below ) https://itap.tistory.com/2
Open terminal in recovery mode, type csrutil enable --without kext
after, reboot
build kext, paste to Library/Extensions and repair permission and install(open terminal and type) sudo chown -R root:wheel /Library/Extensions/horndis.kext sudo chmod -R 755 /Library/Extensions/horndis.kext sudo kextload -t /Library/Extensions/horndis.kext
after, open settings-security, and install button will be added. Install it and reboot
Done!
Hello there, thanks for your instructions, are they working fine for you? I'm a total noob when it comes to programming, but i really need HoRNDIS to work on my M1 MacBook.
I tried to follow your step again and again but I couldn't get it done (I'm struggling with the cloning and building passages, in particular) Could you be so kind to write something more of a step-by-step guide for us poor beginners ? You'd save my day and I'm sure it would be useful to many others as well!
I'm sorry if this post it's inappropriate, it's my first one here on GitHub.
@dave-moriarti the Korean website has a build that you can use- no need to build it yourself (I think)!
@tvqt Thank you for your response! Already tried to, but failed. Can't understand what i'm doing wrong, i followed the steps in the Korean site but i'm probably missing something
@dave-moriarti the process for me was:
-
downloading the file from the Korean site (https://blog.kakaocdn.net/dn/nRMG3/btqZkqGNzgR/U1XLxka8DvDA5zgx4X1yY0/HoRNDIS.kext.zip?attach=1&knm=tfile.zip), unzipping it, and pasting the HoRNDIS.kext file it into the ~/Library/Extensions folder
-
booting into recovery, opening terminal, and running the lines the Korean site tells you to do (this threw an error for me, and after restarting the computer, my Mac wouldn't boot, but eventually, after booting back into Recovery, and disabling authenticated -root and csrutil, the Mac was working again, after I restarted it)
-
Back on MacOS, I ran the three terminal lines from @chaealarm 's comment:
sudo chown -R root:wheel /Library/Extensions/horndis.kext sudo chmod -R 755 /Library/Extensions/horndis.kext sudo kextload -t /Library/Extensions/horndis.kext
it came up with a pop-up, saying I needed to changed the security settings in recovery to run the extension, so 4. I restarted to recovery, changed the settings in the startup security utility to Reduced Security, and checked both the boxes underneath, and restarted the Mac (only for it to not boot to MacOS again (lol)) 5. I booted to recovery again, ran csrutil disable and csrutil authenticated-root disable, rebooted 6. ran the three terminal lines again, and this time, it just said I needed to restart the computer to use them. I restarted, and then it worked!
It was a bit of an ordeal 😅
@tvqt Thank you for being so helpful!
I did everything as described, When I enter the line:
sudo kextload -t /Library/Extensions/horndis.kext
I get no pop-up but this message from terminal:
Notice: -print-diagnostics (-t) ignored; use kextutil(8) to test kexts. Executing: /usr/bin/kmutil load -p /Library/Extensions/horndis.kext Error Domain=KMErrorDomain Code=71 "Loading extension failed: Unable to create extension from bundle: codeless (missing CFBundlePackageType) bundle (nil) at /Library/Extensions/horndis.kext" UserInfo={NSLocalizedDescription=Loading extension failed: Unable to create extension from bundle: codeless (missing CFBundlePackageType) bundle (nil) at /Library/Extensions/horndis.kext}
And this is the point where I get stucked... Any idea? We were so close!
@dave-moriarti I had a bit of a search around the internet, and the error code seems to indicate that kmutil cannot find a part of the kext, the plist file. A few things I would try, to troubleshoot it:
- running kextutil, to see if the kext file has any issues/wasn't a bad download
- check csrutil status and csrutil authenticated-root status - both return disabled for me, (so probably should return disabled for you too)
- downloading the kext again from the Korean site- the file should have a little cube-like icon in Finder- copying it to /Library/Extensions (I misspoke before, it's not ~/Library/Extensions, but /Library/Extensions) running the three lines listed before, and seeing if that returns anything
let me know if any of this helps!
@tvqt (and @chaealarm) I downloaded the kext from korean site again and checked everything from scratch.
authenticate-root was enabled and so was Safe Startup option. I followed your steps and I tried everything again with this configuration:
a. I'm running MacOS with Reduced Security option flagged from Startup Security Utility (underneath boxes both checked) b. csrutil status --> returns disabled c. csrutil authenticated-root status --> returns disabled
When i run the three command lines:
- sudo chown -R root:whell /Library/Extensions/horndis.kext --> asks for password and gives no problem
- sudo chmod -R 755 /Library/Extensions/horndis.kext --> runs without saying a thing
- sudo kextload -t /Library/Extensions/horndis.kext --> gives this message
Notice: -print-diagnostics (-t) ignored; use kextutil(8) to test kexts. Executing: /usr/bin/kmutil load -p /Library/Extensions/horndis.kext Error Domain=KMErrorDomain Code=71 "Loading extension failed: Unable to create extension from bundle: codeless (missing CFBundlePackageType) bundle (nil) at /Library/Extensions/horndis.kext" UserInfo={NSLocalizedDescription=Loading extension failed: Unable to create extension from bundle: codeless (missing CFBundlePackageType) bundle (nil) at /Library/Extensions/horndis.kext}
At this point I ran kextutil as suggested:
4.kextutil /Library/Extensions/horndis.kext --> You must be running as root to load kexts or send personalities into the kernel. 5. su 6. password 7. kextutil /Library/Extensions/horndis.kext ---> gives same error as 3)
Executing: /usr/bin/kmutil load --bundle-path /Library/Extensions/horndis.kext Error Domain=KMErrorDomain Code=71 "Loading extension failed: Unable to create extension from bundle: codeless (missing CFBundlePackageType) bundle (nil) at /Library/Extensions/horndis.kext" UserInfo={NSLocalizedDescription=Loading extension failed: Unable to create extension from bundle: codeless (missing CFBundlePackageType) bundle (nil) at /Library/Extensions/horndis.kext}
I also noted that other users up in this thread had same error code
Error Domain=KMErrorDomain Code=71
but different specification:
Incompatible architecture: Binary is for x86_64, but needed arch arm64e" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for x86_64, but needed arch arm64e}
At this point is it possible that the korean file isn't working properly? It's like the kext file is missing some part I guess.
********* Update: SOLVED (in the most stupid and nonsense way). But I'm not sure of what i've actually done.
Having excluded every other problem I insisted with working on the korean kext.
I tried unzipping it multiple times with different programs but the problem was still there, until I accidentally unzipped the archive in a folder were there was already the extracted kext file .
MacOS default unzipper found that there was already a file with that name in the folder, and renamed it "horndis.kext 2". Adding the 2 to the extension made the finder not recognising it as a .kext and instead showed it as a folder .
Opening the folder, there was the .plist file that @tvqt mentioned and that was missing, causing the Error 71 when trying to load the kext from terminal.
I copied the entire folder in /Library/Extensions and renamed it "HoRNDIS.kext", system asked to conferm extension change. It now appeared as a brick again. And it was infact identical to the previous kext. But when I hopelessly tried to run the 3 command lines again, it installed successfully!
I don't know exactly what happened. Maybe changing the file extension kinda forced a sort of extension's internal indexing and allowed the extension to find the .plist, but I am just guessing.
I'm writing everything here so that noobs like me struggling with the installation know what worked for me.
Thanks everyone, now my Macbook M1 can browse the internet via Android USB Tethering! This may also be useful connecting to DJI's drone interface in a M1 Mac.
P.S. It's surprising that Apple didn't take care of a feature so easy for them to add. Thank god the internet community exist!
glad I could help 😊
Hi, another M1 user here. Can indeed confirm that the kext from the Korean site works, but this installation required some back and forth with restarting and calling kextload
a few times. The final time it worked, the Security Preferences window had a pop-up showing something like 'Reindexing / reloading extensions...' and after a followed reboot it worked. As a side note, only a native type-c to type-c cabel worked when connecting the phone to the computer.
Saved me from high-latency death with bluetooth tethering 🥇
I'm tethering trough a type-c to usb-a cable, with apple usb-a to usb-c adapter, and it works just fine
For those of you who want to get this up and running for Big Sur, I have crudely modified the MakeFile and xcode project to make a pkg file that will work on M1 and most likely Intel Big Sur (I haven't tested Intel).
First step is to allow unsigned kext's to be loaded on your M1 Mac. to do that with a Macbook, power on the laptop holding the power button until it loads the options window. Should show your SSD, and a Options that has a setup icon on it. Select that. Then it will most likely have you select a user. Select one, and enter the password. This is so it unlocks the Drive. Then in the menu bar after that, under Utilities, select Terminal. then type in csrutil enable --without kext
, and press enter, Then it will ask you to confirm that is what you want to do, and even say it is a unsupported config. confirm it. then reboot your mac.
After that, clone this from my repo. git clone https://github.com/thpryrchn/HoRNDIS.git -b BigSur
, then cd HoRNDIS
, then run the make
command. IF that doesn't work, make sure you have XCode installed.. Then in your build/pkg folder, you will see "HoRNDIS-kext.pkg". Install that, then enable it in System Prefrences, Security & Preferences. Then it will have you reboot to make it take effect.
To see if it worked, open a terminal, and run kextstat | grep HoRNDIS
You will see something like
233 0 0xfffffe0006e34000 0x4000 0x4000 com.joshuawise.kexts.HoRNDIS (9.2) 20873943-086F-3B6D-B5F9-9013D28DCE38 <52 41 7 5 4 3 1>
After doing this, my DJI Assistant 2 For Mavic works with my Air 2 now :)
@tvqt Would you tell me the command lines of the Korean site , because I don't find it. Thanks.
the link from the @chaealarm's comment:
- In recovery mode, open the upper utility-terminal and enter the command below:
csrutil disable
(Enter password)
csrutil enable --without kext
(Enter password)
link is here: https://itap.tistory.com/2
Is there any way to use this without disable csrutil? Cause that will make sideload app not openable...
Is there any way to use this without disable csrutil? Cause that will make sideload app not openable...
There doesn't appear to be good documentation online about this- you can try experimenting with using things like csrutil enable --without kext, and seeing if they work- anecdotally, it seems like any non-default SIP configuration (i.e. disabling it, or disabling certain parts of it) would appear to make MacOS block sideloading (but you're welcome to try- no guarantees of anything)
@dave-moriarti I meet this problem. Would you know how to solve it? Executing: /usr/bin/kmutil load --bundle-path /Library/Extensions/horndis.kext Error Domain=KMErrorDomain Code=71 "Incompatible architecture: Binary is for arm64e, but needed arch x86_64 Unsupported Error: one or more extensions are unsupported to load Kext com.joshuawise.kexts.HoRNDIS v9.2 in executable kext bundle com.joshuawise.kexts.HoRNDIS at /Library/Extensions/HoRNDIS.kext" UserInfo={NSLocalizedDescription=Incompatible architecture: Binary is for arm64e, but needed arch x86_64 Unsupported Error: one or more extensions are unsupported to load Kext com.joshuawise.kexts.HoRNDIS v9.2 in executable kext bundle com.joshuawise.kexts.HoRNDIS at /Library/Extensions/HoRNDIS.kext}
do you have an M1 Mac? "Binary is for arm64e, but needed arch x86_64" seems to indicate you have an x86-based CPU
Hello everyone,
I'm uploading my M1 binary so that other people don't have to install Xcode on their 256GB mac ;)
Installation steps
- Disable SIP for kernel extensions
1.1. Restart your Mac in recovery mode by powering it off then restarting with a long press on the power button
1.2. Execute
csrutil disable
thencsrutil enable --without kext
1.3. Restart mac to normal mode - Run the .pkg that you'll find in the .zip I uploaded.
- Try tethering data with a nearby Android phone -- currently using my data plan ;)
Here’s how you get HoRNDIS operations on: — MacBook Pro (13-inch, M1, 2020) MacBookPro17,1 — macOS 11.6 20G165
turn off: — Shut Down…
Boot into recovery by pressing power button for more than 9 seconds
— Select large Options icon on right, click Continue
macOS menu bar — Utilities — Startup Security Utility
— select Installation, click Security Policy…
— Select Reduced Security
— check Allow user management of kernel extensions from identified developers, click OK
pop-up: username, password, click OK
macOS menu bar — Startup Disk — Quit Startup Disk
macOS menu bar — Utilities — Terminal
csrutil disable
Turning off System Integrity Protection requires modifying system security.
Allow booting unsigned operating system and any kernel extensions for OS "c65"? [y/n]: y
Authorized user: [user]
Password: [password]
Mounted /dev/disk3s3 at
download the Korean patch: https://blog.kakaocdn.net/dn/nRMG3/btqZkqGNzgR/U1XLxka8DvDA5zgx4X1yY0/HoRNDIS.kext.zip?attach=1&knm=tfile.zip click the downloaded zip in browser status bar or Finder to extract it — a directory HoRNDIS.kext is created in Terminal as root: mv -nv ~[user]/Downloads/HoRNDIS.kext /Library/Extensions chown -R root:wheel /Library/Extensions/HoRNDIS.kext
kmutil load --bundle-path /Library/Extensions/HoRNDIS.kext Error Domain=KMErrorDomain Code=27 "Extension with identifiers com.joshuawise.kexts.HoRNDIS not approved to load. Please approve using System Preferences." UserInfo={NSLocalizedDescription=Extension with identifiers com.joshuawise.kexts.HoRNDIS not approved to load. Please approve using System Preferences.} popup: System Extension Updated A program has updated system extension(s) signed by “Unidentified - HoRNDIS”. To finish the update, you must approve it in the Security & Privacy System Preferences buttons: OK, Open Security Preferences — click Open Security Preferences — click lock, Touch ID System software from developer “Unidentified - HoRNDIS” has been updated — click Allow pop-up: “System Preferences” is trying to authenticate user — Password, click OK pop-up: A restart is required before new system extensions can be used. — Click Restart
test HoRNDIS: — System Preferences… — Network Plug in favorite Android via usb — Enable usb tethering on Android similar to: Settings — Network & internet — Hotspot & tethering — USB tethering In Network dialog left pane, a service named from the Android phone should appear with green dot note: 30% of the time, HoRNDIS fails: disable and enable tethering on Android
status in Terminal as root:
date && hostname && sw_vers && kmutil dumpstate | grep --invert-match com.apple
Tue Oct 12 12:49:21 PDT 2021
…
ProductName: macOS
ProductVersion: 11.6
BuildVersion: 20G165
== Extensions by identifier:
com.joshuawise.kexts.HoRNDIS v9.2 (D3E1C37C-ACC3-3007-928C-A2473EC82401) in executable kext bundle com.joshuawise.kexts.HoRNDIS at /Library/Extensions/HoRNDIS.kext signed @none (91934400ef30c667dd24c585e73ee7e24bbc4259) flags [0, 1, 4, 8, 9, 14]
== Loaded auxiliary extensions:
com.joshuawise.kexts.HoRNDIS v9.2 (D3E1C37C-ACC3-3007-928C-A2473EC82401) in loaded auxiliary kext collection signed
@jwise can you please look into this issue? we really need this project to support M1