Mount your iPhone as a filesystem on Linux over WiFi — no cable, no iTunes, no iCloud. $ ls /mnt/iPhone Books DCIM Downloads Music PhotoData Recordings iTunes_Control $ cp /mnt/iPhone/DCIM/100APPLE/IMG_0048.JPEG ~/photos/ $ echo "hello from linux" > /mnt/iPhone/Downloads/note.txt $ iphone-linux mount-app com.apple.Pages $ ls /mnt/iPhone-Pages Documents Library tmp Linux users who want to pull photos off their iPhone have two bad options: USB + ifuse — broken on modern iOS (17+) iCloud web — slow, requires internet, can't access all folders iphone-linux uses the same WiFi protocol Xcode uses for wireless debugging, combined with FUSE, to make your iPhone appear as a normal Linux folder — with full read/write support. git clone https://github.com/Amirjon06/iphone-linux cd iphone-linux bash install.sh The installer creates a Python venv, installs all deps, and adds iphone-linux to your PATH. Allow non-root access By default FUSE mounts are root-only. To let your regular user access the mount: echo "user_allow_other" | sudo tee -a /etc/fuse.conf This is a one-time setup. iphone-linux mount [ip] # Mount iPhone at /mnt/iPhone (auto-discovers IP) iphone-linux mount-ro # Mount read-only iphone-linux mount-app # Mount a single app's sandbox iphone-linux watch # Auto-mount when iPhone joins WiFi iphone-linux unmount # Unmount Per-app sandbox access iOS sandboxes every app — each one gets its own private Documents folder with no access to other apps. mount-app uses Apple's HouseArrest protocol to mount exactly one app's sandbox, so you can read and write its files directly: iphone-linux mount-app com.apple.Pages ls /mnt/iPhone-Pages/Documents # Pages documents cp ~/report.pages /mnt/iPhone-Pages/Documents/ iphone-linux mount-app com.hammerandchisel.discord ls /mnt/iPhone-Discord/Library/Caches No other Linux tool exposes this. You need the app's bundle ID — find it by searching "bundle id" + the app name, or browsing VP Browser. Auto-mount at login (systemd) Install the service so your iPhone mounts automatically whenever you log in and it's on the same WiFi: mkdir -p ~/.config/systemd/user cp systemd/iphone-linux.service ~/.config/systemd/user/ systemctl --user daemon-reload systemctl --user enable --now iphone-linux Check status: systemctl --user status iphone-linux journalctl --user -u iphone-linux -f First-time setup iPhone: Settings → Privacy & Security → Developer Mode → Enable Same WiFi network as your Linux machine Run iphone-linux mount — tap Trust on your iPhone when prompted Pairing is saved — future mounts need no interaction How it works Connects over WiFi via pymobiledevice3 using the mobdev2 protocol (same as Xcode wireless debugging) Discovers your iPhone's IP automatically via mDNS/Bonjour (_apple-mobdev2._tcp.local.) Authenticates with a saved pairing record (tap "Trust" once, never again) Exposes the iPhone filesystem via AFC through FUSE, or a single app sandbox via HouseArrest asyncio event loop runs in a background thread; FUSE sync callbacks use run_coroutine_threadsafe() to submit AFC requests Read-ahead cache pre-fetches 3 MB ahead in background threads for fast sequential reads Requirements Linux (Ubuntu 24.04+ tested) Python 3.10+ iPhone on the same WiFi network Developer Mode enabled on iPhone # Mount first, then: pytest test_iphone_linux.py -v 13 tests covering mount sanity, read, offset read, JPEG header validation, write, binary write, 1 MB write, overwrite, mkdir, rmdir, unlink, and rename — all run against a real iPhone over WiFi. Read-only mount over WiFi Write support (copy files to and from iPhone) Auto-mount when iPhone joins WiFi (mDNS/Bonjour) One-command installer Read-only mode (--ro flag) Test suite (13 tests, all passing on real hardware) --app flag for per-app sandbox access Read-ahead cache for large photo libraries Systemd service for auto-mount at boot pymobiledevice3 · fusepy · libfuse2t64 · zeroconf · Python 3
AI NEWS JOURNAL
Hacker News Show HNAI NEWS / JOURNAL
Show HN: Mount your iPhone as a filesystem on Linux over WiFi
Article URL: https://github.com/Amirjon06/iphone-linux Comments URL: https://news.ycombinator.com/item?id=50595241 Points: 1 # Comments: 0
翻译服务暂未运行,当前显示原文。