Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Bulk collection of iOS device details for Enterprise deployment iOS devices
The school I work for just took delivery of approximately fifty iPad's that required setup. One of the steps involved is collection of the Airport MAC address in order to permit them to connect to our wireless network.

Unfortunately, this isn't printed on the box, and Apple's iPhone Configuration Utility offers no way to do a bulk export particular details beyond the UDID of an iPad, iPhone or iPod touch.

I worked out how to do so on the command line and want to document the knowledge, as pasting them one at a time from IPCU isn't practical for any large scale deployments and I've seen no reference anywhere online to find out where iPhone Configuration Utility obtains its information.

I first ran iTunes in activation-only mode to activate the devices. You can enable this mode by entering the following command in Terminal:

defaults write com.apple.iTunes StoreActivationMode -integer 1

I then connected each iPad while iTunes was running in activation-only mode and gradually gained an entry for each device, sorted by UDID, in ~/Library/MobileDevice/Devices/ that contains the information displayed by the IPCU.

Once all devices were added, I ran the following command in Terminal to put in my clipboard the serial number and MAC address, sans colons, of each iPad 2 that has been connected whilst this account was logged in.
grep -r -i -h -B 3 -A 2 ipad2 ~/Library/MobileDevice/Devices | sed -n '/^$/!{s/<[^>]*>//g;p;}' | tr -d '\011' | sed 's/://g' | grep -v -e deviceSerialNumber -e deviceType -e deviceWiFiMACAddress -e iPad -e -- | sed '$!N;s/\n/ /' | pbcopy
This can then be fed in to our MAC address permissions list to allow for network access.

Unfortunately I need to run IPCU on each iPad again to install a configuration profile for our Mobile Device Management (MDM) suite (Jamf's Casper Suite 8.1), as Casper couldn't phone home or download the required certificates without WiFi access. Unless someone suggests otherwise, I think this is the easiest way to proceed, even if it involves plugging into a device twice.

You should be able to modify the script to get other information by first reviewing a sample file in ~/Library/MobileDevice/Devices and amending as you see fit. You'd also be able to change the reference to iPad2 in your first command to get other devices' details. Ideally, it should be possible to export this kind of information from IPCU as it is Apple's supposed solution to enterprise deployment issues. We can also pull up this kind of information in Casper, but an inventory will only occur when we have wireless access, and for a range of reasons it isn't possible to temporarily disable MAC address filtering in our environment without major headaches.

This was tested on 10.6.6 with the current version of the IPCU. Your mileage may vary a bit, though I doubt too much would change in the way these files are structured. For those who are interested, I ran fs_usage as root and opened IPCU, grepping for IPCU processes eventually pointed to the location of the information I wasn't able to find earlier. This location has much more information present than /Library/Preferences/com.apple.iPod.plist does.

[crarko adds: I haven't tested this one. I think we can all agree that Apple's tools and documentation for large-scale deployments are in serious need of work.]
    •    
  • Currently 3.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[7,419 views]  

Bulk collection of iOS device details for Enterprise deployment | 6 comments | Create New Account
Click here to return to the 'Bulk collection of iOS device details for Enterprise deployment' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Bulk collection of iOS device details for Enterprise deployment
Authored by: marook on Apr 04, '11 01:47:37PM

I don't get that data for 'ipad' or 'iphone'.. :-(
I get a lot of application bundle info.

Anyway, why not simply have an open wifi SSID with limited (if needed) connectivity, say a VLAN only allowing access to a provisioning portal?

We use TarMac MDM and simply have it on an open wifi network.
You need to activate the device, but here the users do so themself. (Maybe yours is hand-out devices?)

---
/Marook



[ Reply to This | # ]
Bulk collection of iOS device details for Enterprise deployment
Authored by: timmy_pete on Apr 13, '11 04:16:27PM
I've edited the command a bit to make it not so iPad 2 centric and more Excel friendly. The below command will list all devices in the form Serial Model MAC (minus colons). The tabbing means you can paste direct into Excel.

grep -r -h -A 5 deviceSerialNumber ~/Library/MobileDevice/Devices | sed -n '/^$/!{s/<[^>]*>//g;p;}' | tr -d '\011' | sed 's/://g' | grep -v -e deviceSerialNumber -e deviceType -e deviceWiFiMACAddress -e -- | awk '{printf("%s%s", $0, (NR%3 ? "\t" : "\n"))}' | pbcopy

@Marook - that would have been my preferred solution but our infrastructure team couldn't implement it in enough time. We have a handout model and for junior school children. I'm also using VLOOKUP in Excel to merge this data with the rest I've collected: serials scanned by box barcode (remember to remove the leading S), asset tags, purchasing details, et cetera.

[ Reply to This | # ]

Bulk collection of iOS device details for Enterprise deployment
Authored by: donifar on Jul 12, '12 07:53:01AM

I tried running this script from terminal, but it is pasting nothing. I don't seem to have a file in \library\MobileDevice\Devices any help please?



[ Reply to This | # ]
Bulk collection of iOS device details for Enterprise deployment
Authored by: timmy_pete on Jul 12, '12 06:52:56PM
Do any files reside in the \library\MobileDevice\Devices folder for your user account? The Tilde (~) signifies a user account Library rather than the one at the root-level of your boot volume. Otherwise, what version of Mac OS X, iTunes and iPhone config utility are you using? I haven't needed this script for some time so am not sure how it behaves in Lion.

[ Reply to This | # ]
Bulk collection of iOS device details for Enterprise deployment
Authored by: donifar on Jul 23, '12 07:03:20AM

I was not using iPhone configuration tool. That was the problem. So I kept force quitting iTunes, and using the config util to register each device with the machine, and then your script ran like a charm. Thanks!



[ Reply to This | # ]
Bulk collection of iOS device details for Enterprise deployment
Authored by: roodavis on Jul 21, '11 06:32:37AM

I need to modify the script to include deviceName. Not a script expert, so I have to decipher this one first. If someone has a quick answer to save me some time it would be appreciated.



[ Reply to This | # ]