Qualcomm SIMLOCK Research

Table of contents

1. Set the strategy

2. Turn on the SIMLOCK function

3. Release the SIMLOCK function

4. Change strategy

References:


The mechanism of Qualcomm SIMLOCK is very mature. You can have a basic understanding of this function by reading reference materials, but for those who have never done it, it may still be unclear how to enable this function to verify or research related functions. This article just briefly introduces how to enable the SIMLOCK function and verify the effect.
The Qualcomm modem does not need to modify any code, and the related functions of SIMLOCK can be enabled and verified through the DIAG command of QXDM.

1. Set the strategy

Command: UIMDIAG_SIMLOCK_SET_POLICY_CMD
Only after this command is executed can the SIMLOCK function be enabled.
Specific DIAG command:
send_data 0x80 0x21 0x60 0xea 0x 00 0x00 0x13
SIMLOCK_SLOT_POLICY_SAME_ON_ALL_SLOTS
The part marked by color is that all card slots use the same policy.

log:

[0003]                   STRING                   07:20:39.795000          Automation               send_data 0x80 0x21 0x60 0xea 0x00 0x00 0x13
[0003]                   STRING                   07:20:39.795000          Automation               SendRawRequest 0x80 0x21 0x60 0xea 0x00 0x00 0x13
[0003]                   STRING                   07:20:39.795000          Automation               Subsys TX item
[0003]                   STRING                   07:20:39.795000          Automation               0x80 21 60 ea 00 00 13
[0003]                   STRING                   07:20:39.795000          Automation               Subsys RX item
[0003]                   STRING                   07:20:39.795000          Automation               0x80 21 60 ea 00 00 00 00 33 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …… 
[  21/   2]              MSG                      07:21:31.119695          User Identity Module/High[ simlock_modem_lib.c    186] Queue of SIMLOCK command: SIMLOCK_SET_SIMLOCK_POLICY_MSG status 0x0
[  21/   1]              MSG                      07:21:31.276759          User Identity Module/Medium[           simlock.c    510] simlock_set_simlock_policy slot_policy: 0x0, sub_policy: 0x0

2. Turn on the SIMLOCK function

There are many commands to enable the SIMLOCK function, only one is executed here.
Command: UIMDIAG_SIMLOCK_CK_LOCK_CMD
Specific DIAG command:
send_data 0x80 0x21 0x62 0xea 0x01 0x00 0x00 0x00 0x0A 0x00 0x00 0x00 0xA0 0x86 0x01 0x00 0x08 0x30 0x 31 0x32 0x33 0x34 0x35 0x36 0x37 0x01 0x34 0x36 0x30 0x02 0x30 0x31 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Here just lock the device on the 46001 network.

Log:
It can be seen from the log that after the SIMLOCK function is enabled, the card of card 1 52003 and the card of card 2 20404 are locked:

