Many advanced users prefer to use firmware files when updating their iOS devices to the latest version, and every time an iOS update comes out we post direct download links for the latest versions. Every once in a while we get questions from users who wonder how we find those file links, since they’re tucked away on Apple’s download servers, seemingly hidden from the public view. Well, there isn’t any magic to this and it’s easily done through the command line with a simple trick that pulls a full list of IPSW files that are available directly from Apple. At it’s most basic form it lists literally everything, but with some minor changes to the command syntax you can sort for specific iOS versions or for files that match a specific piece of hardware.
This likely won’t be useful to everyone, but for users who like working with IPSW, or for systems administrators who need to download a bunch of different firmware files to perform bulk updates on a bunch of hardware, this should be helpful. For everyone else, it can be a lesson to further prove we at osxdaily are nerds who spend too much time thinking about this stuff.
If you’re going to try these yourself, copy the full syntax block and paste it into the command line. The commands look broken apart on the web, but they should paste fine into the command line as a single command string on a single line.
Get a List All IPSW Files for All iOS Devices
The following command string returns a fairly clean list of quite literally every single IPSW file for every iOS device, iPad, iPhone, iPod, you name it, hosted by Apple’s servers:
curl http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.appserver.client.MZITunesClientCheck/version | grep ipsw | sort -u | sed 's/<string>//g' | sed 's/<\/string>//g' | grep -v protected
To walkthrough the syntax, curl is accessing the “version” list from Apple’s server URL (this is the same URL that is hit by iTunes when it detects an update is available, by the way). That list is then passed through the grep command to match for “ipsw” but discount ‘protected’, sort -u makes sure the returned list items is unique, and finally, the results are passed through ‘sed’ to clean up some useless XML from the results. Executing that command just dumps everything to the command line, you can pass it through ‘more’ to make it more readable, or perhaps preferable to some users is to redirect it into a text file like so:
curl http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.appserver.client.MZITunesClientCheck/version | grep ipsw | sort -u | sed 's/<string>//g' | sed 's/<\/string>//g'| grep -v protected > ~/Desktop/ipswlist.txt
That will dump everything into a text file named ‘ipswlist.txt’ on the desktop.
Get a list of all iPhone IPSW files from the command line
Don’t care about the other iOS files and just want a list of iPhone IPSW? Use grep for iPhone and the rest of the command stays the same:
curl http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.appserver.client.MZITunesClientCheck/version | grep ipsw | grep iPhone | sort -u | sed 's/<string>//g' | sed 's/<\/string>//g' | grep -v protected
Add “> ~/Desktop/iPhoneIPSW.txt” to the end to send the results to a text file on the desktop.
Retrieve a list of all iPad IPSW available on Apple’s Servers
Similar to using grep to search for iPhone, specifying ‘iPad’ will return only iPad firmware files instead:
curl http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.appserver.client.MZITunesClientCheck/version | grep ipsw | grep iPad | sort -u | sed 's/<string>//g' | sed 's/<\/string>//g' | grep -v protected
As before, you can send that into a text file if desired by adding “> ~/path/to/text.txt” to the end.
Get a list of only a specific iOS version from Apple
Similar to searching for specific iOS hardware, you can also return specific iOS versions if desired. For example, the following syntax will only return all IPSW results that match iOS 7.0.4, noted by that version string in the second grep:
curl http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.appserver.client.MZITunesClientCheck/version | grep ipsw | grep 7.0.4 | sort -u | sed 's/<string>//g' | sed 's/<\/string>//g' | grep -v protected | awk '{$1=$1}1'
Apple is quick with pushing out updates and because of the Over-the-Air mechanism most people notice new updates almost right away when they become available. Nonetheless, some users use a variation of the above trick to monitor for new iOS releases by periodically querying for various version strings that do not yet exist on Apple’s servers. That’s a bit beyond the scope of this article though.
There may be cleaner and/or better ways to do this, chime in the comments if you have another solution.
Email this How to List of All IPSW Files from Apple Servers Using the Command Line to a Friend! Receive Articles like this one direct to your email box! Subscribe for free today!
Tidak ada komentar:
Posting Komentar