<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Amirjon Abdunayimov</title>
    <description>The latest articles on DEV Community by Amirjon Abdunayimov (@amirjon_abdunayimov_2954f).</description>
    <link>https://dev.to/amirjon_abdunayimov_2954f</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4258319%2Fe9f93350-3c24-4f4f-879e-8b6bbee6b91d.png</url>
      <title>DEV Community: Amirjon Abdunayimov</title>
      <link>https://dev.to/amirjon_abdunayimov_2954f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amirjon_abdunayimov_2954f"/>
    <language>en</language>
    <item>
      <title>I built a WiFi iPhone filesystem for Linux because ifuse stopped working on iOS 17</title>
      <dc:creator>Amirjon Abdunayimov</dc:creator>
      <pubDate>Sun, 22 Nov 2026 06:15:15 +0000</pubDate>
      <link>https://dev.to/amirjon_abdunayimov_2954f/i-built-a-wifi-iphone-filesystem-for-linux-because-ifuse-stopped-working-on-ios-17-31jh</link>
      <guid>https://dev.to/amirjon_abdunayimov_2954f/i-built-a-wifi-iphone-filesystem-for-linux-because-ifuse-stopped-working-on-ios-17-31jh</guid>
      <description>&lt;p&gt;I daily drive Linux.&lt;/p&gt;

&lt;p&gt;Recently, I needed to transfer some photos from my iPhone. Naturally, I tried &lt;code&gt;ifuse&lt;/code&gt;, the tool everyone recommends.&lt;/p&gt;

&lt;p&gt;It didn't work. The pairing handshake failed on iOS 17.&lt;/p&gt;

&lt;p&gt;I looked for alternatives, but most required USB cables, iCloud, or tools that didn't reliably support newer iOS versions.&lt;/p&gt;

&lt;p&gt;I just wanted to run &lt;code&gt;ls&lt;/code&gt;, find my photos, and copy them over.&lt;/p&gt;

&lt;p&gt;So I spent a weekend building &lt;strong&gt;iphone-linux&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/Amirjon06/iphone-linux" rel="noopener noreferrer"&gt;https://github.com/Amirjon06/iphone-linux&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Does
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;iphone-linux&lt;/code&gt; mounts your iPhone as a regular Linux filesystem over WiFi.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No cable for file transfers. No iTunes. No iCloud. No Apple account.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;iphone-linux mount
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your iPhone's accessible files appear under &lt;code&gt;/mnt/iPhone&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ ls /mnt/iPhone
Books  DCIM  Downloads  Music  PhotoData  Recordings  iTunes_Control
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy photos using ordinary Linux commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cp /mnt/iPhone/DCIM/100APPLE/IMG_0048.JPEG ~/photos/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or write a file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"hello from linux"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /mnt/iPhone/Downloads/note.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your iPhone behaves like a mounted drive. You can browse, read, write, and automate file operations using standard Linux tools.&lt;/p&gt;

&lt;p&gt;No custom file browser or web interface needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works Under the Hood
&lt;/h2&gt;

&lt;p&gt;The interesting part is that Apple already has a way to communicate with iPhones over WiFi.&lt;/p&gt;

&lt;p&gt;Xcode uses a protocol called &lt;code&gt;mobdev2&lt;/code&gt; for wireless device communication and debugging.&lt;/p&gt;

&lt;p&gt;There's a Python library called &lt;code&gt;pymobiledevice3&lt;/code&gt; that implements Apple's mobile device communication protocols.&lt;/p&gt;

&lt;p&gt;I used that as the foundation and built a FUSE filesystem on top.&lt;/p&gt;

&lt;p&gt;Here's how everything fits together:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Device discovery — mDNS/Bonjour&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The tool discovers your iPhone on the local network using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_apple-mobdev2._tcp.local.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Authentication — pymobiledevice3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It authenticates using a saved pairing record after the device has been trusted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. File access — AFC&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Apple File Conduit (AFC) provides access to files and directories exposed through Apple's device services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Filesystem — FUSE&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;FUSE maps remote file operations into a Linux mount point, allowing ordinary filesystem commands to interact with the iPhone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Async/sync bridge — asyncio&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the trickier implementation details was connecting FUSE's synchronous callbacks to asynchronous device communication.&lt;/p&gt;

&lt;p&gt;I run an &lt;code&gt;asyncio&lt;/code&gt; event loop in a background thread and submit operations using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run_coroutine_threadsafe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This bridges synchronous filesystem requests with the asynchronous communication layer.&lt;/p&gt;

&lt;p&gt;The result is a filesystem that looks local to Linux but communicates with the iPhone over WiFi.&lt;/p&gt;

&lt;h2&gt;
  
  
  Per-App Sandbox Access
&lt;/h2&gt;

&lt;p&gt;This is the feature I'm most proud of.&lt;/p&gt;

&lt;p&gt;iOS sandboxes applications, meaning each app has its own isolated storage.&lt;/p&gt;

