my experiment in custom iPhone ringtones via linux

thanks to recent nautilus (I assume is responsible – as seen in Ubuntu Lucid Lynx) ability to view the iPhones file paths, we can try this (typing this as I go, so this is draft on-the-fly quality notes)

* create an m4a file (I made mine exactly 40seconds according to audacity and saved as a .wav, then used faac to convert to m4a (faac in.wav –title “ringtone experiment” -o tone.m4a ; mv tone.m4a tone.m4r)

* copy tone into iPhone://iTunes_Control/Ringtones/tone.m4r

* edit iPhone://iTunes_Control/iTunes/Ringtones.plist to add in the details of the new ringtone. Fortunately I had an existing one already, so I just copied that – updating the GUID (I changed one character), the Name (“funky new ringtone”) and the Total Time (40000) fields.

…and bingo, the ringtone is visible in the settings (selectable, plays), but does not lock in as the ringtone to use! ok, clearly some work needed.

incidentally, this is a 32GB iPhone 3Gs with iOS4.0.2, never been jailbroken or anything underhanded done to it before. It was unlocked from the carrier a few days ago (thanks .au law) and that required a lengthy restore, but otherwise smooth.

…ok, so back to it: plugged it into iTunes (Mac) – it couldn’t read from the device (an error!)

…rebooted phone – and the new ring tone now works correctly. YAY! =) is this success?

…plugging it into iTunes again and… it’s all “Verifying iPhone” at me – something I don’t generally recall. …ok, it’s backing up as normal now…

and the ringtone tab in iTunes tells me it doesn’t know about the tone I added in, it’s syncing, so I suspect it’ll delete my added tone…

…and checking in my iPhone after it’s done, what do you know – my custom added ringtone is all gone. Checking back via linux – and the tone.m4r file has been deleted, Ringtones.plist has been completely rewritten.

So, I assume (not surprisingly at all) that iTunes needs to know about it, as the authorative master, and tell the iPhone how it’s gonna be. This fits with my observed philosophy of the iPhone – as an adjunct to the master information on the computer.

so, round 2… I add the m4r into the iTunes library – it automatically adds it in as a ringtone – that’s nice. I assume iTunes assumed it was a ringtone by the file extension. And in the iPhone tab it shows up as available to be sync’d… and bingo. it works.

ok, so not a pure linux solution – unless you never sync your phone to iTunes anyway – but it DOES let you make a custom ringtone without requiring garageband. That’s something isn’t it?

And I assume the method would work under windows too… anyone want to give it a go and get back to me? :)

3 thoughts on “my experiment in custom iPhone ringtones via linux

  1. Cafuego

    Yup, it works via windows as well. An m4r file is seen as a ringtone by iTunes and synced. However, I believe there are bitrate restrictions on the ringtone – must be 64K – for it to work.

    Or at least that was the case with iOS3 and iTunes 8, back when I did it.

    I used ffmpeg with FAAC support:

    ffmpeg -i ringtone.wav -acodec libfaac -ab 64K ringtone.aac
    mv ringtone.aac ringtone.m4r

    Reply
  2. nemo Post author

    my experiment which works was a 141K rate, iOS4, iTunes9 on Mac.

    I wonder which part of those changes is the important?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>