jwise / HoRNDIS

Android USB tethering driver for Mac OS X
Other
2.95k stars 328 forks source link

M1 support? #135

Open shlowe opened 3 years ago

mark-netalico commented 3 years ago

In my testing of M1 MacBook Air HoRNDIS does not support M1 Macs right now.

xianfei commented 3 years ago

I can build it for Apple M1, but I don't know how to sign it. 'Kext signature validation error code -67050'

mark-netalico commented 3 years ago

https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG19

caffeinum commented 3 years ago

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

noc2spam commented 3 years ago

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?

mark-netalico commented 3 years ago

Kind of crazy that Android USB connections rely on this open-source project. Google or Apple should have their own 1st part solution.

zinwalin commented 3 years ago

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.

chaealarm commented 3 years ago

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!

chaealarm commented 3 years ago

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.

caly8464 commented 3 years ago

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}

chaealarm commented 3 years ago

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.

dave-moriarti commented 3 years ago

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.

tvqt commented 3 years ago

@dave-moriarti the Korean website has a build that you can use- no need to build it yourself (I think)!

dave-moriarti commented 3 years ago

@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

tvqt commented 3 years ago

@dave-moriarti the process for me was:

  1. 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

  2. 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)

  3. 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

  1. 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))
  2. I booted to recovery again, ran csrutil disable and csrutil authenticated-root disable, rebooted
  3. 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 😅

dave-moriarti commented 3 years ago

@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!

tvqt commented 3 years ago

@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:

let me know if any of this helps!

dave-moriarti commented 3 years ago

@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:

  1. sudo chown -R root:whell /Library/Extensions/horndis.kext --> asks for password and gives no problem
  2. sudo chmod -R 755 /Library/Extensions/horndis.kext --> runs without saying a thing
  3. 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.

  1. su
  2. password
  3. 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.

dave-moriarti commented 3 years ago

***** 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!

tvqt commented 3 years ago

glad I could help 😊

qugu commented 3 years ago

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 🥇

dave-moriarti commented 3 years ago

I'm tethering trough a type-c to usb-a cable, with apple usb-a to usb-c adapter, and it works just fine

thpryrchn commented 3 years ago

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 commented 3 years ago

@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:

  1. 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

FawenYo commented 2 years ago

Is there any way to use this without disable csrutil? Cause that will make sideload app not openable...

tvqt commented 2 years ago

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)

tvqt commented 2 years ago

@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

clouedoc commented 2 years ago

Hello everyone,

I'm uploading my M1 binary so that other people don't have to install Xcode on their 256GB mac ;)

HoRNDIS-M1.zip

Installation steps

  1. 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 then csrutil enable --without kext 1.3. Restart mac to normal mode
  2. Run the .pkg that you'll find in the .zip I uploaded.
  3. Try tethering data with a nearby Android phone -- currently using my data plan ;)
haraldrudell commented 2 years ago

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 Unmounted /dev/disk3s3 ( ) System Integrity Protection is off. Restart the machine for the changes to take effect. csrutil enable --without kext csrutil: Requesting an unsupported configuration. This is likely to break in the future and leave your machine in an unknown state. …repeat… System Integrity Protection is on. Restart the machine for the changes to take effect.  — Restart

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 flags [] …

swarupbc commented 2 years ago

@jwise can you please look into this issue? we really need this project to support M1

jwise commented 2 years ago

@jwise can you please look into this issue? we really need this project to support M1

@swarup13 How much do you need it? Do you need it enough to, say, buy me an M1 Mac to build it on? My newest Mac is a 2012 MacBook Pro.

chaealarm commented 2 years ago

@jwise can you please look into this issue? we really need this project to support M1

@swarup13 How much do you need it? Do you need it enough to, say, buy me an M1 Mac to build it on? My newest Mac is a 2012 MacBook Pro.

You don't need to buy new mac. Just install latest version Xcode, and build for Universal(x64, arm64), and sign the kext.

jwise commented 2 years ago

Why would I distribute something I couldn't test? That would be irresponsible of me.

chaealarm commented 2 years ago

Why would I distribute something I couldn't test? That would be irresponsible of me.

Sorry about that, But your source code have tested to M1 mac(just rebuild to Universal), and it worked well. But, using unsigned kext, can't use some futures in macos(ex, installing ios apps) So we need signed kext(no need to modify source code)