[0003]                   STRING                   07:21:10.107000          Automation               send_data 0x80 0x21 0x62 0xea 0x01 0x00 0x00 0x00 0x0A 0x00 0x00 0x00 0xA0 0x86 0x01 0x00 0x08 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x01 0x34 0x36 0x30 0x02 0x30 0x31 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[0003]                   STRING                   07:21:10.107000          Automation               SendRawRequest 0x80 0x21 0x62 0xea 0x01 0x00 0x00 0x00 0x0A 0x00 0x00 0x00 0xA0 0x86 0x01 0x00 0x08 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x01 0x34 0x36 0x30 0x02 0x30 0x31 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[0003]                   STRING                   07:21:10.107000          Automation               Subsys TX item
[0003]                   STRING                   07:21:10.107000          Automation               0x80 21 62 ea 01 00 00 00 0a 00 00 00 a0 86 01 00 08 30 31 32 33 34 35 36 37 01 34 36 30 02 30 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[0003]                   STRING                   07:21:10.123000          Automation               Subsys RX item
[0003]                   STRING                   07:21:10.123000          Automation               0x80 21 62 ea 00 00 00 00 34 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ……
[  21/   2]              MSG                      07:22:01.436260          User Identity Module/High[ simlock_modem_lib.c    505] Queue of SIMLOCK command: SIMLOCK_SET_LOCK_CK_MSG status 0x0
[  21/   1]              MSG                      07:22:01.436274          User Identity Module/Medium[           simlock.c   1078] simlock_set_lock_ck for category: 0x0
[  21/   1]              MSG                      07:22:01.461963          User Identity Module/Medium[      simlock_util.c    599] simlock_util_check_code_data
[  21/   1]              MSG                      07:22:01.461971          User Identity Module/Medium[simlock_category_conflicts.c   1287] simlock_category_verify_codes_for_conflicts
[  21/   1]              MSG                      07:22:01.461992          User Identity Module/Medium[    simlock_crypto.c    241] simlock_crypto_run_pbkdf2_algorithm, iteration_cnt: 0x186a0,                      password_data_len: 0x8, salt_data_len: 0x10, key_data_len: 0x20
[  21/   1]              MSG                      07:22:01.462011          User Identity Module/Medium[    simlock_crypto.c    290] pwd[0-3]:0x30, 0x31, 0x32, 0x33
[  21/   1]              MSG                      07:22:01.462016          User Identity Module/Medium[    simlock_crypto.c    292] pwd[4-7]:0x34, 0x35, 0x36, 0x37
[  21/   1]              MSG                      07:22:01.462021          User Identity Module/Medium[    simlock_crypto.c    302] dk_block_num: 0x1
[  21/   0]              MSG                      07:22:07.470645          User Identity Module/Low [  simlock_category.c   1885] From req - mcc[0]: 0x34, mcc[1]: 0x36, mcc[2]: 0x30, mnc[0]: 0x30, mnc[1]: 0x31, mnc[2]: 0x0
[  21/   1]              MSG                      07:22:07.470651          User Identity Module/Medium[  simlock_category.c   1254] simlock_category_write_lock_data
[  21/   1]              MSG                      07:22:07.485700          User Identity Module/Medium[    simlock_config.c   1924] simlock_config_update_and_write_category_status
[  21/   2]              MSG                      07:22:07.515132          User Identity Module/High[    mmgsdi_simlock.c   2031] processing SIM Lock event, evt_type: 0x4, status: 0x0
[  21/   2]              MSG                      07:22:07.515146          User Identity Module/High[ simlock_modem_lib.c    971] Queue of SIMLOCK command: SIMLOCK_GET_STATUS_MSG status 0x0
[  21/   2]              MSG                      07:22:07.737450          User Identity Module/High[ simlock_modem_lib.c   1153] Queue of SIMLOCK command: SIMLOCK_RUN_ALGORITHM_MSG status 0x0
[  21/   2]              MSG                      07:22:07.759763          User Identity Module/High[      simlock_3gpp.c   1979] category 0x0 enabled
[  21/   0]              MSG                      07:22:07.774337          User Identity Module/Low [      simlock_3gpp.c   1101] run_algo_nw: From sim - mcc[0],mcc[1],mcc[2]: 0x35,0x32,0x30; mnc[0],mnc[1],mnc[2]: 0x30,0x33,0x0
[  21/   1]              MSG                      07:22:07.774343          User Identity Module/Medium[      simlock_3gpp.c   1173] nw code in list type: 0x0
[  21/   2]              MSG                      07:22:07.774363          User Identity Module/High[      simlock_3gpp.c   1979] category 0x0 enabled
[  21/   0]              MSG                      07:22:07.789042          User Identity Module/Low [      simlock_3gpp.c   1101] run_algo_nw: From sim - mcc[0],mcc[1],mcc[2]: 0x32,0x30,0x34; mnc[0],mnc[1],mnc[2]: 0x30,0x34,0x0
[  21/   2]              MSG                      07:22:07.789214          User Identity Module/High[            mmgsdi.c   8618] Received event: 0x13 in mmgsdi_evt_cb
[  21/   2]              MSG                      07:22:07.789218          User Identity Module/High[            mmgsdi.c   8848] MMGSDI_PERSO_EVT, feature: 0x0, status: 0x2
[  21/   2]              MSG                      07:22:07.789241          User Identity Module/High[            mmgsdi.c   8618] Received event: 0x13 in mmgsdi_evt_cb
[  21/   2]              MSG                      07:22:07.789244          User Identity Module/High[            mmgsdi.c   8848] MMGSDI_PERSO_EVT, feature: 0x0, status: 0x2   

