ECID

The ECID (Exclusive Chip Identification also referred to as Unique Chip ID in official Apple terms) is an identifier unique to every unit, or more accurately, to every SoC.

It is 64 bits wide, with either the first 12, 16, or 20 bits set to zero (looks like 00???XXXXXXXXXXX in hex).

It holds a key position in the SHSH Protocol, being one of 2 elements that limit each APTicket to a single specific device.

Note: Some tools show it in decimal format while others do it in hexadecimal.

Via iTunes

 * Connect your iDevice to your computer.
 * Open iTunes.
 * Navigate to the "Summary" tab for your device.
 * At the top of the panel, click twice on the line that says "Serial Number".
 * Your ECID is displayed in hexadecimal.

On-device
The UDID Calculator application from Cydia displays (among other things) the ECID of your device (shown in decimal).

Via USB

 * Install libimobiledevice.
 * Connect your device over USB.
 * Run  command.
 * There should be exactly one line, reading  followed by your ECID (in decimal).
 * Alternatively you can run  which fetches the UniqueChipID key directly (which is also faster).

Mac Instructions

 * Put your device in Recovery Mode or DFU Mode.
 * Open System Profiler. (in /Applications/Utilities/).
 * In the sidebar, go to "USB" (in the "Hardware" section).
 * Under "Serial Number", there should be a part called "ECID". There you go.

Windows Instructions

 * Put your device in Recovery Mode or DFU Mode.
 * Open Device Manager and right click on Apple Mobile Device (Recovery or DFU Mode) for properties.
 * Click on the details tab.
 * Click on the dropdown box and select Device Instance Path.
 * You should find it in the textbox.

Img3
There are 19 blobs in an SHSH, and the first line of every blob is the same as below:

The * part is the ECID(Dec) encrypted by a certain formula which is

a.Transform ECID(Dec) into ECID(Hex) such as 58608372174291 ---> 35 4D D3 34 4D D3

b.Reverse the ECID(Hex) string such as 35 4D D3 34 4D D3 ---> D3 4D 34 D3 4D 35

c.Transform the string we have got into binary such as D3 4D 34 D3 4D 35 ---> ÓM4ÓM5

d.Encode the binary with base64 such as ÓM4ÓM5 ---> 00000001

Use this formula backward (d. to a.) we can extract the * part into ECID(Dec).

Img4
First, get your apticket.der. There are two options:
 * Copy it from your device in.
 * Extract it from an SHSH file, e.g. using.

Now you can use any old ASN.1 parser to display the file, such as. To get only the ECID part, use. It should show on the second line after the colon (in hexadecimal, possibly with a leading zero).

Developer Instructions
On macOS, call  in the MobileDevice Framework with "UniqueChipID". It returns the ECID as a  object.

Example implementation (all safeties removed, will probably crash if connection fails), compile with :

// Please ping Siguza (siguza@siguza.net) if this file stops compiling/working
 * 1) include 
 * 2) include 
 * 3) include 
 * 4) include 

// Cheap aliases to make things compile without headers typedef void am_device; typedef void am_device_notification; typedef void* am_device_notification_callback_info; extern void AMDeviceNotificationSubscribe(void(*callback)(am_device_notification_callback_info *info, void *arg), int unused1, int unused2, void *unknown, am_device_notification** notification); extern void AMDeviceConnect(am_device *device); extern void AMDeviceStartSession(am_device *device); extern void* AMDeviceCopyValue(am_device *device, int unknown, CFStringRef value);

void cb(am_device_notification_callback_info *info, void *arg) {   uint64_t ecid; am_device *dev = *info; /* info->dev */ CFRetain(dev); AMDeviceConnect(dev); AMDeviceStartSession(dev);

CFNumberRef ecidRef = AMDeviceCopyValue(dev, 0, CFSTR("UniqueChipID")); CFNumberGetValue(ecidRef, kCFNumberSInt64Type, &ecid); printf("ECID: %llX\n", ecid);

CFRelease(dev); exit(0); }

int main {   uint32_t buf[5]; am_device_notification *notification = (am_device_notification*)buf; AMDeviceNotificationSubscribe(&cb, 0, 0, NULL, &notification); CFRunLoopRun; return 0; }