swarupbc commented 2 years ago

Why would I distribute something I couldn't test? That would be irresponsible of me.

Please try it, as @chaealarm says it's working fine, and we are all here to test the build. So it will be well tested by users. Try to release a beta build for testing if possible

jwise commented 2 years ago

The Xcode on my Mac is very old because my Mac is still running Mojave; the last Xcode that runs on Mojave is Xcode 11.3. You need Xcode 12 to build for Apple Silicon. It's open source software, and you're free to build it and sign it yourself. I don't see why I should go upgrade my production Mac environment to do this, though.

To be honest, I am not sure what my incentive is here to spend time on this. I haven't touched HoRNDIS in over five years; countless large organizations -- most notably, DJI, but the Beagleboard folks too -- distribute my code with their commercial application (and, in fact, rely on my code for their product to work at all on Mac), and I have never seen a letter of thank you from them, let alone a product or a dollar bill: the only thing I see from them is complaints from their users when my code goes wrong. If you want to send me a Mac to get this working on, that would make this project actually interesting again. But, in the seven years since I initially relesed it, I haven't seen anyone "really need"ing it enough to feel that it's worth sponsoring.

swarupbc commented 2 years ago

@jwise I'm really sorry, no problem, you did enough. Thank you for everything you have done.

chaealarm commented 2 years ago

The Xcode on my Mac is very old because my Mac is still running Mojave; the last Xcode that runs on Mojave is Xcode 11.3. You need Xcode 12 to build for Apple Silicon. It's open source software, and you're free to build it and sign it yourself. I don't see why I should go upgrade my production Mac environment to do this, though.

To be honest, I am not sure what my incentive is here to spend time on this. I haven't touched HoRNDIS in over five years; countless large organizations -- most notably, DJI, but the Beagleboard folks too -- distribute my code with their commercial application (and, in fact, rely on my code for their product to work at all on Mac), and I have never seen a letter of thank you from them, let alone a product or a dollar bill: the only thing I see from them is complaints from their users when my code goes wrong. If you want to send me a Mac to get this working on, that would make this project actually interesting again. But, in the seven years since I initially relesed it, I haven't seen anyone "really need"ing it enough to feel that it's worth sponsoring.

Thank you for your service you did. 🙏 Okay, I will get the apple development account and get the kext signature permission as possible. And i will build and distribute this code for universal.

swarupbc commented 2 years ago

The Xcode on my Mac is very old because my Mac is still running Mojave; the last Xcode that runs on Mojave is Xcode 11.3. You need Xcode 12 to build for Apple Silicon. It's open source software, and you're free to build it and sign it yourself. I don't see why I should go upgrade my production Mac environment to do this, though. To be honest, I am not sure what my incentive is here to spend time on this. I haven't touched HoRNDIS in over five years; countless large organizations -- most notably, DJI, but the Beagleboard folks too -- distribute my code with their commercial application (and, in fact, rely on my code for their product to work at all on Mac), and I have never seen a letter of thank you from them, let alone a product or a dollar bill: the only thing I see from them is complaints from their users when my code goes wrong. If you want to send me a Mac to get this working on, that would make this project actually interesting again. But, in the seven years since I initially relesed it, I haven't seen anyone "really need"ing it enough to feel that it's worth sponsoring.

Thank you for your service you did. 🙏 Okay, I will get the apple development account and get the kext signature permission as possible. And i will build and distribute this code for universal.

Please, that will be very helpful

L1cardo commented 2 years ago

I have a developer account, somebody just tell me how to build it and sign it. I will do it.

chaealarm commented 2 years ago

I have a developer account, somebody just tell me how to build it and sign it. I will do it.

Do you have kext signable account? Sadly, I have developer but apple don't grant me to sign kext because I am personal developer.

L1cardo commented 2 years ago

I have a developer account, somebody just tell me how to build it and sign it. I will do it.

Do you have kext signable account?

Sadly, I have developer but apple don't grant me to sign kext because I am personal developer.

This is sad. Mine is personal developer account as well. I didn't know that personal developer can't sign kext. :(

chaealarm commented 2 years ago

I just built PCB Design that support ethernet tethering between Android-Apple Silicon Mac. (Not for RNDIS, Not tested yet) You could be use it without disabling SIP. https://github.com/chaealarm/DualUSBETH (Of course, can run iOS sideload apps.)

ono7 commented 2 years ago

Hello everyone,

I'm uploading my M1 binary so that other people don't have to install Xcode on their 256GB mac ;)