at+cfun=0, at+cfun=1 capture logs:

[  21/   2]              MSG                      07:52:51.830716          User Identity Module/High[            mmgsdi.c   8656] MMGSDI_SESSION_CHANGED_EVT, app: 0x3, slot: 0x2, activated: 0x1, session_type: 0x2
[  21/   2]              MSG                      07:52:52.358633          User Identity Module/High[            mmgsdi.c   8656] MMGSDI_SESSION_CHANGED_EVT, app: 0x3, slot: 0x1, activated: 0x1, session_type: 0x0
[  21/   2]              MSG                      07:52:52.396315          User Identity Module/High[            mmgsdi.c   8806] MMGSDI_PIN1_EVT, status: 0x3, slot: 0x1
[  21/   2]              MSG                      07:52:52.498373          User Identity Module/High[ simlock_modem_lib.c   1153] Queue of SIMLOCK command: SIMLOCK_RUN_ALGORITHM_MSG status 0x0
[  21/   1]              MSG                      07:52:52.524675          User Identity Module/Medium[      simlock_3gpp.c   1868] simlock_3gpp_run_algorithm
[  21/   2]              MSG                      07:52:52.524701          User Identity Module/High[      simlock_3gpp.c   1979] category 0x0 enabled
[  21/   0]              MSG                      07:52:52.541836          User Identity Module/Low [      simlock_3gpp.c   1101] run_algo_nw: From sim - mcc[0],mcc[1],mcc[2]: 0x35,0x32,0x30; mnc[0],mnc[1],mnc[2]: 0x30,0x33,0x0
[  21/   1]              MSG                      07:52:52.541836          User Identity Module/Medium[      simlock_3gpp.c   1173] nw code in list type: 0x0
[  21/   1]              MSG                      07:52:52.541862          User Identity Module/Medium[    simlock_policy.c    756] simlock_apply_config_policy: slot_policy=0x0, sub_policy=0x0
[  21/   2]              MSG                      07:52:52.541888          User Identity Module/High[    mmgsdi_simlock.c   1621] mmgsdi_simlock_process_run_algo_resp
[  21/   2]              MSG                      07:52:52.542018          User Identity Module/High[            mmgsdi.c   8618] Received event: 0x13 in mmgsdi_evt_cb
[  21/   2]              MSG                      07:52:52.542018          User Identity Module/High[            mmgsdi.c   8848] MMGSDI_PERSO_EVT, feature: 0x0, status: 0x2
[  21/   2]              MSG                      07:52:53.988793          User Identity Module/High[            mmgsdi.c   8806] MMGSDI_PIN1_EVT, status: 0x2, slot: 0x2
[  21/   2]              MSG                      07:52:54.078246          User Identity Module/High[ simlock_modem_lib.c   1153] Queue of SIMLOCK command: SIMLOCK_RUN_ALGORITHM_MSG status 0x0
[  21/   1]              MSG                      07:52:54.103715          User Identity Module/Medium[      simlock_3gpp.c   1868] simlock_3gpp_run_algorithm
[  21/   2]              MSG                      07:52:54.103741          User Identity Module/High[      simlock_3gpp.c   1979] category 0x0 enabled
[  21/   0]              MSG                      07:52:54.120434          User Identity Module/Low [      simlock_3gpp.c   1101] run_algo_nw: From sim - mcc[0],mcc[1],mcc[2]: 0x35,0x32,0x30; mnc[0],mnc[1],mnc[2]: 0x30,0x33,0x0
[  21/   1]              MSG                      07:52:54.120434          User Identity Module/Medium[      simlock_3gpp.c   1173] nw code in list type: 0x0
[  21/   1]              MSG                      07:52:54.120460          User Identity Module/Medium[      simlock_3gpp.c   1868] simlock_3gpp_run_algorithm
[  21/   2]              MSG                      07:52:54.120460          User Identity Module/High[      simlock_3gpp.c   1979] category 0x0 enabled
[  21/   0]              MSG                      07:52:54.137413          User Identity Module/Low [      simlock_3gpp.c   1101] run_algo_nw: From sim - mcc[0],mcc[1],mcc[2]: 0x32,0x30,0x34; mnc[0],mnc[1],mnc[2]: 0x30,0x34,0x0
[  21/   1]              MSG                      07:52:54.137413          User Identity Module/Medium[      simlock_3gpp.c   1173] nw code in list type: 0x0
[  21/   1]              MSG                      07:52:54.137439          User Identity Module/Medium[    simlock_policy.c    756] simlock_apply_config_policy: slot_policy=0x0, sub_policy=0x0
[  21/   2]              MSG                      07:52:54.137465          User Identity Module/High[    mmgsdi_simlock.c   1621] mmgsdi_simlock_process_run_algo_resp
[  21/   2]              MSG                      07:52:54.137569          User Identity Module/High[            mmgsdi.c   8618] Received event: 0x13 in mmgsdi_evt_cb
[  21/   2]              MSG                      07:52:54.137595          User Identity Module/High[            mmgsdi.c   8848] MMGSDI_PERSO_EVT, feature: 0x0, status: 0x2
[  21/   2]              MSG                      07:52:54.137778          User Identity Module/High[            mmgsdi.c   8618] Received event: 0x13 in mmgsdi_evt_cb
[  21/   2]              MSG                      07:52:54.137778          User Identity Module/High[            mmgsdi.c   8848] MMGSDI_PERSO_EVT, feature: 0x0, status: 0x2

