Results 1 to 1 of 1
Discuss Mounting iPhone in Linux - iFuse and libiphone at the Tools - Hackint0sh.org; For all the penguim fans out there: mounting iphone under linux is now possible! Still ...
  1. #1
    Senior Professional Array unl0cker's Avatar

    Join Date
    Jul 2007
    Location
    In my Mind
    Posts
    128
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    14

    Default [HOWTO] Mounting iPhone in Linux - iFuse / libiphone

    For all the penguim fans out there: mounting iphone under linux is now possible!


    Still in alpha, the developer discourage the enduser use of this module. They ask for alpha testers!


    Anyway this is A-W-E-S-O-M-E!


    The website is:
    http://http://matt.colyer.name/proje...itle=Main_Page



    Here is some quick info:

    iFuse is a FUSE filesystem driver which uses `libiphone` to connect to devices without jailbreak.
    (AND JAILBRAKED if like it). It has both afc and afc2 inside the ifuse.c so you can mount with either one.

    Syncing:
    Conduit has a experimental module to sync addressbook/calendar that will work on the jailbroken iPhones. It requires some kernel patching. Look for the patches in the website above.

    Music cannot be synced with firmware >= 2.0 because the cryptographic signing algorithm changed, so libgpod/gtkpod will not work. If you try you'll trash the music database and you'll have to restore using iTunes.

    Photos can be copied in and out.

    Storage now is possible*. Just a bit tricky. You need to trick the phone to think your file(s) is a jpg. Lets say, create the dir /User/Media/DCIM/100APPLE/moar/

    Copy your files there and rename them to .jpg. Say weps.txt you rename as weps.jpg. After that done any Windows/OSX will be able to retrieve that file because the phone "thinks" it's an image. Copy the file to the destination and rename it back to txt. There, file storage. Or something almost like it.


    Besides the necessary usb support build in the kernel (or modules) you'll need fuse (it's a dep for ifuse).


    You'll also need git to retrieve the source.


    How to get it? I advise you to go to the website and check for yourself. But.. here is a quick how to. su is a must to the following.


    Make a directory and cd into it:
    mkdir ~/iPhoneProject && cd ~/iPhoneProject

    get libiphone sources:

    get ifuse sources:
    Note: deps for libiphone are
    libgnutls-dev
    libusb-dev
    libfuse-dev (and the associated kernel modules)
    libglib2.0-dev
    libxml2-dev
    make
    autoheader
    automake
    autoconf
    gcc


    (My gentoo had it all xD)


    compile libiphone:
    cd ~/iPhoneProject/libiphone
    ./autogen.sh
    ./configure
    make
    make install

    compile ifuse:
    cd ~/iPhoneProject/ifuse
    ./autogen.sh
    ./configure
    make
    make install

    Generate the keys/host id
    Before mounting you MUST run "libiphone-initconf"
    as your own user (not root). It will generate keys and a host id for your system to be able to communicate with 'lockdownd' on the iPhone. The generated keys are saved in '~/.config/libiphone/' in your home directory.

    libiphone-initconf
    Note: I'm using Gentoo, gentoo does not create a fuse group because the node fuse is already 666. So I ran everything as root, from the compiling to the mounting. I'll tweak this later. If that happens to you, you either do as I did, or fix the fuse group issue. Read libiphone/README and ifuse/README for more info.



    Create a mounting point for the iPhone:
    mkdir /mnt/iPhone

    I, of course, invite you to read both README files (in ifuse and libiphone git source dirs). Aparently the source has changed, and the documentation hasn't. Anyway I've found two ways to mount. The first using the default mount command with -t to specify the fs type. and using ifuse's mount.fuse.ifuse. I could not find a way to mount with 'mount' and use the afc2 parameter (which will give us root access). So for now (and for me) using 'mount' is only for the Media partition.

    The README states that you can use any node, it doesn't matter. So I have used the following to mount:


    Mounting using 'mount':
    mount /dev/hda -t fuse.ifuse /mnt/iPhone

    Mounting using mount.fuse.ifuse:
    mount.fuse.ifuse --afc2 /dev/hda /mnt/iphone/ -s

    Note the --afc2 parameter! That will mount the root (full filesystem access)



    or to mount only the Media partition:


    mount.fuse.ifuse /dev/hda /mnt/iphone/ -s
    Note also the -s. This is a workaround. There is a threading/locking issue, the -s forces single-thread.

    I notice that all files had wrong size/date. The sizes were humongous. The Media FS was being reported as 16TB lulz. and the dates were 31 Dec 1969! That's even before Epoch.. that's BEPOCH! haha.

    Anyway, happened only when browsing inside the mounted point, any directory/file written using the libiphone/iFuse reported the correct date/size when I checked over ssh. I don't know if this is an issue only in my box (eg. something here is broken) or if is a bug. Hard to know. Let me know if you experience the same.


    Well guys thats it. Have fun... bellow are some outputs for all the fun I had!



    [root@quickpwn] (0 MB) [/] # mount.fuse.ifuse --afc2 /dev/hda /mnt/iphone/ -s

    [root@quickpwn] (0 MB) [/] # cd /mnt/iphone/

    [root@quickpwn] (0 MB) [/mnt/iphone] # ls -lsa
    total 0
    0 drwxr-xr-x 0 root root 8796093022238 Dec 31 1969 Applications/
    0 drwxr-xr-x 0 root root 8796093022276 Dec 31 1969 Developer/
    0 drwxr-xr-x 0 root root 8796093022956 Dec 31 1969 Library/
    0 drwxr-xr-x 0 root root 8796093022310 Dec 31 1969 System/
    0 drwxr-xr-x 0 root root 8796093022219 Dec 31 1969 User/
    0 drwxr-xr-x 0 root root 8796093024248 Dec 31 1969 bin/
    0 drwxr-xr-x 0 root root 8796093022276 Dec 31 1969 boot/
    0 drwxr-xr-x 0 root root 8796093022276 Dec 31 1969 cores/
    0 drwxr-xr-x 0 root root 8796093023434 Dec 31 1969 dev/
    0 drwxr-xr-x 0 root root 8796093022220 Dec 31 1969 etc/
    0 drwxr-xr-x 0 root root 8796093022276 Dec 31 1969 lib/
    0 drwxr-xr-x 0 root root 8796093022276 Dec 31 1969 mnt/
    0 drwxr-xr-x 0 root root 8796093022344 Dec 31 1969 private/
    0 drwxr-xr-x 0 root root 8796093022718 Dec 31 1969 sbin/
    0 drwxr-xr-x 0 root root 8796093022224 Dec 31 1969 tmp/
    0 drwxr-xr-x 0 root root 8796093022582 Dec 31 1969 usr/
    0 drwxr-xr-x 0 root root 8796093022220 Dec 31 1969 var/
    0 drwxr-xr-x 0 root root 8796093022956 Dec 31 1969 ./
    0 drwxr-xr-x 8 root root 216 Jan 6 04:57 ../
    0 drwxr-xr-x 0 root root 8796093022378 Dec 31 1969 .fseventsd/

    [root@quickpwn] (0 MB) [/mnt/iphone] # cd User/Media/

    [root@quickpwn] (16777216.043 MB) [/mnt/iphone/User/Media] # ls -lsa
    total 0
    0 drwxr-xr-x 0 root root 8796093022378 Dec 31 1969 DCIM/
    0 drwxr-xr-x 0 root root 8796093022276 Dec 31 1969 Downloads/
    0 drwxr-xr-x 0 root root 8796093022276 Dec 31 1969 Photos/
    0 drwxr-xr-x 0 root root 8796093022276 Dec 31 1969 PublicStaging/
    0 drwxr-xr-x 0 root root 8796093022412 Dec 31 1969 iTunes_Control/
    0 drwxr-xr-x 0 root root 8796093022514 Dec 31 1969 ./
    0 drwxr-xr-x 0 root root 8796093022219 Dec 31 1969 ../
    0 -rw-r--r-- 0 root root 8796093022208 Dec 31 1969 com.apple.itunes.lock_sync
    0 -rw-r--r-- 0 root root 8796093067933 Dec 31 1969 jailbreak.log

    [root@quickpwn] (16777216.043 MB) [/mnt/iphone/User/Media] # cd DCIM/

    [root@quickpwn] (0 MB) [/mnt/iphone/User/Media/DCIM] # ls -lsa
    total 0
    0 drwxr-xr-x 0 root root 8796093023670 Dec 31 1969 100APPLE/
    0 drwxr-xr-x 0 root root 8796093023670 Dec 31 1969 999APPLE/
    0 drwxr-xr-x 0 root root 8796093022378 Dec 31 1969 ./
    0 drwxr-xr-x 0 root root 8796093022514 Dec 31 1969 ../
    0 drwxr-xr-x 0 root root 8796093022344 Dec 31 1969 .MISC/

    [root@quickpwn] (0 MB) [/mnt/iphone/User/Media/DCIM] # cd 100APPLE/

    [root@quickpwn] (335544326.318 MB) [/mnt/iphone/User/Media/DCIM/100APPLE] # ls -lsa
    total 0
    0 drwxr-xr-x 0 root root 8796093022310 Dec 31 1969 moar/
    0 drwxr-xr-x 0 root root 8796093023670 Dec 31 1969 ./
    0 drwxr-xr-x 0 root root 8796093022378 Dec 31 1969 ../
    0 -rw-r--r-- 0 root root 8796093350660 Dec 31 1969 IMG_0002.JPG
    0 -rw-r--r-- 0 root root 8796093406013 Dec 31 1969 IMG_0003.JPG
    0 -rw-r--r-- 0 root root 8796093431304 Dec 31 1969 IMG_0004.JPG
    0 -rw-r--r-- 0 root root 8796093025962 Dec 31 1969 IMG_0002.THM
    0 -rw-r--r-- 0 root root 8796093026640 Dec 31 1969 IMG_0003.THM
    0 -rw-r--r-- 0 root root 8796093026574 Dec 31 1969 IMG_0004.THM

    [root@quickpwn] (335544326.318 MB) [/mnt/iphone/User/Media/DCIM/100APPLE] # cd moar/

    [root@quickpwn] (8388608.001 MB) [/mnt/iphone/User/Media/DCIM/100APPLE/moar] # ls -lsa
    total 0
    0 drwxr-xr-x 0 root root 8796093022310 Dec 31 1969 ./
    0 drwxr-xr-x 0 root root 8796093023670 Dec 31 1969 ../
    0 -rw-r--r-- 0 root root 8796093023777 Dec 31 1969 wep.jpg

    [root@quickpwn] (8388608.001 MB) [/mnt/iphone/User/Media/DCIM/100APPLE/moar] # cat wep.jpg
    =================================
    W i F i P W N A G E D A T A
    =================================


    00:19:5B:24:95:46 6 WEP
    KEY FOUND! [ 7665726465 ]

    00:17:9A:F1:AE:69 5 WEP
    KEY FOUND! [ 7461746F31 ]


    00:14:BFF:F5:E7 6 WEP
    KEY FOUND! [ 1151826834 ]


    [root@quickpwn] (8388608.001 MB) [/mnt/iphone/User/Media/DCIM/100APPLE/moar] # cd /

    [root@quickpwn] (0 MB) [/] # umount /mnt/iphone/

    [root@quickpwn] (0 MB) [/] #
    Last edited by unl0cker; 01-06-2009 at 10:07 PM. Reason: typo
    .



 

 

Similar Threads

  1. MacNN: Pioneer trots out wall-mounting iPhone, iPod speaker
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 08-25-2010, 04:30 PM
  2. Using iphone with linux
    By truehybridx in forum iPhone Linux (iDroid)
    Replies: 4
    Last Post: 02-15-2009, 06:00 AM
  3. Kernel panic when mounting iphone SDK
    By yaazz in forum Using Leopard
    Replies: 8
    Last Post: 02-04-2009, 05:03 PM
  4. iPhone and Linux?
    By haldor64 in forum Free Toolchain Software (Cydia App's)
    Replies: 0
    Last Post: 09-12-2007, 03:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 02:39 PM.
twitter, follow us!