<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog Amain &#187; mount</title>
	<atom:link href="http://blog.zoomeren.nl/tag/mount/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zoomeren.nl</link>
	<description>Open Source / Linux</description>
	<lastBuildDate>Fri, 21 May 2010 21:47:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mount iPhone in Linux using USB (ifuse, libiphone)</title>
		<link>http://blog.zoomeren.nl/2009/03/24/mount-iphone-in-linux-using-usb-ifuse-libiphone/</link>
		<comments>http://blog.zoomeren.nl/2009/03/24/mount-iphone-in-linux-using-usb-ifuse-libiphone/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 16:42:07 +0000</pubDate>
		<dc:creator>Amain</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[ifuse]]></category>
		<category><![CDATA[libiphone]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://blog.zoomeren.nl/?p=48</guid>
		<description><![CDATA[Finally, it&#8217;s working. Mounting the iPhone in Linux over USB. No stupid (ADHOC) wireless connection is required. It also works on non-jailbrroken iPhones. Though, the developers still say that only &#8220;developers&#8221; should use it. Of course there is still a problem accessing the Media iTunes library on the iPhone &#8211; the key Apple uses on [...]]]></description>
			<content:encoded><![CDATA[<p>Finally, it&#8217;s working. Mounting the iPhone in Linux over USB. No stupid (ADHOC) wireless connection is required. It also works on non-jailbrroken iPhones. Though, the developers still say that only &#8220;developers&#8221; should use it. Of course there is still a problem accessing the Media iTunes library on the iPhone &#8211; the key Apple uses on the latest iPhone firmwares has still not been discovered. But instead of using the iPod software on the iPhone, I now use the very promissing <a href="http://www.pwnplayer.com/">pwnplayer</a> which is able to play music from the iPod library on you iPhone, as well as MP&#8217;3 you copied to a directory on the iPhone. <a href="http://www.mewseek.net/">MewSeek</a>, an application for musioc downloading,  works very well together with pwnplayer. JPG images from the iPhone Photo Camara can also be accessed.</p>
<p>The project  you need to mount the iPhone in Linux is called <a href="http://matt.colyer.name/projects/iphone-linux/index.php?title=Main_Page">iFuse</a>. iFuse is a module for the FUSE(Filesystem in Userspace) system. The project contains libiphone, which is used to access USB and does the lower level translations. Unfortunately, I could not find howto&#8217;s on the projects main website. But with some googling, I found the answers.</p>
<p><strong>edit: iFuse is now providing DEB and RPM packages on there website now: <a href="http://matt.colyer.name/projects/iphone-linux/index.php?title=Main_Page">iFuse</a>. See /usr/share/doc/ifuse/README of their ifuse package for usage instructions.<br />
</strong></p>
<ol>
<li>Install libiphone (as root)
<ol>
<li><code>git clone git://github.com/MattColyer/libiphone.git </code></li>
<li>./autgen.sh</li>
<li>./configure</li>
<li>make</li>
<li>make install</li>
</ol>
</li>
<li>Install iFuse (as user)
<ol>
<li><code>git clone git://github.com/MattColyer/ifuse.gi</code></li>
<li>./autgen.sh</li>
<li>./configure &#8211;prefix=/</li>
<li>make</li>
<li>make install</li>
</ol>
</li>
<li>Generate keys (as user)
<ol>
<li>/usr/local/bin/libiphone-initconf<br />
(This will generate some keys required to connect with the iPhone over USB)</li>
</ol>
</li>
<li>Mount the iPhone&#8217;s root filesystem including the Media partition (as user)
<ol>
<li>mkdir /mnt/iPhone (make sure you have write access to the mount mount)</li>
<li>mount.fuse.ifuse &#8211;afc2 none /mnt/iPhone/ -s<br />
(The -s options seem to be related to threading/locking issues and is a workaround)</li>
</ol>
</li>
<li>Or mount the iPhone&#8217;s Media partition only (as user)
<ol>
<li>mount.fuse.ifuse none /mnt/iPhone/ -s</li>
</ol>
</li>
<li>Or mount as root
<ol>
<li>mount  mount none -t fuse.ifuse /mnt/iPhone</li>
</ol>
</li>
<li>Unmounting (as user)
<ol>
<li>fusermount -u /mnt/iPhone</li>
</ol>
</li>
<li>Umounting (as root)
<ol>
<li>umount /mnt/iPhone</li>
</ol>
</li>
</ol>
<p>I have been testing this on Ubuntu Intrepid. It would be nice to see GNOME GVFS to automount the iPhone over USB.  After some investigation of this matter I must conclude that UDEV, HAL, DBUS, GVFSD, GVFSD-backends are used to do the automounting in GNOME &#8211; which is quite complicated <img src='http://blog.zoomeren.nl/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  &#8211; I could not find any scripting-hooks (or configuration options) in GVFSD to do some BASH magic and auto mount the iPhone in GNOME.</p>
<p>The performance, using Nautilus to copy data from/to the iPhone is:</p>
<ul>
<li>Write (computer-to-iPhone): ~750 KB/s</li>
<li>Read (iPhone-to-computer): ~2.9 MB/s</li>
</ul>
<p>Not bad &#8211; although writing is a bit slow compared to the avg-read time. The iPhone 2.0 seems to be connected over USB 2.0 (480 mbit/s):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">T:  <span style="color: #007800;">Bus</span>=03 <span style="color: #007800;">Lev</span>=01 <span style="color: #007800;">Prnt</span>=01 <span style="color: #007800;">Port</span>=00 <span style="color: #007800;">Cnt</span>=01 Dev<span style="color: #666666; font-style: italic;">#= 27 Spd=480 MxCh= 0</span>
D:  <span style="color: #007800;">Ver</span>= <span style="color: #000000;">2.00</span> <span style="color: #007800;">Cls</span>=00<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">&amp;</span>gt;ifc <span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">Sub</span>=00 <span style="color: #007800;">Prot</span>=00 <span style="color: #007800;">MxPS</span>=<span style="color: #000000;">64</span> <span style="color: #666666; font-style: italic;">#Cfgs=  3</span>
P:  <span style="color: #007800;">Vendor</span>=05ac <span style="color: #007800;">ProdID</span>=<span style="color: #000000;">1292</span> <span style="color: #007800;">Rev</span>= <span style="color: #000000;">0.01</span>
S:  <span style="color: #007800;">Manufacturer</span>=Apple Inc.
S:  <span style="color: #007800;">Product</span>=iPhone</pre></div></div>

<p>Alternatives:</p>
<ul>
<li>Mounting using SSH/SFTP over ADHOC wifi connection</li>
<li><a href="http://www.cs.toronto.edu/~jingsu/itunnel/">iTunnel</a> using modified libiphone</li>
</ul>
<p>Links:</p>
<ul>
<li><a href="http://brandy25.blogspot.com/2009/02/mount-iphone-in-linux-via-usb.html">http://brandy25.blogspot.com/2009/02/mount-iphone-in-linux-via-usb.html</a></li>
<li><a href="https://help.ubuntu.com/community/PortableDevices/iPhone">https://help.ubuntu.com/community/PortableDevices/iPhone</a></li>
</ul>
<p>A small script to mimic a bit the GNOME GVFS auto mounting function:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">mntp</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>johan<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>iPhone
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #007800;">$mntp</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span>; <span style="color: #000000; font-weight: bold;">then</span>
   <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #007800;">$mntp</span>
   mount.fuse.ifuse <span style="color: #660033;">-afc2</span> none <span style="color: #007800;">$mntp</span> <span style="color: #660033;">-s</span>
   notify-send <span style="color: #660033;">-u</span> normal <span style="color: #ff0000;">&quot;iPhone Mounted&quot;</span> <span style="color: #ff0000;">&quot;The iPhone is now mounted.&quot;</span>
   nautilus <span style="color: #007800;">$mntp</span>
<span style="color: #000000; font-weight: bold;">else</span>
   fusermount <span style="color: #660033;">-u</span> <span style="color: #007800;">$mntp</span>
   <span style="color: #c20cb9; font-weight: bold;">rmdir</span> <span style="color: #007800;">$mntp</span>
   notify-send <span style="color: #660033;">-u</span> normal <span style="color: #ff0000;">&quot;iPhone Un-Mounted&quot;</span> <span style="color: #ff0000;">&quot;The iPhone is now un-mounted.&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.zoomeren.nl/2009/03/24/mount-iphone-in-linux-using-usb-ifuse-libiphone/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