Card 1 is inserted into the matching 46001 card:
It can be seen from the log that the card of card 146001 is in the white list and can go to ready; while the card of card 2 20404 is still locked:

[  21/   2]              MSG                      08:07:36.761556          User Identity Module/High[ simlock_modem_lib.c    971] Queue of SIMLOCK command: SIMLOCK_GET_STATUS_MSG status 0x0
[  21/   2]              MSG                      08:07:38.362578          User Identity Module/High[            mmgsdi.c   8618] Received event: 0xd in mmgsdi_evt_cb
[  21/   2]              MSG                      08:07:38.362578          User Identity Module/High[            mmgsdi.c   8656] MMGSDI_SESSION_CHANGED_EVT, app: 0x3, slot: 0x1, activated: 0x1, session_type: 0x0
[  21/   2]              MSG                      08:07:40.189928          User Identity Module/High[ simlock_modem_lib.c   1153] Queue of SIMLOCK command: SIMLOCK_RUN_ALGORITHM_MSG status 0x0
[  21/   1]              MSG                      08:07:40.209694          User Identity Module/Medium[      simlock_3gpp.c   1868] simlock_3gpp_run_algorithm
[  21/   2]              MSG                      08:07:40.209720          User Identity Module/High[      simlock_3gpp.c   1979] category 0x0 enabled
[  21/   0]              MSG                      08:07:40.223105          User Identity Module/Low [      simlock_3gpp.c   1101] run_algo_nw: From sim - mcc[0],mcc[1],mcc[2]: 0x34,0x36,0x30; mnc[0],mnc[1],mnc[2]: 0x30,0x31,0x0
[  21/   1]              MSG                      08:07:40.223105          User Identity Module/Medium[      simlock_3gpp.c   1173] nw code in list type: 0x1
[  21/   1]              MSG                      08:07:40.223105          User Identity Module/Medium[      simlock_3gpp.c   1868] simlock_3gpp_run_algorithm
[  21/   2]              MSG                      08:07:40.223132          User Identity Module/High[      simlock_3gpp.c   1979] category 0x0 enabled
[  21/   0]              MSG                      08:07:40.236595          User Identity Module/Low [      simlock_3gpp.c   1101] run_algo_nw: From sim - mcc[0],mcc[1],mcc[2]: 0x32,0x30,0x34; mnc[0],mnc[1],mnc[2]: 0x30,0x34,0x0
[  21/   1]              MSG                      08:07:40.236595          User Identity Module/Medium[      simlock_3gpp.c   1173] nw code in list type: 0x0
[  21/   2]              MSG                      08:07:40.236621          User Identity Module/High[    mmgsdi_simlock.c   1621] mmgsdi_simlock_process_run_algo_resp
[  21/   2]              MSG                      08:07:40.236725          User Identity Module/High[            mmgsdi.c   8618] Received event: 0x13 in mmgsdi_evt_cb
[  21/   2]              MSG                      08:07:40.236725          User Identity Module/High[            mmgsdi.c   8848] MMGSDI_PERSO_EVT, feature: 0x7fffffff, status: 0x1
[  21/   2]              MSG                      08:07:40.236882          User Identity Module/High[            mmgsdi.c   8618] Received event: 0x13 in mmgsdi_evt_cb
[  21/   2]              MSG                      08:07:40.236882          User Identity Module/High[            mmgsdi.c   8848] MMGSDI_PERSO_EVT, feature: 0x0, status: 0x2
[  21/   2]              MSG                      08:07:41.656803          User Identity Module/High[            mmgsdi.c   8879] MMGSDI_SUBSCRIPTION_READY_EVT, app: 0x3, slot: 0x1

3. Release the SIMLOCK function

Command: UIMDIAG_SIMLOCK_UNLOCK_CMD
Specific DIAG command:
send_data 0x80 0x21 0x63 0xea 0x01 0x00 0x08 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37

log:

[0003]                   STRING                   08:14:32.202000          Automation               send_data 0x80 0x21 0x63 0xea 0x01 0x00 0x08 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37
[0003]                   STRING                   08:14:32.204000          Automation               SendRawRequest 0x80 0x21 0x63 0xea 0x01 0x00 0x08 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37
[0003]                   STRING                   08:14:32.211000          Automation               Subsys TX item
[0003]                   STRING                   08:14:32.212000          Automation               0x80 21 63 ea 01 00 08 30 31 32 33 34 35 36 37
[0003]                   STRING                   08:14:32.212000          Automation               Subsys RX item
[0003]                   STRING                   08:14:32.213000          Automation               0x80 21 63 ea 00 00 00 00 18 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…… 
[  21/   2]              MSG                      08:16:00.020617          User Identity Module/High[ simlock_modem_lib.c    777] Queue of SIMLOCK command: SIMLOCK_SET_UNLOCK_MSG status 0x0
[  21/   1]              MSG                      08:16:00.145145          User Identity Module/Medium[           simlock.c   2276] simlock_unlock_device for category: 0x0
[  21/   1]              MSG                      08:16:00.175198          User Identity Module/Medium[           simlock.c   2138] num_codes: 0x1
[  21/   1]              MSG                      08:16:00.175201          User Identity Module/Medium[    simlock_crypto.c    241] simlock_crypto_run_pbkdf2_algorithm, iteration_cnt: 0x186a0,                      password_data_len: 0x8, salt_data_len: 0x10, key_data_len: 0x20
[  21/   1]              MSG                      08:16:00.175208          User Identity Module/Medium[    simlock_crypto.c    290] pwd[0-3]:0x30, 0x31, 0x32, 0x33
[  21/   1]              MSG                      08:16:00.175210          User Identity Module/Medium[    simlock_crypto.c    292] pwd[4-7]:0x34, 0x35, 0x36, 0x37
[  21/   1]              MSG                      08:16:00.175212          User Identity Module/Medium[    simlock_crypto.c    302] dk_block_num: 0x1
[  21/   1]              MSG                      08:16:04.538157          User Identity Module/Medium[           simlock.c   2182] key data matched
[  21/   1]              MSG                      08:16:04.538160          User Identity Module/Medium[    simlock_config.c   1924] simlock_config_update_and_write_category_status
[  21/   1]              MSG                      08:16:04.569446          User Identity Module/Medium[  simlock_category.c   1254] simlock_category_write_lock_data
[  21/   2]              MSG                      08:16:04.616197          User Identity Module/High[    mmgsdi_simlock.c   2031] processing SIM Lock event, evt_type: 0x0, status: 0x0
 

4. Change strategy

You can change the strategy only after turning off all the SIMLOCK functions.
UIMDIAG_SIMLOCK_SET_POLICY_CMD
send_data 0x80 0x21 0x60 0xea 0x 01 0x00 0x13
SIMLOCK_SLOT_POLICY_UNIQUE_FOR_EACH_SLOT
uses different policies for each card slot


