Difference between revisions of "UDID"

From The iPhone Wiki
Jump to: navigation, search
(Changing UDID: more warnings)
(Changing UDID)
Line 25: Line 25:
 
== Changing UDID ==
 
== Changing UDID ==
   
The UDID can technically be changed and back again if you run this command followed by a DFU restore or else iTunes cannot read the device (corruption?). '''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.''' As shown on an [http://twitpic.com/9015lw iPod touch 4G].
+
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 [http://twitpic.com/9015lw 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 [[bricked|bricking]]) if you restore and there's no jailbreak available, if the available jailbreaks don't include afc2 and other workarounds aren't working.
 
'''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 [[bricked|bricking]]) if you restore and there's no jailbreak available, if the available jailbreaks don't include afc2 and other workarounds aren't working.

Revision as of 05:23, 30 August 2014

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.

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)
  • 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)

In short

On the Verizon iPhone 4 and newer:

UDID = SHA1(serial + ECID + wifiMac + bluetoothMac)

All else:

UDID = SHA1(serial + IMEI + wifiMac + bluetoothMac)

Changing UDID

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:

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