Emmc Cid - Decoder

| Bit Position | Field Name | Size (bits) | Description | |--------------|------------|-------------|-------------| | [127:120] | MID | 8 | Manufacturer ID (JEDEC-assigned) | | [119:112] | CBX | 8 | Card/BGA (not widely used) | | [111:104] | OID | 8 | OEM/Application ID | | [103:96] | PNM (first char) | 8 | Product name (character 1) | | [95:88] | PNM (second char) | 8 | Product name (character 2) | | [87:80] | PNM (third char) | 8 | Product name (character 3) | | [79:72] | PNM (fourth char) | 8 | Product name (character 4) | | [71:64] | PNM (fifth char) | 8 | Product name (character 5) | | [63:56] | PNM (sixth char) | 8 | Product name (character 6) | | [55:48] | PRV | 8 | Product revision (BCD) | | [47:40] | PSN (byte 1) | 8 | Product serial number (MSB) | | [39:32] | PSN (byte 2) | 8 | Product serial number | | [31:24] | PSN (byte 3) | 8 | Product serial number | | [23:16] | PSN (byte 4) | 8 | Product serial number (LSB) | | [15:12] | MDT (year) | 4 | Manufacturing date (year) | | [11:8] | MDT (month) | 4 | Manufacturing date (month) | | [7:1] | CRC | 7 | CRC7 checksum | | [0] | - | 1 | Reserved (always 1) |

Note: Some older eMMC versions have slight variations, but most modern devices conform to this layout.

The CID ends with a 7-bit CRC (bits [7:1]) that protects the CID’s integrity. A full-featured decoder should verify this CRC. The polynomial for eMMC CID CRC7 is:

[ CRC7 = x^7 + x^3 + 1 \quad (0x09) ]

Initial value: 0x00.

If your decoder does not validate the CRC, you risk acting on corrupted data. Professional tools (like mmc-utils) include this check.


Once you have the 32-character hexadecimal string, you need to decode it. You have several options:

decode_emmc_cid("fe014a4d4247474e036001cb0600e973")

Most Linux systems expose the CID via sysfs. Run: emmc cid decoder

cat /sys/block/mmcblk0/device/cid

That outputs a 32-character hex string (128 bits). Example:

150100303136473332e03f5d9600b46d

Now, let’s decode it using a simple Python snippet or an online tool.

Quick manual decode (offsets, 0-indexed):

cid = "150100303136473332e03f5d9600b46d"

mid = cid[0:2] # 0x15 (Kingston) oem = cid[2:6] # 0x0100 pnm = bytes.fromhex(cid[6:18]).decode() # "016G32" prv = cid[18:20] # 0xe0 → revision 1.0? psn = cid[20:28] # 0x3f5d9600 mdt = cid[28:32] # 0xb46d → year/mon decode | Bit Position | Field Name | Size

Or use mmc-utils:

sudo mmc extcsd read /dev/mmcblk0 | grep -i cid

The 128 bits are divided into 16 bytes (BE). The JESD84-B51 standard defines the following fields:

| Byte (offset) | Field | Name | Size (bits) | Description | | :--- | :--- | :--- | :--- | :--- | | 15 | MID | Manufacturer ID | 8 | Unique JEDEC-assigned ID | | 14 | CBX | Card/BGA | 2 | Package type (BGA / removable) | | 13-12 | OID | OEM/Application ID | 16 | OEM identifier (optional) | | 11-8 | PNM | Product Name | 32 | ASCII string (6 chars, left-justified, space-padded) | | 7 | PRV | Product Revision | 8 | Major/Minor BCD (e.g., 0x12 = v1.2) | | 6-4 | PSN | Product Serial Number | 24 | Unique device serial number | | 3-2 | MDT | Manufacturing Date | 12 | Year (BCD) + Month (BCD) | | 1-0 | CRC | CID CRC | 7+1 | Checksum (7 bits) + 1 reserved bit | Note: Some older eMMC versions have slight variations,

Note: byte offset counts from most significant byte (byte 15) to least (byte 0). Many decoders use 0‑based array indexing starting at CID[0] = MSB.

The last 7 bits of the CID (bits 7:1) contain a checksum. Advanced decoders verify this CRC. If the CRC is invalid, the CID may have been corrupted due to a bad read or failing chip.

Leave a Reply

Your email address will not be published. Required fields are marked *