UIMDIAG_SIMLOCK_CK_LOCK_CMD
send_data 0x80 0x21 0x62 0xea 0x01 0x00 0x00 0x00 0x0A 0x00 0x00 0x00 0xA0 0x86 0x01 0x00 0x08 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x01 0x34 0x36 0x30 0x02 0x30 0x31 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

To lock the device on the network of 46001, this command is issued only once.

log:

[0003]                   STRING                   08:28:52.555000          Automation               send_data 0x80 0x21 0x60 0xea 0x01 0x00 0x13
[0003]                   STRING                   08:28:52.556000          Automation               SendRawRequest 0x80 0x21 0x60 0xea 0x01 0x00 0x13
[0003]                   STRING                   08:28:52.561000          Automation               Subsys TX item
[0003]                   STRING                   08:28:52.562000          Automation               0x80 21 60 ea 01 00 13
[0003]                   STRING                   08:28:52.562000          Automation               Subsys RX item
[0003]                   STRING                   08:28:52.562000          Automation               0x80 21 60 ea 00 00 00 00 c8 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …… 
[  21/   2]              MSG                      08:29:44.960548          User Identity Module/High[ simlock_modem_lib.c    186] Queue of SIMLOCK command: SIMLOCK_SET_SIMLOCK_POLICY_MSG status 0x0
[  21/   1]              MSG                      08:29:44.960562          User Identity Module/Medium[           simlock.c    510] simlock_set_simlock_policy slot_policy: 0x1, sub_policy: 0x0
[  21/   2]              MSG                      08:29:44.986393          User Identity Module/High[    simlock_config.c   1837] slot_policy: 0x1, sub_policy: 0x0
[0003]                   STRING                   08:29:25.388000          Automation               send_data 0x80 0x21 0x62 0xea 0x01 0x00 0x00 0x00 0x0A 0x00 0x00 0x00 0xA0 0x86 0x01 0x00 0x08 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x01 0x34 0x36 0x30 0x02 0x30 0x31 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[0003]                   STRING                   08:29:25.388000          Automation               SendRawRequest 0x80 0x21 0x62 0xea 0x01 0x00 0x00 0x00 0x0A 0x00 0x00 0x00 0xA0 0x86 0x01 0x00 0x08 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x01 0x34 0x36 0x30 0x02 0x30 0x31 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[0003]                   STRING                   08:29:25.392000          Automation               Subsys TX item
[0003]                   STRING                   08:29:25.392000          Automation               0x80 21 62 ea 01 00 00 00 0a 00 00 00 a0 86 01 00 08 30 31 32 33 34 35 36 37 01 34 36 30 02 30 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[0003]                   STRING                   08:29:25.393000          Automation               Subsys RX item
[0003]                   STRING                   08:29:25.393000          Automation               0x80 21 62 ea 00 00 00 00 c9 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …… 
[  21/   2]              MSG                      08:30:17.792266          User Identity Module/High[ simlock_modem_lib.c    505] Queue of SIMLOCK command: SIMLOCK_SET_LOCK_CK_MSG status 0x0
[  21/   1]              MSG                      08:30:17.792266          User Identity Module/Medium[           simlock.c   1078] simlock_set_lock_ck for category: 0x0
[  21/   1]              MSG                      08:30:17.813985          User Identity Module/Medium[      simlock_util.c    599] simlock_util_check_code_data
[  21/   1]              MSG                      08:30:17.813985          User Identity Module/Medium[simlock_category_conflicts.c   1287] simlock_category_verify_codes_for_conflicts
[  21/   1]              MSG                      08:30:17.813985          User Identity Module/Medium[    simlock_crypto.c    241] simlock_crypto_run_pbkdf2_algorithm, iteration_cnt: 0x186a0,                      password_data_len: 0x8, salt_data_len: 0x10, key_data_len: 0x20
[  21/   1]              MSG                      08:30:17.814011          User Identity Module/Medium[    simlock_crypto.c    290] pwd[0-3]:0x30, 0x31, 0x32, 0x33
[  21/   1]              MSG                      08:30:17.814011          User Identity Module/Medium[    simlock_crypto.c    292] pwd[4-7]:0x34, 0x35, 0x36, 0x37
[  21/   1]              MSG                      08:30:17.814011          User Identity Module/Medium[    simlock_crypto.c    302] dk_block_num: 0x1
[  21/   1]              MSG                      08:30:22.507214          User Identity Module/Medium[  simlock_category.c   1254] simlock_category_write_lock_data
[  21/   1]              MSG                      08:30:22.530677          User Identity Module/Medium[    simlock_config.c   1924] simlock_config_update_and_write_category_status
[  21/   2]              MSG                      08:30:22.561406          User Identity Module/High[    mmgsdi_simlock.c   2031] processing SIM Lock event, evt_type: 0x4, status: 0x0 

