Ipod Video

From YobiWiki
Jump to navigation Jump to search

Hardware

  • From the serial number I can see this is a iPod Video 30G of the initial fifth generation (not 5.5g)

Tools

  • gnupod-tools - command-line tools for the iPod family of portable music players
    • Works well and sync with iTunesDB
  • gtkpod - manage songs and playlists on an Apple iPod
    • Seems to work, didn't try much
  • tripod - iPod photo uploader
    • I get KDE crashes :-(
  • ipod - tool for retrieving informations from iPods
    • Detection works well, but no idea what to do with normal mode
      The default action is to create an IpodDeviceEventListener object and respond to iPod/HAL signals
  • banshee - Audio Management and Playback application
  • banshee-daap - Audio Management and Playback application (DAAP sharing plugin)
  • kipi-plugins - contains IpodExport: Export images to an ipod device
  • gpixpod - Organize photos on your iPod, freely!
    • Not on Debian but Ubuntu...
    • deb can be downloaded here and installed on Debian sid
    • Works well, but I had to force the iPod model in Edit->Preferences
  • python-gpod - a library to read and write songs and artwork to an iPod
  • python-ipod - ipod library

First time

scsi 3:0:0:0: Direct-Access     Apple    iPod             1.62 PQ: 0 ANSI: 0
SCSI device sdb: 58605120 512-byte hdwr sectors (30006 MB)
sdb: Write Protect is off
sdb: Mode Sense: 68 00 00 08
sdb: assuming drive cache: write through
 sdb: [mac] sdb1 sdb2 sdb3
sd 3:0:0:0: Attached scsi removable disk sdb
sd 3:0:0:0: Attached scsi generic sg2 type 0
# file -s /dev/sdb1
/dev/sdb1: Apple Partition data (block size: 0): 
           first type: Apple_MDFW, 
           name: firmware, 
           number of blocks: 131072, 
           second type: Apple_HFS, 
           name: disk, 
           number of blocks: 58473976,
# file -s /dev/sdb2
/dev/sdb2: data
# file -s /dev/sdb3
/dev/sdb3: Macintosh HFS Extended version 4 data last mounted by: '10.0', 
           created: Thu May 24 11:40:21 2007, 
           last modified: Fri May 25 10:54:01 2007, 
           last checked: Thu May 24 20:40:21 2007, 
           block size: 4096, 
           number of blocks: 7309247, 
           free blocks: 7302027

Trying ipodpatcher:

$ ./ipodpatcher -l
ipodpatcher v1.0 with v1.1 bootloaders - (C) Dave Chapman 2006-2007
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

[INFO] Scanning disk devices...
[INFO] Ipod found - Video (aka 5th Generation) ("macpod") - /dev/sdb
[INFO] Reading partition table from /dev/sdb
[INFO] Sector size is 512 bytes
[INFO] Part    Start Sector    End Sector   Size (MB)   Type
[INFO]    0              63        131134        64.0   Empty (0x00)
[INFO]    1          131136      58605111     28551.7   HFS/HFS+ (0xffffffff)
[INFO] Ipod model: Video (aka 5th Generation) ("macpod")
[INFO] ************************************************************************
[INFO] *** WARNING FOR ROCKBOX USERS
[INFO] *** You must convert this ipod to FAT32 format (aka a "winpod")
[INFO] *** if you want to run Rockbox.  Rockbox WILL NOT work on this ipod.
[INFO] *** See http://www.rockbox.org/twiki/bin/view/Main/IpodConversionToFAT32
[INFO] ************************************************************************

Listing firmware partition contents: 

Image 1:
    Main firmware - 7500800 bytes
Image 2:
    RSRC - 5242880 bytes
Image 3:
    AUPD - 1074176 bytes
Image 4:
    HIBE - 33556480 bytes

Macpod to winpod

My ipod was formatted for Mac so I had to install iTunes on a Windows machine, I skip nasty details, the only Windows I have is at the office, the enterprise proxy blocking apple store website, having to go through a VPN thanks to openvpn, etc)
Just start iTunes, plug the iPod and the soft proposes to "restore" it.
now I get:

scsi 2:0:0:0: Direct-Access     Apple    iPod             1.62 PQ: 0 ANSI: 0
SCSI device sdb: 58605120 512-byte hdwr sectors (30006 MB)
sdb: Write Protect is off
sdb: Mode Sense: 68 00 00 08
sdb: assuming drive cache: write through
 sdb: sdb1 sdb2
sd 2:0:0:0: Attached scsi removable disk sdb
sd 2:0:0:0: Attached scsi generic sg2 type 0
# file -s /dev/sdb1
/dev/sdb1: data
# file -s /dev/sdb2
/dev/sdb2: x86 boot sector, 
           code offset 0x3c, 
           OEM-ID "*UOKJIHC", 
           sectors/cluster 8, 
           Media descriptor 0xf8, 
           heads 255, 
           hidden sectors 160650, 
           sectors 58444470 (volumes > 32 MB) , 
           FAT (32 bit), 
           sectors/FAT 57019, 
           serial number 0x38786c67, 
           label: "IPOD       "
$ ./ipodpatcher -l
ipodpatcher v1.0 with v1.1 bootloaders - (C) Dave Chapman 2006-2007
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

