The method of using SIM-ME lock to lock SIM card by MTK

Source: Internet
Author: User

Disclaimer: This document is provided by colleagues of the company.

 

Configure in custom_nvram_sec.c

 

Example ):

 

Nvram_ef_sml_default [0] represents Card 1 configuration, nvram_ef_sml_default [1] represents Card 2 configure const nvram_sml_context_struct nvram_ef_sml_default [2] = {// Card 1 Configuration
{Sml_magic_head_value,
# Ifdef custom_sml_default
Custom_sml_default
# Else/* custom_sml_default */
{/* Category N is changed from sml_state_unlock to sml_state_lock. The number of retries is changed from sml_retry_count_n_cat to 0. The last parameter indicates the number of MCC/MNC to be locked. */{Sml_state_lock, 0, 0}, // {sml_state_unlock, sml_retry_count_n_cat, 0, 0},/* Category N */
{Sml_state_unlock, sml_retry_count_ns_cat, 0, 0},/* Category NS */
{Sml_state_unlock, sml_retry_count_sp_cat, 0, 0},/* Category sp */
{Sml_state_unlock, sml_retry_count_c_cat, 0, 0},/* Category C */
{Sml_state_unlock, sml_retry_count_sim_cat, 0, 0},/* Category SIM */
{Sml_state_unlock, sml_retry_count_ns_cat, 0, 0},/* link NS-SP */
{Sml_state_unlock, sml_retry_count_c_cat, 0, 0 }},/* link SIM-C */
{Sml_key_set, {0 x, 0 x, 0x87, 0xff, 0xff, 0xff, 0xff }},
{Sml_key_set, {0x65,0x87,0x21,0X43, 0xff, 0xff, 0xff, 0xff }},
{Sml_key_set, {0x11, 0x22, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }},
{Sml_key_empty, {0x33,0x44, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }},
{Sml_key_empty, {0x55, 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }},
{Sml_key_set, {0x77,0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }},
{Sml_key_set, {0x99,0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }}},
/* Category N code */
{0x46, 0x00, 0x0f, // BCD encoding, and F for completing
0 x, 0x00, 0x2f, // BCD encoding, F for completing
0xff, 0xff, 0xff,
0xff, 0xff, 0xff,
0xff, 0xff, 0xff,
0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,0x00,0x00 },
/* Category NS Code */
{0xc2, 0xc2, 0xc2, 0xc2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,0x00,0x00,0x00,0x00 },
/* Category SP Code */
{0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,0x00,0x00,0x00,0x00 },
/* Category C code */
{0xc4, 0xc4, 0xc4, 0xc4, 0xc4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,0x00,0x00,0x00,0x00,0x00 },
/* Category SIM code */
{0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0 x, 0 x, 0 x, 0 x, 0 x },
/* Link category NS-SP */
{0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0x00,0x00,0x00,0x00,0x00,0x00 },
/* Link category SIM-C */
{0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
{0xff, 0xff },
# Endif/* custom_sml_default */
Sml_magic_tail_value
} // Card 2 configuration {sml_magic_head_value,
# Ifdef custom_sml_default
Custom_sml_default
# Else/* custom_sml_default */
{

{Sml_state_unlock, sml_retry_count_n_cat, 0, 0},/* Category N */
{Sml_state_unlock, sml_retry_count_ns_cat, 0, 0},/* Category NS */
{Sml_state_unlock, sml_retry_count_sp_cat, 0, 0},/* Category sp */
{Sml_state_unlock, sml_retry_count_c_cat, 0, 0},/* Category C */
{Sml_state_unlock, sml_retry_count_sim_cat, 0, 0},/* Category SIM */
{Sml_state_unlock, sml_retry_count_ns_cat, 0, 0},/* link NS-SP */
{Sml_state_unlock, sml_retry_count_c_cat, 0, 0 }},/* link SIM-C */
{Sml_key_set, {0 x, 0 x, 0x87, 0xff, 0xff, 0xff, 0xff }},
{Sml_key_set, {0x65,0x87,0x21,0X43, 0xff, 0xff, 0xff, 0xff }},
{Sml_key_set, {0x11, 0x22, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }},
{Sml_key_empty, {0x33,0x44, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }},
{Sml_key_empty, {0x55, 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }},
{Sml_key_set, {0x77,0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }},
{Sml_key_set, {0x99,0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }}},
/* Category N code */
{0xff, 0xff, 0xff,
0xff, 0xff, 0xff,
0xff, 0xff, 0xff,
0xff, 0xff, 0xff,
0xff, 0xff, 0xff,
0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,0x00,0x00 },
/* Category NS Code */
{0xc2, 0xc2, 0xc2, 0xc2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,0x00,0x00,0x00,0x00 },
/* Category SP Code */
{0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,0x00,0x00,0x00,0x00 },
/* Category C code */
{0xc4, 0xc4, 0xc4, 0xc4, 0xc4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,0x00,0x00,0x00,0x00,0x00 },
/* Category SIM code */
{0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0 x, 0 x, 0 x, 0 x, 0 x },
/* Link category NS-SP */
{0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0x00,0x00,0x00,0x00,0x00,0x00 },
/* Link category SIM-C */
{0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },
{0xff, 0xff },
# Endif/* custom_sml_default */
Sml_magic_tail_value
}}

If you lock China Mobile, {sml_state_unlock, sml_retry_count_n_cat,}, change to: {sml_state_lock, 2}. The last parameter of this row indicates that you need to lock the MCC/MNC code of several carriers, china Mobile has 2, so fill in 2. The modification of the default value of the MCC/MNC code of the carrier must be included in the corresponding macro package in the category N code to avoid affecting other projects. After this default value is modified, the version number of the Nv item # define nvram_ef_sml_assist_verno must be upgraded. 

;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.