at+cfun=0, at+cfun=1 Grab the log:
It can be seen from the log that the card of card 1 52003 is locked; the card of card 2 is 20404 is not locked and is ready. Because the strategy of card 1 and card 2 is different, is it because the SIMLOCK function is only enabled once, and it takes effect on card 1 by default?

[  21/   2]              MSG                      08:44:43.225490          User Identity Module/High[            mmgsdi.c   8656] MMGSDI_SESSION_CHANGED_EVT, app: 0x3, slot: 0x2, activated: 0x1, session_type: 0x2
[  21/   2]              MSG                      08:44:43.777001          User Identity Module/High[            mmgsdi.c   8656] MMGSDI_SESSION_CHANGED_EVT, app: 0x3, slot: 0x1, activated: 0x1, session_type: 0x0
[  21/   2]              MSG                      08:44:43.988120          User Identity Module/High[ simlock_modem_lib.c   1153] Queue of SIMLOCK command: SIMLOCK_RUN_ALGORITHM_MSG status 0x0
[  21/   1]              MSG                      08:44:44.008433          User Identity Module/Medium[      simlock_3gpp.c   1868] simlock_3gpp_run_algorithm
[  21/   2]              MSG                      08:44:44.008459          User Identity Module/High[      simlock_3gpp.c   1979] category 0x0 enabled
[  21/   0]              MSG                      08:44:44.021350          User Identity Module/Low [      simlock_3gpp.c   1101] run_algo_nw: From sim - mcc[0],mcc[1],mcc[2]: 0x35,0x32,0x30; mnc[0],mnc[1],mnc[2]: 0x30,0x33,0x0
[  21/   1]              MSG                      08:44:44.021376          User Identity Module/Medium[      simlock_3gpp.c   1173] nw code in list type: 0x0
[  21/   1]              MSG                      08:44:44.021376          User Identity Module/Medium[    simlock_policy.c    756] simlock_apply_config_policy: slot_policy=0x1, sub_policy=0x0
[  21/   2]              MSG                      08:44:44.021376          User Identity Module/High[        simlocklib.c    280] simlock process message, status: 0x0
[  21/   2]              MSG                      08:44:44.021402          User Identity Module/High[    mmgsdi_simlock.c   1621] mmgsdi_simlock_process_run_algo_resp
[  21/   2]              MSG                      08:44:44.021480          User Identity Module/High[            mmgsdi.c   8618] Received event: 0x13 in mmgsdi_evt_cb
[  21/   2]              MSG                      08:44:44.021480          User Identity Module/High[            mmgsdi.c   8848] MMGSDI_PERSO_EVT, feature: 0x0, status: 0x2
[  21/   2]              MSG                      08:44:45.517370          User Identity Module/High[            mmgsdi.c   8618] Received event: 0x13 in mmgsdi_evt_cb
[  21/   2]              MSG                      08:44:45.517370          User Identity Module/High[            mmgsdi.c   8848] MMGSDI_PERSO_EVT, feature: 0x7fffffff, status: 0x1
[  21/   2]              MSG                      08:44:45.665782          User Identity Module/High[            mmgsdi.c   8879] MMGSDI_SUBSCRIPTION_READY_EVT, app: 0x3, slot: 0x2

References:

80-nm328-7_f_simlock_hck_based_engine_overview.pdf
80-VL005-1_UIM Diagnostic (UIM DIAG).pdf
 

Guess you like

Origin blog.csdn.net/wszzr999/article/details/126285871