I’ve been trying to find a way to detect what kinds of iPods are plugged into a Mac (or PC). Turns out that every iPod (apart from the iPod Shuffle) has a hidden SysInfo file, which contains information about the device. And, with the aid of some friends with iPods, I have managed (I think) to come up with a way of detecting which iPod is which, using the SysInfo file. It’ll even detect the colour of the iPod.

The secret is to look at the ModelNumStr entry in the SysInfo file. First, some info about SysInfo.

You can find the SysInfo file on an iPod by making the iPod mount as a hard disk, and browsing to the file at /iPod_Control/Device/SysInfo. If you’re on a Mac, you can use this handy little AppleScript application I wrote, which will ask you to select the iPod from a list of currently connected ejectable drives. It’ll then copy (not move!) the SysInfo file from the iPod to your desktop. (Note: I make absolutely no guarantees about this little app – I just created it to make life easier for my friends who don’t like using Terminal. Use it at your own risk.)

A SysInfo file looks a little something like this:


BoardHwName: iPod M25
pszSerialNumber: XXXXXXXXXXX
ModelNumStr: MA003
FirewireGuid: 0x000A2700147FDCA9
HddFirmwareRev: BU011A
RegionCode: FB(0x001A)
PolicyFlags: 0x00000000
buildID: 0x06118000 (6.1.1)
visibleBuildID: 0x01118000 (1.1.1)
boardHwRev: 0x00000000 (0.0 0)
boardHwSwInterfaceRev: 0x000B0005 (0.0.11 5)
bootLoaderImageRev: 0x00000000 (0.0 0)
diskModeImageRev: 0x00000000 (0.0 0)
diagImageRev: 0x00000000 (0.0 0)
osImageRev: 0x00000000 (0.0 0)
iPodFamily: 0x00000000
updaterFamily: 0x00000000

That’s for a white 60Gb iPod Video (aka the 5th generation iPod).

So we’re most interested in the ModelNumStr line:


ModelNumStr: MA003

This code actually bears a strong similarity to the ID code you’ll see when you view an iPod in your shopping basket on the Apple Store. It’s the ID Apple use to refer to that particular iPod – so different coloured iPods have different model numbers, for example.

From the SysInfo files I’ve gathered from friends and the Internet, I’ve found that sometimes the ModelNumStr value doesn’t quite match the known model number for an iPod. Usually, this means that the model number begins with M, but the ModelNumStr begins with P. However, the rest of the ModelNumStr matches perfectly.

So, I propose that if you take the ModelNumStr value, strip off the first character (usually an M or a P), and compare it with the model numbers in the list below (likewise with the first character removed), then you’ll be able to deduce what iPod is plugged in. It’s worked for all the iPods I’ve tested so far.

There’s an exception to this rule – first and second generation iPods don’t have the ModelNumStr line in their SysInfo files. For these iPods, you’ll need to use an alternative approach. Take a look at the boardHwSwInterfaceRev line in the SysInfo files. If the value of boardHwSwInterfaceRev begins with 0×0001, then you have a first-gen iPod. If it begins with 0×0002, then you have a second-gen iPod. This doesn’t detect the disk size or features of the iPod, but it does still allow you to work out which generation of iPod is connected. You can use boardHwSwInterfaceRev as a general fallback for checking the generation of iPods – where I know it, the corresponding value is in the table below.

Not all of the info below has been checked, so if you have an iPod in the list, please do post a comment if you can confirm (or refute) any of the model numbers etc.

Especially usefull to confirm are the HP iPods, which are a bit more of an unknown. I’ve found the SysInfo file for one HP iPod posted on the web, and it matched the rules above, but I’d like to test more!

All of the information I have gathered, together with what it all means, can be found in my Big List Of iPods.