HoRNDIS-M1.zip

Installation steps

  1. 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 then csrutil enable --without kext 1.3. Restart mac to normal mode
  2. Run the .pkg that you'll find in the .zip I uploaded.
  3. Try tethering data with a nearby Android phone -- currently using my data plan ;)

thank you thank you thank you!

xros commented 2 years ago

Can anyone (verified developer) just sign the the build? I know it works but disabling kext protection totally on macos isn't secure.

HoRNDIS-kext.pkg.zip

Here's my build for m1 mac.

thpryrchn commented 2 years ago

I just built PCB Design that support ethernet tethering between Android-Apple Silicon Mac. (Not for RNDIS, Not tested yet) You could be use it without disabling SIP. https://github.com/chaealarm/DualUSBETH (Of course, can run iOS sideload apps.)

Awesome! It may be cheaper to just get 2 of these: https://www.amazon.com/Ethernet-Adapter-ABLEWE-Network-Compatible/dp/B0837QGZMY and put a Ethernet cable together, as that is basically what you did on the hardware level... But your setup also charges the phone at the same time right?

chaealarm commented 2 years ago

I just built PCB Design that support ethernet tethering between Android-Apple Silicon Mac. (Not for RNDIS, Not tested yet) You could be use it without disabling SIP. https://github.com/chaealarm/DualUSBETH (Of course, can run iOS sideload apps.)

Awesome! It may be cheaper to just get 2 of these: https://www.amazon.com/Ethernet-Adapter-ABLEWE-Network-Compatible/dp/B0837QGZMY and put a Ethernet cable together, as that is basically what you did on the hardware level... But your setup also charges the phone at the same time right?

That's right. Some phones are not be supported to charge.

Using cheap pcb manufacturer(like JLCPCB), might be cheaper than buying 2 of USB Ethernet adapter.

krystianmagdziarz commented 2 years ago

Hello everyone,

I'm uploading my M1 binary so that other people don't have to install Xcode on their 256GB mac ;)

HoRNDIS-M1.zip

Installation steps

  1. 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 then csrutil enable --without kext 1.3. Restart mac to normal mode
  2. Run the .pkg that you'll find in the .zip I uploaded.
  3. Try tethering data with a nearby Android phone -- currently using my data plan ;)

Epic. Thanks!

brunoaduarte commented 1 year ago

The Xcode on my Mac is very old because my Mac is still running Mojave; the last Xcode that runs on Mojave is Xcode 11.3. You need Xcode 12 to build for Apple Silicon. It's open source software, and you're free to build it and sign it yourself. I don't see why I should go upgrade my production Mac environment to do this, though.

To be honest, I am not sure what my incentive is here to spend time on this. I haven't touched HoRNDIS in over five years; countless large organizations -- most notably, DJI, but the Beagleboard folks too -- distribute my code with their commercial application (and, in fact, rely on my code for their product to work at all on Mac), and I have never seen a letter of thank you from them, let alone a product or a dollar bill: the only thing I see from them is complaints from their users when my code goes wrong. If you want to send me a Mac to get this working on, that would make this project actually interesting again. But, in the seven years since I initially relesed it, I haven't seen anyone "really need"ing it enough to feel that it's worth sponsoring.

Hi @jwise , why don't you enable "Sponsor this project" so everyone can donate/sponsor it? In a few days you will be gettin a new mac just from it.

dimmyv commented 1 year ago

Hello everyone,

I'm uploading my M1 binary so that other people don't have to install Xcode on their 256GB mac ;)

HoRNDIS-M1.zip

Installation steps

  1. 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 then csrutil enable --without kext 1.3. Restart mac to normal mode
  2. Run the .pkg that you'll find in the .zip I uploaded.
  3. Try tethering data with a nearby Android phone -- currently using my data plan ;)

Thank you for this.

For anyone who has purchased DJI FPV Goggles V2 and running M1 Mac with macOS Monterey.

This solution worked for me and managed to update my Goggles to the latest firmware. I confirm successful update as of 15 August 2022.

I ran this on the Mac not Windows, even after DJI Assistant download states its not working, it worked with this solution.

Thanks again.