苹果Usb连接linux,Mount iPhone in Linux using USB (ifuse, libiphone)

Finally, it’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 “developers” should use it. Of course there is still a problem accessing the Media iTunes library on the iPhone – 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 pwnplayer which is able to play music from the iPod library on you iPhone, as well as MP’3 you copied to a directory on the iPhone. MewSeek, an application for musioc downloading,  works very well together with pwnplayer. JPG images from the iPhone Photo Camara can also be accessed.

The project  you need to mount the iPhone in Linux is called iFuse. 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’s on the projects main website. But with some googling, I found the answers.

edit: iFuse is now providing DEB and RPM packages on there website now: iFuse. See /usr/share/doc/ifuse/README of their ifuse package for usage instructions.

Install libiphone (as root)

git clone git://github.com/MattColyer/libiphone.git

./autgen.sh

./configure

make

make install

Install iFuse (as user)

git clone git://github.com/MattColyer/ifuse.gi

./autgen.sh

./configure –prefix=/

make

make install

Generate keys (as user)

/usr/local/bin/libiphone-initconf

(This will generate some keys required to connect with the iPhone over USB)

Mount the iPhone’s root filesystem including the Media partition (as user)

mkdir /mnt/iPhone (make sure you have write access to the mount mount)

mount.fuse.ifuse –afc2 none /mnt/iPhone/ -s

(The -s options seem to be related to threading/locking issues and is a workaround)

Or mount the iPhone’s Media partition only (as user)

mount.fuse.ifuse none /mnt/iPhone/ -s

Or mount as root

mount  mount none -t fuse.ifuse /mnt/iPhone

Unmounting (as user)

fusermount -u /mnt/iPhone

Umounting (as root)

umount /mnt/iPhone

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 – which is quite complicated

0818b9ca8b590ca3270a3433284dd417.png – I could not find any scripting-hooks (or configuration options) in GVFSD to do some BASH magic and auto mount the iPhone in GNOME.

The performance, using Nautilus to copy data from/to the iPhone is:

Write (computer-to-iPhone): ~750 KB/s

Read (iPhone-to-computer): ~2.9 MB/s

Not bad – 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):

T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 27 Spd=480 MxCh= 0

D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 3

P: Vendor=05ac ProdID=1292 Rev= 0.01

S: Manufacturer=Apple Inc.

S: Product=iPhone

Alternatives:

Mounting using SSH/SFTP over ADHOC wifi connection

iTunnel using modified libiphone

Links:

A small script to mimic a bit the GNOME GVFS auto mounting function:

#!/bin/sh

mntp=/home/johan/mnt/iPone

if ! ( mount | grep $mntp ); then

mkdir -p $mntp

mount.fuse.ifuse -afc2 none $mntp -s

notify-send -u normal "iPhone Mounted" "The iPhone is now mounted."

nautilus $mntp

else

fusermount -u $mntp

rmdir $mntp

notify-send -u normal "iPhone Un-Mounted" "The iPhone is now un-mounted."

fi

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值