LNPANDY / nxnative-romfs-archive
git clone https://github.com/LNPANDY/nxnative-romfs-archive.git
v0.2.0 · 1d ago
nxnative + RomFS archive: pack a Switch RomFS into ~100 files so large games can be installed on iOS
+35
stars, 24h · #1,115
+84
stars, 7 days · #2,565
+84
stars, 30 days · #8,176
84
★ total · +84% this week
9
forks · 0 open issues
Star history (as recorded here)
LanguageC
License—
Created2026-10-20 (3d ago)
Last push1d ago
Watchers0
OwnerUser
GitHub topics
Links
README excerpt
# nxnative + RomFS Archive Run your own Nintendo Switch games natively on iPhone and iPad — and ship games whose resource files are too large (or too numerous) for a normal iOS install. This repository is **nxnative with one new subsystem: a RomFS archive**. Everything about running the game — the NSO rewriter, the Horizon host, the NVN-on-Metal layer, the per-game profiles — is upstream work. What is new here is a way to pack a RomFS tree into ~100 files and have the app read it directly, which makes large games installable and their files copyable in one operation. English | 简体中文 --- ## The problem A RomFS like Tears of the Kingdom's is **304,243 files / 15.9 GiB**. Two things break: - **The IPA does not install.** A 16.6 GB package with 372,660 entries fails on iOS with `PackageExtractionFailed (Could not extract archive)`. The install daemon's extractor gives up — one directory holds 75,941 files and the ZIP64 central directory starts at 17.8 GB. - **Copying the tree to the phone takes hours.** The Files app and Finder do one round trip per file. 300,000 small files also produce roughly 1 GB of filesystem block overhead. Packing the tree into ~100 shard files solves both: the package stays small, and the game files move to the phone as one folder of large files. ## The fix A **ROMFSARC** archive: one index file plus N shard files. [code] Measured on Tears of the Kingdom (v1.0.0 + 1.4.3): | | Plain RomFS | ROMFSARC | |---|---|---| | Files | 304,243 | **127** | | Largest directory | 75,941 entries | 126 shards, none over 200 MiB | | IPA with the game inside | 16.6 GB (fails to install) | — | | Slim IPA (the default, no RomFS inside) | — | **743 MB, installs** | | Copy to the phone | hours | one folder of 127 files | Path lookup is a binary search over the sorted file table; a directory listing walks one contiguous child range. The index is `mmap`ed, shards are opened lazily, and reads go straight to `pread` on the shard, so the page cache still works. ## The GUI front end `frontend/` is a macOS app that does steps 2–5 below with a window instead of a terminal, for people who would rather not read a build log: four inputs picked separately (base game, update, DLC, `prod.keys`), a dependency panel that detects and installs what is missing, the script's real stage list with live percentages, and the archive shards produced at the end. 界面截图(点开) [code] The interface is bilingual: it follows the device (Chinese for any Chinese variant, **English for everything else**) and the `中文` / `EN` button in the title bar switches at any time. It runs the same scripts the command line does, so everything below still applies; see frontend/README.md. The prebuilt app, and the release notes in English and Chinese (including which games are verified), are on the releases page and in docs/RELEASE_NOTES.md. ## Using it ### 1. Build the app (as upstream) The archive feature does not change the normal build. Follow upstream's README to install Xcode, Homebrew