Difference between revisions of "UDID"

From The iPhone Wiki
Jump to: navigation, search
(s/my/a/)
m
Line 1: Line 1:
[[UDID]] is the short form for '''U'''nique '''D'''evice '''Id'''entifier. It is a 40-character long hex value (20 bytes). The [[UDID]] is being used by developers to register devices for testing their Apps. Only on registered devices developers can run Apps that are not in Apple's AppStore yet. Also, beta firmware can be installed only on registered devices. Developers currently have 100 [[UDID]]s they can register. The UDID can actually be changed and back again if you run this command followed by a DFU restore or else iTunes cannot read the device (corruption?). Keep a backup, you can always revert the change with the original MAC. As shown here on a iPod 4TH Gen; http://twitpic.com/9015lw Command:
+
[[UDID]] is the short form for '''U'''nique '''D'''evice '''Id'''entifier. It is a 40-character long hex value (20 bytes). The [[UDID]] is being used by developers to register devices for testing their Apps. Only on registered devices developers can run Apps that are not in Apple's AppStore yet. Also, beta firmware can be installed only on registered devices. Developers currently have 100 [[UDID]]s they can register. The UDID can actually be changed and back again if you run this command followed by a DFU restore or else iTunes cannot read the device (corruption?). Keep a backup, you can always revert the change with the original MAC. As shown on an [http://twitpic.com/9015lw iPod touch 4G]. Command:
 
 
nvram wifiaddr=ma:ca:dd:re:as
 
nvram wifiaddr=ma:ca:dd:re:as
 
- User notice: This will change your UDID, anything UDID related will need to be re-"logined", Apple related apps will always need to be logined.
 
- User notice: This will change your UDID, anything UDID related will need to be re-"logined", Apple related apps will always need to be logined.
 
 
Instead of calculating the value, it can be read from [[iTunes]], when the device is connected, by clicking on the text '''Serial Number'''.
+
Instead of calculating the value, it can be read from [[iTunes]], when the device is connected, by clicking on '''Serial Number'''.
   
 
== Calculation ==
 
== Calculation ==
Line 17: Line 16:
 
*17-character long '''Bluetooth MAC address''' (letters in lower case, including colons)
 
*17-character long '''Bluetooth MAC address''' (letters in lower case, including colons)
   
== In short ==
+
=== In short ===
  +
On the [[N92ap|Verizon iPhone 4]] and newer:
For older devices:
 
  +
UDID = SHA1($serial + $ECID + $WiFiMac + $BluetoothMac)
  +
  +
All else:
 
UDID = SHA1($serial + $IMEI + $WiFiMac + $BluetoothMac)
 
UDID = SHA1($serial + $IMEI + $WiFiMac + $BluetoothMac)
 
On the [[N92ap|Verizon iPhone 4]] and newer it is instead computed with this formula:
 
UDID = SHA1($serial + $ECID + $WiFiMac + $BluetoothMac)
 

Revision as of 00:21, 24 March 2012

UDID is the short form for Unique Device Identifier. It is a 40-character long hex value (20 bytes). The UDID is being used by developers to register devices for testing their Apps. Only on registered devices developers can run Apps that are not in Apple's AppStore yet. Also, beta firmware can be installed only on registered devices. Developers currently have 100 UDIDs they can register. The UDID can actually be changed and back again if you run this command followed by a DFU restore or else iTunes cannot read the device (corruption?). Keep a backup, you can always revert the change with the original MAC. As shown on an iPod touch 4G. Command:

nvram wifiaddr=ma:ca:dd:re:as

- User notice: This will change your UDID, anything UDID related will need to be re-"logined", Apple related apps will always need to be logined.

Instead of calculating the value, it can be read from iTunes, when the device is connected, by clicking on Serial Number.

Calculation

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)
  • 15-character long IMEI number (without spaces); empty string for iPod touch and Wi-Fi model iPads (on older devices) OR on newer devices 13-character long "ECID" in decimal (like shown in Xcode)
  • 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)

In short

On the Verizon iPhone 4 and newer:

UDID = SHA1($serial + $ECID + $WiFiMac + $BluetoothMac)

All else:

UDID = SHA1($serial + $IMEI + $WiFiMac + $BluetoothMac)