forest forest
forest forest

Reputation: 101

update EF under ADF in USIM in java card

I am working on applet and I want to update a FIle (a LOCI file for example : 0x6f7e ) under USIM using SIM/UICC applet.

The first question is: can I read/update EF under the ADF using SIM JAVA API (using STK applet) ?

According to my reads (the 3GPP TS 43.019) The obvious answer is no, i am wrong did i miss somtehing that can let me read/update a file under the ADF using SIM applet ?

So i started working on UICC applet (release 6) based on the (ETSI TS 102 241) and the stepping stone (link here) the ADF can be a readed/updated only by getting the ADF reference (getTheFileView) using the AID. but for an unknown reason I am having and UICC exception (0003 : SECURITY_STATUS_NOT_SATISFIED ) in the update command (the selection goes well). The Applet is installed with full access and Admin Full access also (using GEMALTO tools).

you can find here the code that i am using (in the applet init):

    AID adf_aid = new AID (uicc_aid, (short) 0x00, (byte) uicc_aid.length);
    ADFView = UICCSystem.getTheFileView( adf_aid,
             JCSystem.CLEAR_ON_RESET);

on this part i also use the AID as buffer without creation of the AID object.

update on the STK menu access

    ADFView.select(FID_EF_LOCI);
        ADFView.updateBinary((short) 0, eraseLoci, (short) 0,
                (short) eraseLoci.length);

I tried almost everything that I thought about :

i checked the AID value and its same put in the first record of the EF_DIR (2F00).

Thanks in advance.

Upvotes: 5

Views: 1670

Answers (1)

amin bakhtvar
amin bakhtvar

Reputation: 54

you might wanna try simalliance cat loader instead. it has privilege modification for FileView and AdminFileView.

Upvotes: 1

Related Questions