[INFO] Scanning disk devices...
[INFO] Ipod found - Video (aka 5th Generation) ("winpod") - /dev/sdb
[INFO] Reading partition table from /dev/sdb
[INFO] Sector size is 512 bytes
[INFO] Part    Start Sector    End Sector   Size (MB)   Type
[INFO]    0              63        160649        78.4   Empty (0x00)
[INFO]    1          160650      58605119     28537.3   W95 FAT32 (0x0b)
[INFO] Ipod model: Video (aka 5th Generation) ("winpod")

Listing firmware partition contents: 

Image 1:
    Main firmware - 7500800 bytes
Image 2:
    RSRC - 5242880 bytes
Image 3:
    AUPD - 1074176 bytes
echo -e "p\nq"|fdisk /dev/sdb
 
The number of cylinders for this disk is set to 3648.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): 
Disk /dev/sdb: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes 

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          10       80293+   0  Empty
/dev/sdb2              11        3648    29222235    b  W95 FAT32

Tests ipodlinux

  • I repartitioned the iPod as explained here
    but the svn server seemed to be down so I could not try further.

Tests Rockbox

  • I installed rockbox by following these instructions
    • To start the Apple firmware, maintain the hold switch during reboot
  • I added the FrostBox theme from rockbox-themes
  • I added the tango iconset from rockbox iconsets
  • Rockbox will scan the whole partition and find files in itunes DB too, you can update the DB through settings menu

Tests loader2

cf http://www.ipodlinux.org/Loader_2 it is possible to get both rockbox and ipodlinux together...
Very easy to install:

wget http://www.ipodlinux.org/images/b/b3/Ipodloader2-2.5.tar.gz
tar xzf Ipodloader2-2.5.tar.gz
./ipodpatcher /dev/sdb -ab loader.bin

Test ipodlinux 2

Ok following the instructions for 5.5G was much easier!

  • Install loader 2, cf previous point
wget http://de.dataghost.com/ipl/exp20070305/kernel-dg-all-iPods-improved-20070305.bin
wget http://www.josh.sys-techs.com/ipl/ipod_fs_220606.tar.gz
mount /dev/sdb3 /mnt/ipod
cd /mnt/ipod
tar xzvf path/to/ipod_fs_220606.tar.gz 
cd -
sudo cp kernel-dg-all-iPods-improved-20070305.bin /mnt/ipod/linux.bin
wget http://josh.sys-techs.com/svnbuilds/podzilla2-1414.gz
wget http://josh.sys-techs.com/svnbuilds/appearance-1262.zip
wget http://josh.sys-techs.com/svnbuilds/pzmodules-1414.zip
mount /dev/sdb3 /mnt/ipod
install -m 755 podzilla2-1414 /mnt/ipod/bin/
mkdir -p /mnt/ipod/usr/lib /mnt/ipod/usr/share
( cd /mnt/ipod/usr/lib; unzip $OLDPWD/pzmodules-NNN.zip )
( cd /mnt/ipod/usr/share; unzip $OLDPWD/appearance-NNN.zip )
ln -s /bin/podzilla2-1414 /mnt/ipod/bin/podzilla

gnupod

mount /dev/sdb2 /mnt/ipod
gnupod_INIT -m /mnt/ipod
gnupod_addsong -m /mnt/ipod  .../music/*mp3
mktunes -m /mnt/ipod
umount /dev/sdb2
eject /dev/sdb2

So what you add is also available through the regular Apple firmware

Contacts

Export from LDAP server to iPod

  • Go to phpLDAPadmin interface
  • export
    • BaseDN: dc=addressbook,dc=yobi,dc=be
    • Search scope: sub
    • Search Filter: (objectClass=person)
    • Save as file
    • Export format: vCard 2.1
recode UTF8..latin1 addressbook.vcf
csplit --prefix=contact --suffix-format="%04d.cvf" addressbook.vcf /BEGIN:VCARD/ {*}
cp contact*.vcf /mnt/ipod/Contacts/contacts.vcf

Tips

  • Disconnect (from http://home.c-otto.de/ipod/) :
    With Linux you normally get the "Don't disconnect" message whenever you insert the cable/dock. With the "eject" tool (for ejecting CD drives) you can disconnect the ipod from your computer but still have the power connection to recharge the batteries.
  • Reset (from http://www.apple.com/support/ipod/five_rs/)
    1. Toggle the Hold switch on and off. (Slide it to Hold, then turn it off again.)
    2. Press and hold the Menu and Select buttons until the Apple logo appears, about 6 to 10 seconds. You may need to repeat this step.
  • Disk Mode
    First apply reset as above then when the Apple logo is shown, hold select+play buttons several seconds.
    To exit disk mode it seems you've to reset again.
  • Backup macpod
dd if=/dev/sdb of=mbr-video30gb-mac.bin bs=512 count=1
dd if=/dev/sdb1 of=part1-firmware.bin
dd if=/dev/sdb2 of=part2.bin
  • Backup winpod
dd if=/dev/sdb of=mbr-video30gb-win.bin bs=512 count=1
dd if=/dev/sdb1 of=part1.bin
  • mkdir -p /mnt/ipod/iPod_Control/Artwork