iPhone OS 2.0 and jailbreaks

Recently I bought an iPod touch. It originally came with OS 1.1.4 and as soon as Apple made the 2.0 software available (and downloadable), I upgraded.

While the new iTunes App Store is a welcome addition, I found most of the applications not very useful to me. While some like Remote, Facebook, Last.fm or eReader are awesome, I have yet to see applications on the store that fully unleash the power of the iPhone/iPod platform. For example, I’m waiting for a PDF reader that can fetch files from the local disk.

Here comes the power of jailbreak. There are so many things one can do with a jailbroken box. For example, with OpenSSH I can upload e-books to my iPod and bypass the limitations of eBook.app (it only likes e-books purchased from two web sites, but I have a few books that I legally downloaded from manybooks.net licensed under Creative Commons). I can also install Light HTTPd to serve PDFs locally that I can browse using Safari. It is very convoluted but it works.

Apple: if you read this, please lift all the absurd restrictions from the iPhone/iPod software and let people unleash the true power of this amazing portable platform.

iTunes Plus: Is DRM dead, finally?

Today, while I was looking through my e-mails, I realized that one from the Apple iTunes Store had been sitting unread for a couple of days in my inbox. I usually don’t pay much attention to this kind of e-mails but I was bored enough to go and give it a try.

The e-mail was the announcement on the availability of iTunes Plus for the Spanish iTunes Store. I was so curious that I saw myself firing iTunes on Mac OS X up even before I finished on reading the e-mail. I looked around a little bit but wasn’t able to find any trace of any 1,29€ songs, anywhere. I searched for Paul McCartney, Coldplay and the like, but all I could find were the traditional 0,99€ songs. I felt disappointed, but after a closer look, I could find an iTunes Plus link on the Quick Links section on the main page, so badly placed to even not realize it is there.

I decided to give it a chance, so I clicked on the link. Next, I was presented with the typical incomprehensible use license, clicked Accept and jumped in to search for some music, specifically music from Enigma. I could see that all the songs listed 1,29€ under the price column plus a “+” (plus) sign besides it. I double clicked on “Return to Innocence” in order to hear a preview but iTunes was stuck for so long trying to connect to the server that I finally gave up and clicked on Cancel. I felt lucky so I clicked on the Purchase button. In general, the purchase process is identical to the one used by DRM-protected iTunes Store, except that it took unusually longer to complete. I don’t know the exact reasons for this. It could be because of iTunes Plus Store uses different back-ends servers that are not scaled up well enough for the demand of service, could be something else. In any case, I felt really happy when I told iTunes to display the file on Finder and saw the extension was “.m4a” instead of “.m4p” (typical of DRM-protected songs). The sound quality seems pretty good at 256kbps in AAC digital format and since MPlayer, Rhythmbox and many other open source, free players can play unprotected AAC songs with no trouble at all, it means this is big step forward in the right direction towards a DRM-free world (at least in the music world).

It was about time for the music industry to realize that DRM (Digital Restrictions Management) is not the answer. Finally!

Compiling audio/mt-daapd under NetBSD with Zeroconf support

NetBSD ports collection includes audio/mt-daapd, a nice and straightforward implementation of Apple’s DAAP protocol for streaming music to iTunes. The only problem is that audio/mt-daapd is not compiled with Zeroconf support by default. In NetBSD, net/howl provides an implementation of Apple’s Zeroconf (also known as Rendevous or Bonjour).

In order to compile audio/mt-daapd under NetBSD with Zeroconf support, I first had to compile and install net/howl:

# cd /usr/pkgsrc/net/howl
# make install

Once net/howl is installed, I had to modify the Makefile file for audio/mt-daapd such as that howl support is enabled. This involves passing --enable-howl to the configure script and pointing it to the non-standard directory where the howl include files are — /usr/pkg/include/howl.

So, I edited /usr/pkgsrc/audio/mt-daapd/Makefile and after the line that reads:


I inserted:

