SimProbe

UICC file-system structure: MF, DF, ADF and EF

A reference to the UICC file system: Master File, Dedicated Files and Elementary Files, their structures and access conditions, the most frequently read EFs, and linked files between DF_GSM and ADF_USIM.

  • IDNTEQ
  • Classic SIM
  • UICC
  • file system
  • linked files
  • 3GPP TS 31.102
  • ETSI TS 102 221

File types, structures and access conditions explain most SELECT, READ and UPDATE results. Most SIM inspection work involves selecting and reading files.

MF, DF and EF

The MF (Master File, 3F00) is the root; every path starts here. DFs (Dedicated Files) group related files, as in DF_TELECOM (7F10) and DF_GSM (7F20). An ADF (Application Dedicated File) holds an application’s own tree, selected by AID, as in ADF_USIM. An EF (Elementary File) holds the data.

Browse the whole tree interactively in the file-system reference.

Transparent, linear-fixed and cyclic files

EFs come in three structures: transparent (a flat byte string, e.g. EF_IMSI), linear-fixed (equal-length records, e.g. the phonebook EF_ADN) and cyclic (records that wrap, used for logs like last-dialled numbers).

Access conditions (ALW / PIN / ADM / NEVER)

Each file has READ and UPDATE conditions: ALW (always), PIN (CHV1), PIN2, ADM (the issuer’s administrative key) or NEVER. A 6982 “security status not satisfied” response means the file’s access condition has not been met. Often it is an ADM-protected file, which cannot be read on a production card without the operator’s key.

Frequently read EFs

EF_ICCID, EF_IMSI, EF_SPN, EF_AD, the PLMN selector lists (EF_FPLMN, EF_PLMNwAcT), EF_LOCI / EF_EPSLOCI, and the service tables (EF_UST, EF_EST). The reference decodes several of these from pasted raw content.

Classic SIM vs USIM

The same logical file can sit at a different path and use different coding on a classic GSM SIM (under DF_GSM, class byte A0) versus a USIM (ADF_USIM selected by AID, class byte 00). When that divergence matters, the reference calls it out per file.

Linked files between DF_GSM and ADF_USIM

A card with a USIM often keeps DF_GSM (7F20) as well, for handsets and modules that run the GSM application. Many files exist in both trees, such as EF_IMSI (6F07) under DF_GSM and under ADF_USIM. If those were two separate files, a value written through one path, by the handset or by an OTA campaign, would not show through the other.

Card operating systems handle this with linked files, also called shared or mapped files: one physical file reachable by two paths. Reading either path returns the same bytes, and an update through one path shows through the other.

What the specifications say

  • 3GPP TS 31.102 requires EF_ACMmax, EF_ACM and EF_PUCT to be shared between the GSM and USIM applications when a GSM application is present and the value is meant to be common (clauses 4.2.7, 4.2.9 and 4.2.13).
  • The first EF_ADN, EF_EXT1 and EF_CCP1 of the phonebook are mapped into DF_TELECOM as 6F3A, 6F4A and 6F4F, so a GSM handset sees the same phonebook (clauses 4.5.1 to 4.5.3). A 3G handset uses the files under DF_PHONEBOOK instead.
  • The USIM’s PIN2 may be mapped to CHV2 of the GSM application (clause 6.4).
  • The specifications do not say how a link is built. Card vendors provide it through their own CREATE FILE parameters or profile tools. In an eSIM profile package (the interoperable format downloaded under SGP.22 and SGP.32), a file definition can carry linkPath, the path of the file it links to, and dfLink indicates support for linked DFs.

How it is usually set up

Usually the file under ADF_USIM holds the data and the DF_GSM entry links to it. Profiles that started life as GSM SIM profiles sometimes have it the other way round. Only files with the same coding in both trees can be linked; the others need two files that are kept in step.

DF_GSMADF_USIMLinked?
EF_IMSI 6F07EF_IMSI 6F07Usually; same coding
EF_AD 6FADEF_AD 6FADUsually; same coding
EF_SPN 6F46EF_SPN 6F46Usually; same coding
EF_ACC 6F78EF_ACC 6F78Usually; same coding
EF_HPPLMN 6F31EF_HPPLMN 6F31Usually; same coding
EF_FPLMN 6F7BEF_FPLMN 6F7BUsually; 3 bytes per PLMN in both
EF_LOCI 6F7EEF_LOCI 6F7EUsually; 11 bytes in both
EF_LOCIGPRS 6F53EF_PSLOCI 6F73Usually; 14 bytes in both, different file IDs
EF_Kc 6F20EF_Kc 4F20 in DF_GSM-ACCESS (5F3B)Usually; 9 bytes in both
EF_KcGPRS 6F52EF_KcGPRS 4F52 in DF_GSM-ACCESSUsually; 9 bytes in both
EF_SST 6F38EF_UST 6F38No: same file ID, different service tables
EF_PLMNsel 6F30EF_PLMNwAcT 6F60No: 3-byte entries against 5-byte entries with access technology
EF_ECC 6FB7, transparentEF_ECC 6FB7, linear fixedNo: the USIM version adds an alpha identifier and a category

Where linking causes problems

  • Copies that drift. If a profile has separate files where a link was expected, an OTA campaign that updates EF_SPN or EF_FPLMN under ADF_USIM only leaves the old value under DF_GSM. Devices that run the GSM application, such as some 2G-only IoT modules, keep using it.
  • Files that cannot be linked. EF_PLMNsel and EF_PLMNwAcT have to be written separately, so an OTA script that changes the preferred network list needs commands for both.
  • Access conditions. Depending on the card operating system, a link either has its own access conditions or takes those of the file it points to. Check the vendor documentation rather than assuming both paths are protected the same way.

To find out whether two paths are linked, update one and read the other on a test card, never on a production card. On a profile you can read but not write, compare both paths after a known update, such as a location update that changes EF_LOCI.

Related

The tool this article refers to, and the related consulting service.