Ipod Touch/phone How-to Usb Music Transfer!!! WORKS

Discussion in 'Linux' started by techclown, Nov 6, 2009.

  1. techclown

    techclown New Member

    Joined:
    Jun 21, 2009
    Messages:
    20
    Likes Received:
    0
    Device:
    2G iPod touch
    Linux iPhone Sync Setup
    Well, here's the *basic* outline for Ubuntu Jaunty ...

    UPDATE:
    I have uploaded some debs I made for Ubuntu Jaunty here, not sure if they will work for anyone else, though:
    http://www.[PIRACY.4s].com/file/146230377/fd0fe975/Ubuntu_Jaunty_iPhone_Sync.html


    Add these to your /etc/apt/sources.list:
    deb http://ppa.launchpad.net/jonabeck/ppa/ubuntu intrepid main
    deb-src http://ppa.launchpad.net/jonabeck/ppa/ubuntu intrepid main

    Then execute commands:
    $ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com F0876AC9
    $ sudo apt-get install ifuse

    Also install these packages now that you have that Repo:
    $ sudo apt-get install libiphone-utils iproxy



    Now reload udev rules:
    $ sudo udevadm control --reload-rules

    Reboot for good measure if you want to be sure.

    At this point you can already SSH into your iPhone via USB and mount the device.

    SSH via USB
    Plug in your iPhone, and then check if usbmuxd got automatically launched (if not, then something went wrong with the udev rules):
    $ ps ax | grep usbmuxd

    If it's running, you can now build a tunnel with iproxy:
    $ sudo iproxy 2222 22

    This will redirect the iPhone's SSH-Port (22) to localhost Port 2222. Now you can connect to the iPhone via USB:
    $ ssh -p 2222 root@localhost

    Ok, so that's SSH via USB sorted. Now, let's mount the iPhone.

    Create a mount point /mnt/ipod/ (GTKpod will want this path later) and make it user-accessable:
    $ sudo mkdir /mnt/ipod/
    $ sudo chmod 777 /mnt/ipod

    Let's edit a config file.
    $ sudo gedit /etc/fuse.conf

    -> Remove the "#" in front of "user_allow_other", save and exit.

    Next, open "System" -> "Administration" -> "Users and Groups" in Ubuntu Menu. Click on the little key at the bottom to unlock it for making changes. Then, select your username and click on "Manage Groups".

    Find the "fuse" group and double-click on it. Make a checkmark next to your name in the window that opens. Click on OK and close all dialogs. You're now in the "fuse" group.

    Next, completely log out and in again - do a reboot to be safe. This is important !

    Open up a terminal again. Let's verify we're really in the "fuse" group:
    $ id
    -> You should see some group names, among them should be "fuse".

    Now (if usbmuxd is still running), we can mount the iPhone:
    $ ifuse /mnt/ipod/

    You can now list the contents via 'ls /mnt/ipod'. You can also mount the root file system if you wish (for later steps just mount regularly, though):
    $ ifuse /mnt/ipod --root

    In order to unmount the device enter this command:
    $ fusermount /mnt/ipod/

    You can stop right here if you want. From here on things get a little nastier ...

    Music Sync with GTKpod (advanced)
    In order to be able to sync with GTKpod we will need a custom libgpod, and for this we (will most likely) need to compile gtk-doc, so let's download it first:
    $ wget http://ftp.gnome.org/pub/GNOME/sourc...c-1.11.tar.bz2
    (If your distribution comes with gtk-doc then just install that plus it's -dev package)

    Now let's unpack and compile GTK-DOC, you may require additional packages for this - you will need a brain and patience to figure this out
    $ tar xvjf gtk-doc-1.11.tar.bz2
    $ cd gtk-doc-1.11/
    $ ./configure
    $ make
    $ sudo make install (or use checkinstall if you know how)

    Ok, now we can compile ligpod:

    $ sudo apt-get remove gtkpod rhythmbox libgpod4 gtkpod-common

    Then, install the two libs:
    $ sudo apt-get install libgtk2.0-dev libiphone-devel

    Next, switch to the marcan-sandbox again and recompile it:
    $ git clone git://gitorious.org/~marcan/libgpod/marcan-sandbox/
    $ cd marcan-sandbox/
    $ git checkout origin/iphone30
    $ CFLAGS="-g -O0" sh autogen.sh --prefix=/usr

    Ok, let's compile the source:
    $ make

    Then follow the steps for "sudo checkinstall" from below again to create the DEB package and install it. Once you've the revised libgpod4 compiled and installed you can install the other software again:
    $ sudo apt-get install gtkpod rhythmbox
    $ git clone git://gitorious.org/~marcan/libgpod/marcan-sandbox/
    $ cd marcan-sandbox
    $ git checkout origin/iphone30
    $ CFLAGS="-g -O0" sh autogen.sh --prefix=/usr
    $ make
    $ sudo make install (or checkinstall if you know how)

    Ok, now mount the device with ifuse /mnt/ipod/ (if not still mounted) and create the iTunes_Control/Device directory:
    $ mkdir /mnt/ipod/iTunes_Control/Device/

    Then, get your UUID:
    $ lsusb -v | grep -i iSerial

    It's the first number and should be 40 characters long. Then, run:
    $ ipod-read-sysinfo-extended <uuid> <mountpoint>
    (mountpoint here is /mnt/ipod/)

    This should generate a file named iTunes_Control/Device/SysInfoExtended.

    Make sure it’s not empty and whatnot; it should be a large-ish plist (XML file) with a bunch of info.

    Finally, we need an app to sync - I'm using GTKpod. I wanted to use the distro package but it insisted on installing libgpod4, too, of which we just compiled a newer version up there. So, instead, I had to compile that from source, too (do not compile the libgpod that's also included):
    $ svn co https://gtkpod.svn.sourceforge.net/svnroot/gtkpod gtkpod
    $ cd gtkpod/gtkpod/trunk/
    $ rm -rf .svn/
    $ ./autogen.sh
    $ make
    $ sudo make install (or use checkinstall if you know how)

    Alright, we're set. Make sure you have your iPhone plugged in, usbmuxd is running and then mount the iPhone to /mnt/ipod/. Next, launch GTKpod.

    It should show your device, click on "Read" (or something like that, I have a non-english installation) and you will be able to see that GTKpod indexes your songs on the iPhone in the status bar. Once done, it will display the contents. Do not worry about all the debug information that gets displayed to you - it's only for developer purposes and troubleshooting).

    You can now fill up your iPod app with music using GTKpod. Don't forget to safely remove the device via right-click in GTKpod when you're done. The next time you launch the iPod app it will take a little while to update the database but then you're set. The reason for this is that libgpod is currently for OS 3.0, so if you sync with 3.1.2 then the iPhone will need to update the database when you launch the iPod app. Apparently the key for 3.1.2 music db is discovered, though, so this minor inconvenience should go away at some point in the future.

    THAT'S IT !!!

    USBmuxd automatically launches and terminates whenever you plugin or plug out the iPhone (at least, it should). If your iPhone automatically gets mounted with the Photo folder, too, just don't worry about it.

    Note
    The packages you need to compile the various sources can usually be found in their respective README's and INSTALL notes. Please also be warned that this is all very early alpha code. Whatever you do it's your own responsibility.
  2. mitchell209

    mitchell209 Active Member

    Joined:
    Jan 21, 2009
    Messages:
    8,024
    Likes Received:
    5
    Device:
    iPhone 4 (Black)
    Oh god, so long. Too bad I got rid of ubuntu again.

    Please Register or Log in to view images

    I'd try this out right now if I hadn't.
  3. dsm.iv.tr

    dsm.iv.tr New Member

    Joined:
    Aug 19, 2009
    Messages:
    3
    Likes Received:
    0
    Device:
    2G iPod touch
    +a million!

    The latest libgpod, gtkpod, and usbmuxd (plus dependencies) work very, very well. There's some quirks, but it's almost at a 1.0.0 release!

    I'm a much, much happier iPod Touch owner, now.
  4. techclown

    techclown New Member

    Joined:
    Jun 21, 2009
    Messages:
    20
    Likes Received:
    0
    Device:
    2G iPod touch
    nice to here yea sorry should of mention some may need dependencies but im glad it worked out
  5. mitchell209

    mitchell209 Active Member

    Joined:
    Jan 21, 2009
    Messages:
    8,024
    Likes Received:
    5
    Device:
    iPhone 4 (Black)
    Happy to say this works perfectly.

    Please Register or Log in to view images

Share This Page