Find UDID via USB Device Management
Steps to Find UDID on Mac :
First, turn ON your iPhone or iPad and connect to your Macbook. Select the Apple icon at the top-left of the Menu Bar, hold the Option key on the keyboard, and select “System Information” (this menu entry replaces “About This Mac” when the Option key is pressed ).
Go to Hardware section as shown in the image above on the left and select the entry for USB. A list of your Mac’s USB ports and any attached USB hubs will appear on the right. Find your iPhone in this list and look at the bottom panel. You’ll see a long string of numbers and letters listed for “Serial Number.” Despite the name, this is not your iPhone’s serial number; it’s the 40 character long UDID.
Steps to Find UDID on Windows :
- Right click My computer > Properties > Select Device Manager
- In the bottom you will see “Universal Serial Bus Controllers“
- Select Apple Mobile Device USB Driver , right click over it and select Properties
- Here you will have to go to Details tab and then Device Instance Path .
- The 40 characters after the last “\” is your device identifier or UDID number .
UDID is short for Unique Device Identifier. It is a 40-character long hex value (20 bytes). You can easily find out a device's UDID in iTunes, when the device is connected, by clicking on Serial Number.
You might hear about UDIDs because developers registered with Apple can list up to 100 unique devices that can test their apps, and they list these permitted devices by listing their UDIDs.
For developers building extensions for jailbroken iOS: it's not recommended to calculate the UDID yourself - instead, use libMobileGestalt.dylib, as described on the iPhoneDevWiki.
The UDID is not an internal property. It is computed with this formula:
|“||UDID = SHA1(SerialNumber + IMEI + WiFiAddress + BluetoothAddress)||”|
where "+" means string concatenation. For iPod Touch 1G (iPod1,1), WiFiAddress is always 00:00:00:00:00:00 in this formula. If any of these values are missing (e.g. there is no IMEI in iPods), they will be treated as an empty string.
On the Verizon iPhone 4 and all currently available A5 devices it is instead computed with this formula:
|“||UDID = SHA1(SerialNumber + ECID + LOWERCASE(WiFiAddress) + LOWERCASE(BluetoothAddress))||”|
The UDID is being calculated like this:
- Create a 60-character long or 59-character long (on newer devices) text string (see below)
- Calculate the SHA1 hash of the text string. The result is the UDID.
To create the text string, append the following four strings:
- 11-character long or 12-character long (on newer devices) serial number (exactly like it is written in the Settings app)
- one of these:
- (on older devices) 15-character long IMEI number (without spaces); empty string for iPod touch and Wi-Fi model iPads
- (on newer devices) 13-character long ECID in decimal, no leading zeroes
- 17-character long Wi-Fi MAC address (letters in lower case, including colons); for the iPod touch first generation use "00:00:00:00:00:00"
- 17-character long Bluetooth MAC address (letters in lower case, including colons)
On the Verizon iPhone 4 and newer:
UDID = SHA1(serial + ECID + wifiMac + bluetoothMac)
UDID = SHA1(serial + IMEI + wifiMac + bluetoothMac)
The UDID can be changed by running the command below, followed by a DFU restore. If the DFU restore is not performed, many applications will break, including iTunes. It is very important to first write down the original MAC address and keep that information in a safe place so that you can revert this change if necessary. This hack is shown on an iPod touch 4G.
It is also very important to not change this to an invalid MAC address. If you change your device's MAC address to something invalid, your internet won't work again until you fix the MAC address (using MobileTerminal or similar). This persists even if you restore -- so you can make this really really hard to fix (you can call it a form of bricking) if you restore and there's no jailbreak available, if the available jailbreaks don't include afc2 and other workarounds aren't working.
Note that changing your UDID can have weird side effects in general, including that you'll have to log in again to everything, including Apple apps.
If you're still willing to risk this, this is the command: