跳到正文

正在自动登录…

← 返回项目列表

cpypwn/mac2jb

USB键盘模拟自动发送命令

mac2jb 是一个在 Apple Silicon Mac 上通过 USB HID 键盘模拟向 Nintendo Switch 2 的 SmileBASIC 编辑器传输引导代码并自动执行后续命令的工具,适用于已授权测试的设备。

AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/24 05:51:33 · 查看原文

普通Swift应用与服务
累计 Stars
76
当前热度
未达当前门槛
仓库创建时间
打开 GitHub ↗

选用指南

AI 根据 README 整理 · 2026/10/24 05:51:33

使用方式

通过命令行使用:构建后运行 `mac2jb-send` 发送引导代码,运行 `mac2jb-commands` 发送后引导命令。使用 USB-C 线连接 Mac 和 Switch 2,并确保 Switch 2 不从 Mac 取电。

查看 README 依据
The experimental kext is built using the Xcode project at: ```text vendor/macos_usb_gadget_poc/usbgadget/usbgadget.xcodeproj ``` A loaded extension is required but is **not sufficient** for successful gadget mode. Do not change security settings further just because enumeration fails. ### 2. build the default sender From the project root (the folder containing `Makefile`): ```sh make clean make ls -l mac2jb-send ``` `make` builds the verified inherited-indentation `sender.c` into
`mac2jb-send` and builds `commands.c` into `mac2jb-commands`, signs both ad hoc, and uses a bundled `libusbd.dylib` with an executable-relative runtime search path. `make clean` removes both senders and the vendored library binary, so the next `make` recompiles them both. ### 3. test the USB connection before sending code Use **any of the three Mac USB-C ports** to **either the top or bottom Switch 2 USB-C port** with a data-capable USB 2.0 USB-C-to-USB-C cable. Both Switch ports work on the tested console; all three Mac ports have worked with matching controllers. The connection
has been confirmed in docked and undocked use, and mac2jb now attempts to select the controller by enumeration unless you override it. **Important — USB charging direction:** USB host enumeration will not work if the Switch 2 is charging from the Mac. If it is, unplug and replug the USB-C cable. On the tested hardware, reconnecting reverses/corrects the power direction: the Switch may charge the Mac rather than the Mac charging the Switch. This also works if the Mac is already connected to a separate charger, as long as the Switch is not drawing charging power from the Mac.
部署要求

需要 Apple Silicon Mac、Xcode Command Line Tools 和完整 Xcode 以构建内核扩展,且需启用 Reduced Security 并可能禁用 SIP。Switch 2 需安装 SmileBASIC(完整版或演示版)。

查看 README 依据
You need an Apple silicon Mac, Xcode Command Line Tools, **full Xcode for building the kext**, and the checked-in vendored source. For later `ns2jb` network-host work, the pinned project's host also needs Node.js 22+ and an appropriate local network. The complete bootstrap transfer, post-bootstrap command sequence, and ns2jb network-host workflow were successfully tested end-to-end on **Nintendo Switch 2 system software `23.0.1` with SmileBASIC `4.4.9`**. Other software versions have not been verified. From the extracted project folder (containing `Makefile`): ```sh
- The test Mac had **Reduced Security** and **System Integrity Protection (SIP) disabled** temporarily to load the experimental driver. That is a **record of the test environment, not a recommendation** to disable them. These changes reduce protections for your Mac. Review Apple's kernel-extension security guidance and restore your normal security policy after research testing. - A successful `make`, a loaded kext, a charging indicator, or macOS's accessory-approval prompt **does not** prove USB HID enumeration. The real proof is text appearing on the target.
已知限制

实验性软件,非通用 macOS USB gadget API。仅确认在特定硬件配置(MacBook Pro M4、Switch 2 系统 23.0.1)上工作,其他配置未验证。需要第三方实验性内核扩展。

查看 README 依据
- This project depends on a **third-party experimental kernel extension** and a USB device-controller path that Apple does not provide as a supported general-purpose USB gadget API. The original upstream driver targets older Apple silicon/macOS software.
**End-to-end status:** The maintainer has confirmed successful completion of the entire workflow on the documented M4 MacBook Pro and Switch 2: USB HID connection, complete SmileBASIC bootstrap transfer, saving and running the bootstrap, interactive `RUN`, `REMOVE NSR,&H60000000,&H3FFFFFFF`, and `V=START(...)` commands, and the remaining ns2jb host steps. Both the full game and demo can be used; the demo requires retransferring the bootstrap every session because it cannot save it. This is a verified physical-hardware result for one tested configuration; other hardware and firmware
combinations have not been verified. **Release layout:** the user-tested inherited-indentation implementation is now `sender.c` and the default `mac2jb-send` executable. `make` and `scripts/send.sh` use that same source. Earlier experimental senders are not shipped in this package. This is experimental hardware-specific software, not a supported general-purpose macOS USB gadget API. ## confirmed test machine and connection These are **results from one user's physical hardware testing**, not blanket compatibility claims. | item | working test configuration | | --- | --- |

README

正在加载 README…

收录信息

仓库创建时间
2026/10/23 02:42:23
首次达标收录
2026/10/23 23:21:49
统计更新时间
2026/10/24 17:21:17

按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。

模型评估

普通加权总分 3.7 / 5

新颖度
3.9
实用价值
3.1
成熟度
4.2
实质含量
3.8

由 Jev 模型根据仓库描述与 README 评估,2026/10/23 23:21:49 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。

仓库信息

最近推送
2026/10/24 13:44:36
许可证标识
MIT
Fork 数
13
当前状态
未归档

收录记录

按创建时长与累计 Stars 首次收录:小火
首次发现项目