# The sysinfo file

- The gtkpod Manual
- Getting started

Starting with the 2007 generation of iPods, libgpod needs an additional configuration step to correctly modify the iPod content. libgpod needs to know the so-called iPod "firewire id", otherwise the iPod won't recognize what libgpod wrote to it and will behave as if it's empty.

- 1.4.1.The iPhone and iTouch
- 1.4.2.The Classic and Nano3g

## 1.4.1.The iPhone and iTouch

- 1.4.1.1.Global Assumptions and Scope of this Tutorial
- 1.4.1.2.Compiling libgpod & gtkpod (subversion versions)
- 1.4.1.3.Determining the Firewire GUID
- 1.4.1.4.Making libgpod Aware of the Firewire GUID
- 1.4.1.5.gtkpod Revisited

### 1.4.1.1.Global Assumptions and Scope of this Tutorial

touch_ip -- denotes the IP address that is assigned to your iPod Touch (e.g. 192.168.0.27).

touch_mnt -- denotes the mount point to your iPod Touch (i.e. the directory the iPod is mounted on).

To make effective use of the following you have to jailbreak your iPod Touch first (in order to access it via SSH). This document won't go into detail on this topic. One possibility to do this using a computer that runs Microsoft Windows (XP) can be found at:

http://iphone.cricblogs.com/one-click-ipod-touch-jailbreak-for-windows-by-msbasher/

### 1.4.1.2.Compiling libgpod & gtkpod (subversion versions)

Install and compile libgpod and gtkpod from subversion. See Compiling and Installing|here for details.

Configure libgpod. The '--prefix' option will make sure that is not installed globally but locally within your home directory (note: replace '~' by the absolute path to your home directory):

    ~/libgpod$ ./autogen.sh --prefix=~/local

Otherwise make sure all dependencies are met ('gtk-doc' is a candidate likely to be missing, proper version of automake is another).

Repeat this process for gtkpod ('PKG_CONFIG_PATH' make sure it builds on the freshly compiled version of libgpod; again, replace '~' by absolute path to your home directory):

    ~/gtkpod$ PKG_CONFIG_PATH=~/local/lib/pkgconfig ./autogen.sh --prefix=~/local

    ~/gtkpod$ make && make install

Assuming that everything went well you should be able to start gtkpod:

    ~$ LD_LIBRARY_PATH=~/local/lib ~/local/bin/gtkpod

You won't be able to fully use it at this point so close it for now.

### 1.4.1.3.Determining the Firewire GUID

Connect your iPod Touch via USB (to your Linux machine) and issue the command:

    sudo lsusb -v | grep -i iSerial

This should print something similar to this:

    iSerial 3 fd98145617c113dc15ab151601001ff12354b139
    [ ... ]

The first 16 characters constitute the FirewireGUID, i.e. in this example the FwGUID is:

    fd98 1456 17c1 13dc

### 1.4.1.4.Making libgpod Aware of the Firewire GUID

Mount your iPod Touch via:

    sudo sshfs root@touch_ip:Media touch_mnt/ -o allow_other

Go to the directory 'iTunes_Control' and create (if it does not already exist) a directory named 'Device':

    ~/touch_mnt/iTunesControl$ mkdir Device; cd Device
    ~/touch_mnt/iTunesControl/Device$ echo "FirewireGuid: 0xfd98145617c113dc" > SysInfo

Test if libgpod is able to retrieve the FWGUID by changing into the 'tests' subdirectory of libgpod's source directory and runnning:

    ./test-firewire-id touch_mnt/

### 1.4.1.5.gtkpod Revisited

With your iPod Touch still mounted start up gtkpod once more:

    ~$ LD_LIBRARY_PATH=~/local/lib ~/local/bin/gtkpod

You should now be able to sync songs to your iPod Touch. After syncing is complete go into "Music" on your iPod Touch: The songs you have just synced won't show up at this point. To make them appear press and hold the "Home"-Button until the springboard is reloaded. Going to "Music" now will show your music.

Don't forget to unmount it after you're completely done.

Tutorial compiled by staciemonroe (tobias kreisel gmail com)

## 1.4.2.The Classic and Nano3g

There are two ways to set up the iPod to make libgpod able to find its firewire id.

The 1st one is mostly automated. First, make sure you have libsgutils installed before running configure/autogen.sh. If you built libgpod without it, install it and run configure/make/make install. You should now have an ipod-read-sysinfo-extended tool available. Run it with the iPod device path (eg /dev/sda) and the iPod mount point (eg /mnt/ipod) as arguments. This may require root privileges. ipod-read-sysinfo-extended will read an XMLfile from the iPod and write it as /mnt/ipod/iPod_Control/Device/SysInfoExtended. See http://ipodlinux.org/Device_Information for more details about the method used.

Having that file is enough for libgpod to figure out the iPod firewire id.

The 2nd method requires more manual intervention. First, you need to get your firewire id manually. To do that, run "sudo lsusb -v | grep -i Serial" (without the "") with your iPod plugged in, this should print a 16 character long string like 00A1234567891231. For an iPod Touch, this number will be much longer than 16 characters, the firewire ID is constituted by the first 16 characters. Once you have that number, create/edit /mnt/ipod/iPod_Control/Device/SysInfo (if your iPod is mounted at /mnt/ipod). Add to that file the line below:

    FirewireGuid: 0xffffffffffffffff

(replace ffffffffffffffff with the string you obtained at the previous step and don't forget the trailing 0x before the string)

Save that file, and you should be all set. Be careful when using apps which lets you manually specify which iPod model you own, they may overwrite that file when you do that. So if after doing that libgpod still seems to write invalid content to the iPod, double-check the content of that SysInfo file to make sure the FirewireGuid line you added isn't gone. If that happens, read it to the end of the file, and make sure libgpod rewrite the iPod content.

Once that is done, if you compiled libgpod from source, you can test that libgpod can find the firewire ID on your iPod by running

    libgpod/tests/test-firewire-id /ipod/mount/point