CONFIGURE_ARGS+= --enable-howl
CONFIGURE_ARGS+= --with-howl-includes=${LOCALBASE}/include/howl

Before the line that reads:

.include "../../mk/pthread.buildlink3.mk"

I added:

.include "../../net/howl/buildlink3.mk"


# cd /usr/pkgsrc/audio/mt-daapd
# make install

I had to make some changes in order to get howl and mt-daapd start automatically during boot.

I added the following lines to /etc/rc.conf:

daapd_flags="-c /etc/mt-daapd.conf"

Next, I copied /usr/pkg/share/examples/mt-daapd/mt-daapd.conf to /etc/mt-daapd.conf and customized it — for example, to change the server name, specified by the servername directive.

I also had to create the /etc/rc.d/mt-daapd rc script to get mt-daapd started automatically during boot. It looks like this:

# $NetBSD: howl.sh,v 1.2 2006/01/01 18:27:53 tron Exp $

# PROVIDE: daapd
# REQUIRE: howl

. /etc/rc.subr


load_rc_config $name
run_rc_command "$1"

A sample configuration file that I’m using for mt-daapd/etc/mdaapd.conf — looks like this:

web_root         /usr/pkg/share/mt-daapd/admin-root
port             3689
admin_pw         mt-daapd
db_dir           /var/cache/mt-daapd
mp3_dir          /mnt/mp3
servername       NetBSD
runas            mtdaapd
playlist         /usr/pkg/etc/mt-daapd.playlist
#password        mp3
extensions       .mp3,.m4a,.m4p
#logfile         /var/log/mt-daapd.log
#rescan_interval 300
# always_scan    0
# process_m3u    0
# scan_type      0
# compress       0

Finally, either start both howl and mt-daapd, or reboot:

# /etc/rc.d/howl start
# /etc/rc.d/mt-daapd start

To test whether mt-daapd is working you can run the following command as root under Mac OS X:

# mDNS -B _daap._tcp

or the following command on Linux:

# mDNSBrowse _daap._tcp

iTunes 4.7.1 doesn't like Hymn-unprotected AAC music files

After upgrading to iTunes 4.7.1 from iTunes 4.7, DRM-protected files that were unprotected with Hymn, refuse to play. However, using JHymn seems a partial solution, as some files still refuse to get copied back to my iPod.

I have found the following page from the Hymn Project:


In this page, the reader is instructed to remove the following atoms from unprotected M4A files in order to be playable under iTunes 4.7.1:


To do so, we will use JHymn. We must instruct JHymn to re-scrub the entire music library, looking for M4A files that were already unprotected, in order to remove any left atoms that trigger iTunes protection countermeasures.

Removing FairPlay protection from iTunes music files

Files purchased through the iTunes Music Store are digitally protected so they can only be played on the computer where they were purchased from, or any legal iPod attached to the system.

FairPlay is Apple’s Digital Rights Management (DRM) technology used to protect music files bought from the iTunes Music Store. Files purchased through the iTunes Music Store are digitally protected so they can only be played on the computer where they were purchased from, or any legal iPod attached to the system.

However, there’s a GPL-licensed program called Hymn which is able to remove this DRM protection from files purchased via iTMS (iTunes Music Store) with no quality lose. This little jewel can be downloaded from:


and it’s available both in source code and pre-compiled for Mac OS X and Windows.

Hymn requires an iPod to be attached to the system in order to extract the keys used to encrypt the music files content. Thus, the easiest way to use Hymn is attaching my iPod to my PowerBook, downloading hymn’s binary image for Mac OS X from the web site, launch hymn and then drop into it the protected music files (Hymn sports a nice Cocoa interface),.

A protected music file has a “.m4p” extension meaning the content is protected. When dropping a file with a “.m4p” extension into Hymn, the file will be decrypted and a corresponding, unprotected “.m4a” file will be stored at the same location. This new “.m4a” file can be played on any system which supports the AAC encoding audio format. Any Mac OS X computer or iPod will do.