&lt;p&gt;I implemented Apple's &lt;strong&gt;HouseArrest protocol&lt;/strong&gt; to mount the accessible file-sharing containers of supported applications.&lt;/p&gt;

&lt;p&gt;For example, to mount Apple's Pages app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;iphone-linux mount-app 192.168.1.10 com.apple.Pages
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then browse its documents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ls /mnt/iPhone-Pages/Documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or copy a file into the app's accessible Documents directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cp ~/report.pages /mnt/iPhone-Pages/Documents/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also list installed user applications to find their bundle IDs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;iphone-linux apps 192.168.1.10 --user
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This doesn't bypass iOS sandbox security. Access is limited to what Apple's services permit.&lt;/p&gt;

&lt;p&gt;Still, being able to interact with supported app documents directly from a Linux terminal is useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch Mode: Automatic Mounting
&lt;/h2&gt;

&lt;p&gt;I also wanted the tool to work without constantly thinking about it.&lt;/p&gt;

&lt;p&gt;So I added watch mode:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;iphone-linux watch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It monitors for your iPhone and automatically mounts it when the device becomes available.&lt;/p&gt;

&lt;p&gt;If your phone sleeps, disconnects, or leaves the network, the tool handles the disconnection and continues watching.&lt;/p&gt;

&lt;p&gt;It uses exponential backoff:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5s → 10s → 20s → 40s → 60s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the device becomes reachable again, watch mode attempts to remount it.&lt;/p&gt;

&lt;p&gt;You can also configure it as a &lt;code&gt;systemd&lt;/code&gt; service so it runs automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Handling Broken Connections
&lt;/h2&gt;

&lt;p&gt;Wireless connections aren't always stable.&lt;/p&gt;

&lt;p&gt;Your phone might lock, go to sleep, or temporarily disappear from the network while an operation is running.&lt;/p&gt;

&lt;p&gt;I added connection recovery logic to detect broken connections during filesystem operations, reconnect, and retry when possible.&lt;/p&gt;

&lt;p&gt;The goal is to avoid manually unmounting and restarting everything after a temporary disconnection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Clone the repository and run the installer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Amirjon06/iphone-linux
&lt;span class="nb"&gt;cd&lt;/span&gt; iphone-linux
bash install.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Requirements:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Linux with FUSE support&lt;/li&gt;
&lt;li&gt;An iPhone with Developer Mode enabled&lt;/li&gt;
&lt;li&gt;Both devices connected to the same WiFi network&lt;/li&gt;
&lt;li&gt;Initial device pairing and Trust approval&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Developer Mode can be enabled under:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Settings → Privacy &amp;amp; Security → Developer Mode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once the device is paired and configured, the tool can reuse its saved pairing record.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing on Real Hardware
&lt;/h2&gt;

&lt;p&gt;I wrote 13 tests against a physical iPhone over WiFi.&lt;/p&gt;

&lt;p&gt;These aren't mocked filesystem operations. They exercise the actual device connection.&lt;/p&gt;

&lt;p&gt;The tests cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File reads and writes&lt;/li&gt;
&lt;li&gt;Offset reads&lt;/li&gt;
&lt;li&gt;JPEG header validation&lt;/li&gt;
&lt;li&gt;Binary file writes&lt;/li&gt;
&lt;li&gt;1 MB writes&lt;/li&gt;
&lt;li&gt;Overwriting existing files&lt;/li&gt;
&lt;li&gt;Directory creation and removal&lt;/li&gt;
&lt;li&gt;File deletion and renaming&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run them with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pytest test_iphone_linux.py -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Testing against real hardware helped validate the core functionality, although there's still more work to do around connection recovery and compatibility across iOS versions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Built This
&lt;/h2&gt;

&lt;p&gt;I didn't want another graphical file-transfer application.&lt;/p&gt;

&lt;p&gt;I wanted my iPhone to behave like a mounted filesystem.&lt;/p&gt;

&lt;p&gt;Something I could interact with using &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;cp&lt;/code&gt;, shell scripts, and whatever other Linux utilities I already use.&lt;/p&gt;

&lt;p&gt;The interesting challenge wasn't copying a photo. It was getting Apple's device communication protocols, asynchronous Python, and FUSE to work together.&lt;/p&gt;

&lt;p&gt;That's what I set out to build.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;There are a few areas I'd like to keep improving:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reliability across different iOS versions&lt;/li&gt;
&lt;li&gt;Better handling of interrupted file transfers&lt;/li&gt;
&lt;li&gt;More comprehensive automated tests&lt;/li&gt;
&lt;li&gt;Performance improvements for large transfers&lt;/li&gt;
&lt;li&gt;Easier installation and device setup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're a Linux user with an iPhone, I'd appreciate you checking it out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/Amirjon06/iphone-linux" rel="noopener noreferrer"&gt;https://github.com/Amirjon06/iphone-linux&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback, issues, and contributions are welcome.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>python</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
