Macs, Modularity and More

Finding download location of firmware

I've been asked how I find the download of the Apple firmware for iPhone updates. There's no magic in it - all you need to do is run an HTTP proxy, and configure your network preferences to go through that, and you can read off the logs where you're accessing it from. However, there's an easier way.

The Apple software update site URL is http://phobos.apple.com/version, which returns an XML file containing the locations of products that are downloadable. There's quite a lot of XML verbosity in here, but you can easily find out from this list which ones are relevant to you. For example, if you wanted to look for iPhone updates, then you can use grep to find out. Here's what I do:

Get the current version file

curl -L http://phobos.apple.com/version

Grep it for iPhone installs

egrep iPhone.*ipsw

Strip out the tags

awk -F'>|<' -- '{print $3}'

Sort and uniquify

sort -u

You can do this all in one line by piping, or write intermediary results to files to taste. Here's what it looks like when it comes together: