dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Wiki > Main > IpodItunesCommunication (compare)

Difference: IpodItunesCommunication (r9 vs. r8)

Ipod/Itunes Communication


This page attempts to document how itunes detects that a specific USB device is an ipod.

The knowledge in this page was gained during experimental attempts to get itunes to recognise non-ipod Rockbox devices running the Rockbox software USB stack and sync files to it as if it were an ipod.

How to mimic an ipod

Each of the following must be implemented in order for itunes to accept a USB device as an ipod.

Partition layout

Your partition layout needs at least the following:

  1. A data partition that must be partition 1 (unless partition 1 is of type 0). The physical location on disk is not important.
  2. A partition of type 0 - the size, position and contents isn't checked by iTunes.

The following has been confirmed working:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1010      246409+   b  W95 FAT32 - (formatted as FAT32)
/dev/sdb2            1011        1012         488    0  Empty
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               2        1000      243756    b  W95 FAT32 - (formatted as FAT32)
/dev/sdb2            1001        1012        2928   84  OS/2 hidden C: drive
/dev/sdb3               1           1         213+   0  Empty

And this one, which is working on the main memory of an E280:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1015     7803289    b  W95 FAT32
/dev/sdb2            1016        1020       38440   84  OS/2 hidden C: drive
/dev/sdb3            1021        1021        7688    0  Empty

XML info document



USB IDs of the various Ipod models are available on the DeviceDetection page.

Filesystem contents

It looks like the only thing that is absolutely required is the /iPod_Control directory. Everything else will be created by iTunes as needed.

Having fun by changing the ipod's capabilities

The XML info document describes the various supported file formats and other features of the ipod. The following changes have been attempted:


  • Removing the AAC capability from the ipod.
  • Increasing the maximum samplerate for WAV files to 96KHz


  • Itunes will play MP2 files, but refuse to sync them to an ipod. Simply copying the MP3 info from the XML file and replacing "MP3" with "MP2" didn't succeed in making itunes sync MP2 files.

Setting the clock

  • Itunes sets the clock using a vendor specific WRITE BUFFER command.
  • To set the clock from a linux system, install sg3-utils, make a (binary) file containing (in hex here, date = 17 March 2009, 15:17:27) : 07 D9 00 4B 04 0F 11 1B 00 00 00 00
  • The fields are as follows:
    • Year 2 bytes
    • Days since 1 Jan 2 bytes
    • timezone 1 byte (0==London, 4==Paris, others still unknown)
    • hour 1 byte
    • minutes 1 byte
    • seconds 1 byte
    • four zero bytes
  • run "sg_raw --send=12 -i datefile /dev/sdb 3b 01 00 0c 00 00 00 00 00 00" (as root, with of course the ipod being /dev/sdb here)


nano-3g-1.1.3.xmlxmlnano-3g-1.1.3.xmlmanage 11.8 K 14 Mar 2009 - 19:52JonasHaeggqvist XML info document from Ipod Nano 3G firmware v1.1.3

r11 - 21 Mar 2009 - 17:48:01 - FrankGevaerts

Revision r9 - 17 Mar 2009 - 19:50 - JonasHaeggqvist
Revision r8 - 17 Mar 2009 - 15:40 - FrankGevaerts
Copyright by the contributing authors.