CN113286304A - Method and device for automatically adapting and locking SIM (subscriber identity Module) data, mobile terminal and storage medium - Google Patents

Method and device for automatically adapting and locking SIM (subscriber identity Module) data, mobile terminal and storage medium Download PDF

Info

Publication number
CN113286304A
CN113286304A CN202110500532.1A CN202110500532A CN113286304A CN 113286304 A CN113286304 A CN 113286304A CN 202110500532 A CN202110500532 A CN 202110500532A CN 113286304 A CN113286304 A CN 113286304A
Authority
CN
China
Prior art keywords
data
sim
sim card
card
mobile phone
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110500532.1A
Other languages
Chinese (zh)
Inventor
陈祖斌
李涛
洪仰宁
刘凯
谢瀚武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Communication Ningbo Ltd
Original Assignee
TCL Communication Ningbo Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TCL Communication Ningbo Ltd filed Critical TCL Communication Ningbo Ltd
Priority to CN202110500532.1A priority Critical patent/CN113286304A/en
Publication of CN113286304A publication Critical patent/CN113286304A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method, a device, a mobile terminal and a storage medium for automatically adapting lock SIM data, which adopt the following steps: detecting the startup initialization of the mobile phone, and judging whether the SIM card is inserted for the first time; when the mobile phone is judged to be inserted into the SIM card for the first time, obtaining the SIM card data inserted for the first time and storing the SIM card data as SIM LOCK data; when the mobile phone is judged not to be inserted into the SIM card for the first time, and when the data of the SIM card inserted at present is the same as the data of the SIM LOCK card inserted at the first time, the SIM card inserted at present is judged to be a legal card, and the SIM card at present is controlled to be normally used; when the data of the currently inserted SIM card is different from the data of the SIM LOCK card inserted for the first time, the locked mobile phone cannot be used, and the SIM LOCK data can be automatically matched according to the SIM card put on the market, so that the redevelopment and the reduplication of mobile phone software are avoided, and the development and production cost of the mobile phone is saved.

Description

Method and device for automatically adapting and locking SIM (subscriber identity Module) data, mobile terminal and storage medium
Technical Field
The invention relates to the technical field of mobile terminals, in particular to a method and a device for automatically adapting and locking SIM (subscriber identity module) data, a mobile terminal and a storage medium.
Background
With the development of mobile communication and the continuous improvement of living standard of people, various mobile terminals such as mobile phones are more and more popular, and the mobile phones become indispensable communication tools in people's life.
With the globalization of business, more manufacturers and operators will put their mobile phone products in different regions of the world. The operators use different SIM card data in different country regions, so that the card locking data of SIMLOCK is different even if the same operator is in different countries.
However, in the prior art, a mobile phone manufacturer does not necessarily know the specific country and the specific operator where the mobile phone is released when producing the mobile phone. Therefore, mobile phone manufacturers are required to develop multiple sets of SIMLOCK software according to the requirements of operators when developing mobile phones, different sets of mobile phone software are written according to the requirements of mobile phone release on the market or card locking, and the mobile phone development and production cost is high.
Thus, there is a need for improvements and enhancements in the art.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method, an apparatus, a mobile terminal and a storage medium for automatically adapting and locking SIM data, aiming at solving the problems in the prior art that a plurality of sets of SIMLOCK software are developed by a mobile terminal, different sets of mobile phone software are written according to the mobile phone marketing or card locking requirements, and the mobile phone development and production cost is high.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a method of automatically adapting lock SIM data, wherein the method comprises:
detecting the startup initialization of the mobile phone and judging whether an SIM card is inserted for the first time;
when the mobile phone is judged to be the SIM card inserted for the first time, obtaining the SIM card data inserted for the first time and storing the SIM card data as SIM LOCK card locking data;
when the mobile phone is judged not to be the SIM card inserted for the first time, comparing the currently inserted SIM card data of the mobile phone with the first inserted SIM LOCK card data, judging whether the currently inserted SIM card is a legal card or not, and judging whether the currently inserted SIM card can be normally used or not;
when the data of the currently inserted SIM card is the same as the data of the SIM LOCK card which is inserted for the first time, judging that the currently inserted SIM card is a legal card, and controlling the current SIM card to be normally used;
when the data of the currently inserted SIM card is different from the data of the SIM LOCK inserted for the first time, the locking mobile phone cannot be used.
The method for automatically adapting and locking the SIM data comprises the following steps of detecting the startup initialization of the mobile phone and judging whether an SIM card is inserted for the first time:
detecting whether the mobile phone is started up and initialized;
and when the startup initialization of the mobile phone is detected, judging whether the mobile phone is inserted into the SIM card for the first time.
The method for automatically adapting and locking the SIM data, wherein when the SIM card is judged to be inserted for the first time, the step of acquiring the SIM card data inserted for the first time and storing the SIM card data as the SIM LOCK card data comprises the following steps:
when the mobile phone is judged to be the SIM card inserted for the first time, obtaining the SIM card data inserted for the first time;
and storing the acquired SIM card data inserted for the first time into a nonvolatile memory as the SIM LOCK card locking data basis.
The method for automatically adapting and locking the SIM data, wherein the step of storing the acquired SIM card data inserted for the first time into a nonvolatile memory as SIM LOCK card locking data further comprises the following steps:
and when the SIM data of the SIM card inserted for the first time is stored as SIM LOCK data, controlling to enter the main interface and controlling the normal use of the mobile phone.
The method for automatically adapting and locking the SIM data, wherein when the mobile phone is judged not to be the SIM card inserted for the first time, comparing the currently inserted SIM card data of the mobile phone with the first inserted SIM LOCK card data, judging whether the currently inserted SIM card is a legal card, and judging whether the currently inserted SIM card can be normally used comprises the following steps:
when the mobile phone is judged not to be inserted into the SIM card for the first time, acquiring the data of the currently inserted SIM card; and controlling the mobile phone to read the SIM LOCK card locking data stored by the SIM card inserted for the first time from the nonvolatile memory;
comparing the currently inserted SIM card data of the mobile phone with the SIM LOCK data inserted for the first time, judging whether the currently inserted SIM card is a legal card or not, and judging whether the currently inserted SIM card can be normally used or not.
The method for automatically adapting and locking the SIM data comprises the following steps of judging that the currently inserted SIM card is a legal card and controlling the normal use of the current SIM card when the currently inserted SIM card data is the same as the SIM LOCK data inserted for the first time:
and when the data of the currently inserted SIM card is the same as the data of the SIM LOCK card which is inserted for the first time, judging that the currently inserted SIM card is a legal card, controlling the mobile phone to be normally used, controlling the mobile phone to enter a main interface, and controlling the current SIM card to be normally used by being plugged into a network.
The method for automatically adapting and locking the SIM data, wherein when the currently inserted SIM card data is different from the SIM LOCK data inserted for the first time, the step of locking the mobile phone which cannot be used comprises the following steps:
and when the currently inserted SIM card data is different from the SIM LOCK data inserted for the first time, judging that the SIM card is illegal, entering a card locking interface, and locking the mobile phone to be unusable.
An apparatus for automatically adapting a locked SIM data device, wherein the apparatus comprises:
the detection module is used for detecting the startup initialization of the mobile phone and judging whether the SIM card is inserted for the first time;
the first judgment module is used for acquiring the SIM card data inserted for the first time and storing the SIM card data as the SIM LOCK card locking data when the mobile phone is judged to be inserted for the first time;
the second judging module is used for comparing the currently inserted SIM card data of the mobile phone with the first inserted SIM LOCK card locking data when judging that the mobile phone is not inserted with the SIM card for the first time, judging whether the currently inserted SIM card is a legal card or not and judging whether the currently inserted SIM card can be normally used or not;
the first control module is used for judging that the currently inserted SIM card is a legal card and controlling the normally used current SIM card when the currently inserted SIM card data is the same as the SIM LOCK data which is inserted for the first time;
and the second control module is used for locking the mobile phone to be unusable when the data of the currently inserted SIM card is different from the data of the SIM LOCK inserted for the first time.
A mobile terminal, wherein the mobile terminal comprises a memory, a processor and an image display program stored in the memory and executable on the processor, and the processor implements any one of the steps of the method for automatically adapting and locking SIM data when executing the image display program.
A computer readable storage medium having stored thereon an image display program which, when executed by a processor, implements any of the steps of the method for automatically adapting lock SIM data.
Has the advantages that: compared with the prior art, the invention provides a method for automatically adapting to locking SIM data, which adopts the following steps: detecting the startup initialization of the mobile phone and judging whether an SIM card is inserted for the first time; when the mobile phone is judged to be the SIM card inserted for the first time, obtaining the SIM card data inserted for the first time and storing the SIM card data as SIM LOCK card locking data; when the mobile phone is judged not to be the SIM card inserted for the first time, comparing the currently inserted SIM card data of the mobile phone with the first inserted SIM LOCK card data, judging whether the currently inserted SIM card is a legal card or not, and judging whether the currently inserted SIM card can be normally used or not; when the data of the currently inserted SIM card is the same as the data of the SIM LOCK card which is inserted for the first time, judging that the currently inserted SIM card is a legal card, and controlling the current SIM card to be normally used; when the data of the currently inserted SIM card is different from the data of the SIM LOCK card inserted for the first time, the mobile phone can be locked and cannot be used, and the SIM LOCK data can be automatically matched according to the SIM card put on the market of the mobile phone, so that the redevelopment and the reduping of mobile phone software are avoided, and the development and production cost of the mobile phone is saved.
Drawings
Fig. 1 is a flowchart of a method for automatically adapting SIM data according to embodiment 1 of the present invention.
Fig. 2 is a flowchart of a specific implementation manner of the method for automatically adapting to lock SIM data according to embodiment 2 of the present invention.
Fig. 3 is a functional block diagram of an apparatus for automatically adapting SIM data according to an embodiment of the present invention.
Fig. 4 is a schematic block diagram of an internal structure of a mobile terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The SIM Lock is a Lock for the relationship between the mobile phone and the card, and is also called SIM-ME Lock. Used for binding the relationship between the mobile phone and the card. Only a certain number of cards can be used in a mobile phone. The most important role of the SIM Lock is to guarantee the operator's interest. The SIM Lock can realize that the mobile phone can only use the card of a fixed operator. This ensures the benefit of the operator in selling the customization machine.
With the development of mobile communication and the continuous improvement of living standard of people, various mobile terminals such as mobile phones are more and more popular, and the mobile phones become indispensable communication tools in people's life.
With the globalization of business, more manufacturers and operators will put their mobile phone products in different regions of the world. The operators use different SIM card data in different country regions, so that the card locking data of SIMLOCK is different even if the same operator is in different countries.
Research shows that in the prior art, when a mobile phone manufacturer produces a mobile phone, the specific country and the specific operator where the mobile phone is put are not necessarily known. Therefore, mobile phone manufacturers are required to develop multiple sets of SIMLOCK software according to the requirements of operators when developing mobile phones, different sets of mobile phone software are written according to the requirements of mobile phone marketing or card locking, and the mobile phone development and production cost is high.
In order to overcome the technical problem that the SIM LOCK can only swipe the data of the SIM card needing to be locked in production, the invention provides an SIM LOCK scheme capable of automatically adapting to the SIM data. The method and the system enable operators and manufacturers to produce the mobile phone with the SIM LOCK function without considering the state of the SIM card put on the market by the mobile phone when producing the mobile phone, so that the SIM LOCK function of the mobile phone is more flexible.
The embodiment of the invention provides a method for automatically adapting and locking SIM data, which is used for acquiring the SIM card data as the card locking data (namely a legal card) of an SIM LOCK when a mobile phone is inserted into an SIM card for the first time. Therefore, mobile phone manufacturers can not consider mobile phone SIM LOCK data when producing mobile phones, and when an operator LOCKs a card, the operator can LOCK the card of the type only by inserting the SIM card to be locked into the mobile phone and starting up the mobile phone for initialization. When an operator or a manufacturer sells a mobile phone model to a plurality of countries, the scheme can greatly save the development time of SIM LCOK, can adapt to the SIM card data of the plurality of countries by only one set of SIM LOCK software, and can be initialized by starting up and inserting legal cards when selling the mobile phone.
The following English symbols are used in the embodiment of the invention for explanation as follows:
MCC: mobile Country Code
MNC: mobile network codes Mobile network number for identifying Mobile network to which Mobile user belongs
PLMN: public Land Mobile Network (PLMN) in a country or region, a cellular Mobile communication Network of a certain system of a certain operator is called PLMN
SIM: subscriber identity Module also called as Subscriber identity Module card and smart card
NV: nvram Nonvolatile RAM.
The data of the SIM Lock of the SIM card of the mobile phone in the embodiment of the invention is taken from IMSI, GID1 and GID2 files. As shown in table 1 below:
Figure RE-GDA0003175779210000061
the invention mainly enables the card locking data of the SIM card to be self-adaptive, thereby enabling the data acquisition of the SIM LOCK to be more flexible and the SIM LOCK to have higher applicability. The mobile phone manufactured by a mobile phone manufacturer can be applied to a plurality of operators by using the same SIM LOCK software, and meanwhile, the operators can put the mobile phone with the same SIM LOCK software into different countries.
Exemplary method
The method for automatically adapting and locking the SIM data in the embodiment can be applied to a mobile terminal, such as a mobile phone. As shown in fig. 1 in detail, the method for automatically adapting and locking SIM data includes the following steps:
s100, detecting the startup initialization of the mobile phone and judging whether an SIM card is inserted for the first time;
in the embodiment of the invention, when the mobile phone is started, whether the mobile phone is started up and initialized is detected;
and when the startup initialization of the mobile phone is detected, judging whether the mobile phone is inserted into the SIM card for the first time.
I.e. to detect whether the handset is currently inserted for the first time for use with a SIM.
Step S200, when the mobile phone is judged to be the SIM card inserted for the first time, obtaining the SIM card data inserted for the first time and storing the SIM card data as SIM LOCK card locking data;
in this embodiment, when it is determined that the SIM card is inserted for the first time, the SIM card data inserted for the first time is obtained and stored as the SIM LOCK data.
When the SIM card detected when the mobile phone is initialized and started currently is judged to be the first SIM card, the SIM card data inserted for the first time is obtained; the invention will take the SIM card data inserted for the first time as the basis of the SIM LOCK card locking data, and store the data in the nonvolatile memory. For the next test to check if the SIM card insertion is legitimate.
In the embodiment of the invention, when the mobile phone is used for the first time, the SIM data inserted into the SIM card for the first time is detected to be stored as the SIM LOCK data, and then the mobile phone is controlled to enter the main interface to be normally used.
Step S300, when the mobile phone is judged not to be the SIM card inserted for the first time, comparing the currently inserted SIM card data of the mobile phone with the SIM LOCK card data inserted for the first time, judging whether the currently inserted SIM card is a legal card or not, and judging whether the currently inserted SIM card can be normally used or not;
in the embodiment of the invention, when the mobile phone is judged not to be inserted with the SIM card for the first time, the currently inserted SIM card data of the mobile phone is compared with the first inserted SIM LOCK card data, whether the currently inserted SIM card is a legal card or not is judged, and whether the currently inserted SIM card can be normally used or not is judged.
In other words, in the embodiment of the present invention, when it is determined that the mobile phone is not the first time to insert the SIM card, the currently inserted SIM card data is acquired; and controlling the mobile phone to read the SIM LOCK card locking data stored by the SIM card inserted for the first time from the nonvolatile memory; comparing the currently inserted SIM card data of the mobile phone with the first inserted SIM LOCK card locking data, judging whether the currently inserted SIM card is a legal SIM card according to whether the currently inserted SIM card data of the mobile phone is consistent with the first inserted SIM LOCK card locking data, and judging whether the currently inserted SIM card can be normally used. Specifically, as described in step S400 and step S500.
Step S400, when the data of the currently inserted SIM card is the same as the data of the SIM LOCK card which is inserted for the first time, judging that the currently inserted SIM card is a legal card, and controlling the current SIM card to be normally used;
in the embodiment of the invention, when the data of the currently inserted SIM card is the same as the data of the SIM LOCK card which is inserted for the first time, the currently inserted SIM card is judged to be a legal card, and the current SIM card is controlled to be normally used. For example, when the data of the currently inserted SIM card is the same as the data of the SIM LOCK card inserted for the first time, the currently inserted SIM card is judged to be a legal card, the mobile phone is controlled to be normally used, the mobile phone is controlled to enter a main interface, and the current SIM card is controlled to be normally used by being plugged into a network.
Among them, SIM LOCK is a combination LOCK of a SIM card of a cellular phone, which is a built-in function in many mobile phones that allows a phone service provider to LOCK the phone for use only in certain situations. These situations typically involve reserving telephone service, for example, only allowing the phone to be used in a particular country.
Step S500, when the data of the currently inserted SIM card is different from the data of the SIM LOCK card inserted for the first time, the mobile phone cannot be locked.
In the embodiment of the invention, when the data of the currently inserted SIM card is different from the data of the SIM LOCK card inserted for the first time, the locking mobile phone cannot be used. Namely, when the currently inserted SIM card data is different from the SIM LOCK data inserted for the first time, it is determined as an illegal SIM card, and enters the card locking interface, so that the locked mobile phone cannot be used.
In the embodiment of the invention, the identity of the sim card mainly comprises four parameters of iccidimsi GID1 GID 2. The SIM card LOCK card data (SIM LOCK card data) may include, but is not limited to, MCC, MNC, IMSI, GID1, GID2, and the like. Wherein Mobile Country Code, MNC: the Mobile network codes Mobile network number is used for identifying the Mobile network to which the Mobile user belongs, and the imsi is the only identification number used for network authentication. The GIDs 1 and 2 are unnecessary files in the SIM card file system, called "group ID codes", and are mainly used for SIM cards issued by the same operator, and when they need to be distinguished for different services, the ID is used for identification and distinction.
In the embodiment of the invention, when the SIM card is inserted into the mobile phone for the first time, the SIM card data is obtained and used as the card locking data (namely, legal card) of the SIM LOCK. Therefore, mobile phone manufacturers can not consider mobile phone SIM LOCK data when producing mobile phones, and when an operator LOCKs a card, the card of the type can be locked only by inserting the SIM card to be locked into the mobile phone and starting up the mobile phone for initialization. When an operator or a manufacturer sells a mobile phone model to a plurality of countries, the scheme can greatly save the development time of SIM LCOK, can adapt to the SIM card data of the plurality of countries by only one set of SIM LOCK software, and can be initialized by starting up and inserting legal cards when selling the mobile phone.
The invention is further illustrated in detail by the following specific application examples:
step S20, start;
step S21, starting up initialization, and entering step S22;
step S22, detecting whether the mobile phone is inserted with the SIM card for the first time, if not, entering step S23, and if yes, entering step S30;
step S23, reading the SIM LOCK data stored in the first card, and entering step S24;
step S24, judging whether the card is legal, if not, going to step S25, if yes, going to step S27; comparing the currently inserted SIM card data of the mobile phone with the SIM LOCK data inserted for the first time, judging whether the currently inserted SIM card is a legal SIM card according to whether the currently inserted SIM card data of the mobile phone and the SIM LOCK data inserted for the first time are consistent, judging whether the currently inserted SIM card is a legal SIM card and judging whether the currently inserted SIM card can be normally used, if so, judging that the currently inserted SIM card is a legal SIM card, and if not, entering step S27, and if not, entering step S25.
Step S25, entering a card locking interface, and entering step S26;
step S26, whether the unlocking is successful or not, if yes, the step S27 is carried out, and if not, the step S25 is returned to;
step S27, entering a main interface for normal use; and proceeds to step 31.
And step S31, end.
The invention can automatically match the SIM LOCK data according to the SIM card put on the market of the mobile phone, thereby avoiding the redevelopment and the reduping of mobile phone software and saving the development and production cost of the mobile phone.
Exemplary devices
As shown in fig. 3, the present embodiment also provides an apparatus for automatically adapting a locked SIM data device, the apparatus comprising:
the detection module 31 is configured to detect that the mobile phone is initialized when being powered on and determine whether the SIM card is inserted for the first time;
the first judging module 32 is configured to, when it is judged that the mobile phone is the first time SIM card is inserted, obtain SIM card data inserted for the first time, and store the SIM card data as SIM LOCK card locking data;
a second judging module 33, configured to compare the currently inserted SIM card data of the mobile phone with the first inserted SIM LOCK data when it is judged that the mobile phone is not the first inserted SIM card, judge whether the currently inserted SIM card is a legal card, and judge whether the currently inserted SIM card can be used normally;
the first control module 34 is configured to determine that the currently inserted SIM card is a valid card and control the current SIM card to be normally used when the currently inserted SIM card data is the same as the SIM LOCK data inserted for the first time;
the second control module 35 is configured to LOCK the mobile phone to be unusable when the currently inserted SIM card data is different from the SIM LOCK card data inserted for the first time, which is specifically described above.
Based on the above embodiments, the present invention further provides a mobile terminal, and a schematic block diagram thereof may be as shown in fig. 4. The mobile terminal comprises a processor, a memory, a network interface, a display screen and an SIM card slot which are connected through a system bus. Wherein the processor of the mobile terminal is configured to provide computing and control capabilities. The memory of the mobile terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the mobile terminal is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a method of automatically adapting lock SIM data. The display screen of the mobile terminal can be a liquid crystal display screen or an electronic ink display screen, and the SIM card slot of the mobile terminal is arranged in the mobile terminal in advance.
It will be understood by those skilled in the art that the block diagram of fig. 4 is only a block diagram of a portion of the structure associated with the inventive arrangements and is not intended to limit the mobile terminal to which the inventive arrangements may be applied, as a particular mobile terminal may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a mobile terminal is provided, the mobile terminal includes a memory, a processor, and an image display program stored in the memory and executable on the processor, and the processor implements the following operation instructions when executing the image display program:
detecting the startup initialization of the mobile phone and judging whether an SIM card is inserted for the first time;
when the mobile phone is judged to be the SIM card inserted for the first time, obtaining the SIM card data inserted for the first time and storing the SIM card data as SIM LOCK card locking data;
when the mobile phone is judged not to be the SIM card inserted for the first time, comparing the currently inserted SIM card data of the mobile phone with the first inserted SIM LOCK card data, judging whether the currently inserted SIM card is a legal card or not, and judging whether the currently inserted SIM card can be normally used or not;
when the data of the currently inserted SIM card is the same as the data of the SIM LOCK card which is inserted for the first time, judging that the currently inserted SIM card is a legal card, and controlling the current SIM card to be normally used;
when the data of the currently inserted SIM card is different from the data of the SIM LOCK inserted for the first time, the locking mobile phone cannot be used.
The step of detecting the mobile phone startup initialization and judging whether the SIM card is inserted for the first time comprises the following steps:
detecting whether the mobile phone is started up and initialized;
and when the startup initialization of the mobile phone is detected, judging whether the mobile phone is inserted into the SIM card for the first time.
The method for automatically adapting and locking the SIM data, wherein when the SIM card is judged to be inserted for the first time, the step of acquiring the SIM card data inserted for the first time and storing the SIM card data as the SIM LOCK card data comprises the following steps:
when the mobile phone is judged to be the SIM card inserted for the first time, obtaining the SIM card data inserted for the first time;
and storing the acquired SIM card data inserted for the first time into a nonvolatile memory as the SIM LOCK card locking data basis.
Wherein, the step of storing the acquired SIM card data inserted for the first time as SIM LOCK card data to the non-volatile memory further includes:
and when the SIM data of the SIM card inserted for the first time is stored as SIM LOCK data, controlling to enter the main interface and controlling the normal use of the mobile phone.
Wherein, when judging that the mobile phone is not the first time inserted SIM card, comparing the current SIM card data inserted by the mobile phone with the first time inserted SIM LOCK data, judging whether the current SIM card is a legal card, and judging whether the current SIM card can be normally used comprises:
when the mobile phone is judged not to be inserted into the SIM card for the first time, acquiring the data of the currently inserted SIM card; and controlling the mobile phone to read the SIM LOCK card locking data stored by the SIM card inserted for the first time from the nonvolatile memory;
comparing the currently inserted SIM card data of the mobile phone with the SIM LOCK data inserted for the first time, judging whether the currently inserted SIM card is a legal card or not, and judging whether the currently inserted SIM card can be normally used or not.
Wherein, the step of judging the currently inserted SIM card as a legal card and controlling the normal use of the current SIM card when the data of the currently inserted SIM card is the same as the data of the SIM LOCK card inserted for the first time comprises the following steps:
and when the data of the currently inserted SIM card is the same as the data of the SIM LOCK card which is inserted for the first time, judging that the currently inserted SIM card is a legal card, controlling the mobile phone to be normally used, controlling the mobile phone to enter a main interface, and controlling the current SIM card to be normally used by being plugged into a network.
Wherein, when the data of the currently inserted SIM card is different from the data of the SIM LOCK card inserted for the first time, the step of locking the mobile phone which can not be used comprises the following steps:
and when the currently inserted SIM card data is different from the SIM LOCK data inserted for the first time, judging that the SIM card is illegal, entering a card locking interface, and locking the mobile phone to be unusable.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when executed. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the present invention discloses a method, an apparatus, a mobile terminal and a storage medium for automatically adapting and locking SIM data, wherein the method comprises: detecting the startup initialization of the mobile phone and judging whether an SIM card is inserted for the first time; when the mobile phone is judged to be the SIM card inserted for the first time, obtaining the SIM card data inserted for the first time and storing the SIM card data as SIM LOCK card locking data; when the mobile phone is judged not to be the SIM card inserted for the first time, comparing the currently inserted SIM card data of the mobile phone with the first inserted SIM LOCK card data, judging whether the currently inserted SIM card is a legal card or not, and judging whether the currently inserted SIM card can be normally used or not; when the data of the currently inserted SIM card is the same as the data of the SIM LOCK card which is inserted for the first time, judging that the currently inserted SIM card is a legal card, and controlling the current SIM card to be normally used; when the data of the currently inserted SIM card is different from the data of the SIM LOCK card inserted for the first time, the mobile phone cannot be locked, and the SIM LOCK data can be automatically matched according to the SIM card put on the market of the mobile phone, so that the redevelopment and the reduplication of mobile phone software are avoided, and the development and production cost of the mobile phone is saved.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of automatically adapting lock SIM data, the method comprising:
detecting the startup initialization of the mobile phone and judging whether an SIM card is inserted for the first time;
when the mobile phone is judged to be the SIM card inserted for the first time, obtaining the SIM card data inserted for the first time and storing the SIM card data as SIM LOCK card locking data;
when the mobile phone is judged not to be the SIM card inserted for the first time, comparing the currently inserted SIM card data of the mobile phone with the first inserted SIM LOCK card data, judging whether the currently inserted SIM card is a legal card or not, and judging whether the currently inserted SIM card can be normally used or not;
when the data of the currently inserted SIM card is the same as the data of the SIM LOCK card which is inserted for the first time, judging that the currently inserted SIM card is a legal card, and controlling the current SIM card to be normally used;
when the data of the currently inserted SIM card is different from the data of the SIM LOCK inserted for the first time, the locking mobile phone cannot be used.
2. The method of claim 1, wherein the step of detecting a power-on initialization of the mobile phone to determine whether the SIM card is inserted for the first time comprises:
detecting whether the mobile phone is started up and initialized;
and when the startup initialization of the mobile phone is detected, judging whether the mobile phone is inserted into the SIM card for the first time.
3. The method according to claim 1, wherein the step of obtaining the first inserted SIM card data and storing the first inserted SIM card data as SIM LOCK data when the mobile phone is determined to be the first inserted SIM card comprises:
when the mobile phone is judged to be the SIM card inserted for the first time, obtaining the SIM card data inserted for the first time;
and storing the acquired SIM card data inserted for the first time into a nonvolatile memory as the SIM LOCK card locking data basis.
4. The method of claim 3, wherein the step of storing the acquired first inserted SIM card data as SIM LOCK card data to a non-volatile memory further comprises, after the step of automatically adapting the SIM card data to LOCK the SIM card, the steps of:
and when the SIM data of the SIM card inserted for the first time is stored as SIM LOCK data, controlling to enter a main interface and controlling the normal use of the mobile phone.
5. The method according to claim 1, wherein when it is determined that the mobile phone is not the first time inserted SIM card, comparing the currently inserted SIM card data of the mobile phone with the first time inserted SIM LOCK data, determining whether the currently inserted SIM card is a legal card, and determining whether the currently inserted SIM card can be normally used comprises:
when the mobile phone is judged not to be inserted into the SIM card for the first time, acquiring the data of the currently inserted SIM card; and controlling the mobile phone to read the SIM LOCK card locking data stored by the SIM card inserted for the first time from the nonvolatile memory;
comparing the currently inserted SIM card data of the mobile phone with the SIM LOCK data inserted for the first time, judging whether the currently inserted SIM card is a legal card or not, and judging whether the currently inserted SIM card can be normally used or not.
6. The method according to claim 1, wherein the step of determining that the currently inserted SIM card is a legal card and controlling the current SIM card to be normally used when the currently inserted SIM card data is the same as the first inserted SIM LOCK data comprises:
and when the data of the currently inserted SIM card is the same as the data of the SIM LOCK card which is inserted for the first time, judging that the currently inserted SIM card is a legal card, controlling the mobile phone to be normally used, controlling the mobile phone to enter a main interface, and controlling the current SIM card to be normally used by being plugged into a network.
7. The method of claim 1, wherein the step of locking the mobile phone out of use when the currently inserted SIM card data is different from the first inserted SIM LOCK card data comprises:
and when the currently inserted SIM card data is different from the SIM LOCK data inserted for the first time, judging that the SIM card is illegal, entering a card locking interface, and locking the mobile phone to be unusable.
8. An apparatus for automatically adapting a locked SIM data device, the apparatus comprising:
the detection module is used for detecting the startup initialization of the mobile phone and judging whether the SIM card is inserted for the first time;
the first judgment module is used for acquiring the SIM card data inserted for the first time and storing the SIM card data as SIM LOCK card locking data when the mobile phone is judged to be inserted for the first time;
the second judging module is used for comparing the currently inserted SIM card data of the mobile phone with the first inserted SIM LOCK card locking data when the mobile phone is judged not to be inserted into the SIM card for the first time, judging whether the currently inserted SIM card is a legal card or not and judging whether the currently inserted SIM card can be normally used or not;
the first control module is used for judging that the currently inserted SIM card is a legal card and controlling the normally used current SIM card when the currently inserted SIM card data is the same as the SIM LOCK data which is inserted for the first time;
and the second control module is used for locking the mobile phone to be unusable when the data of the currently inserted SIM card is different from the data of the SIM LOCK inserted for the first time.
9. A mobile terminal, characterized in that it comprises a memory, a processor and an image display program stored in said memory and executable on said processor, said processor implementing the steps of the method for automatically adapting a lock to SIM data according to any one of claims 1 to 7 when executing said image display program.
10. A computer-readable storage medium, having stored thereon an image display program which, when executed by a processor, performs the steps of the method of automatically adapting lock SIM data according to any one of claims 1-7.
CN202110500532.1A 2021-05-08 2021-05-08 Method and device for automatically adapting and locking SIM (subscriber identity Module) data, mobile terminal and storage medium Pending CN113286304A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110500532.1A CN113286304A (en) 2021-05-08 2021-05-08 Method and device for automatically adapting and locking SIM (subscriber identity Module) data, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110500532.1A CN113286304A (en) 2021-05-08 2021-05-08 Method and device for automatically adapting and locking SIM (subscriber identity Module) data, mobile terminal and storage medium

Publications (1)

Publication Number Publication Date
CN113286304A true CN113286304A (en) 2021-08-20

Family

ID=77278216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110500532.1A Pending CN113286304A (en) 2021-05-08 2021-05-08 Method and device for automatically adapting and locking SIM (subscriber identity Module) data, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113286304A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114040044A (en) * 2021-09-29 2022-02-11 深圳鑫想科技有限责任公司 Method, system and storage medium for dynamically switching and locking SIM card of high-pass platform

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090163245A1 (en) * 2005-09-08 2009-06-25 Nec Corporation Mobile communication terminal and mobile communication method
CN101621790A (en) * 2009-07-08 2010-01-06 中兴通讯股份有限公司 Lock-card locking method and device for wireless communication
CN109525698A (en) * 2018-11-19 2019-03-26 惠州Tcl移动通信有限公司 A kind of SIM card identification configuration method, storage medium and mobile phone

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090163245A1 (en) * 2005-09-08 2009-06-25 Nec Corporation Mobile communication terminal and mobile communication method
CN101621790A (en) * 2009-07-08 2010-01-06 中兴通讯股份有限公司 Lock-card locking method and device for wireless communication
CN109525698A (en) * 2018-11-19 2019-03-26 惠州Tcl移动通信有限公司 A kind of SIM card identification configuration method, storage medium and mobile phone

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114040044A (en) * 2021-09-29 2022-02-11 深圳鑫想科技有限责任公司 Method, system and storage medium for dynamically switching and locking SIM card of high-pass platform

Similar Documents

Publication Publication Date Title
US7840234B2 (en) Method and mobile communication device capable of resuming operating function of temporarily disabled SIM card
KR101504855B1 (en) Method for exporting on a secure server data comprised on a uicc comprised in a terminal
KR100664110B1 (en) Usage restriction setting method for mobile communication device
EP1717767B1 (en) A forensic toolkit and methods for accessing data stored on electronic smart cards
EP2905715A1 (en) Method, system and terminal for encrypting/decrypting application program on communication terminal
EP1653754A2 (en) Security method and cellular phone with security features
US9390259B2 (en) Method for activating an operating system in a security module
JP2004166215A (en) Method of locking mobile communication terminal
EP1571859A2 (en) Equipment identity coding method of a mobile user equipment
CN102149074B (en) A kind of method that terminal and smart card are locked or unlock and device
CN101690146A (en) Communication apparatus
US20150105058A1 (en) Method of sim/usim personalizing user equipment
CN113286304A (en) Method and device for automatically adapting and locking SIM (subscriber identity Module) data, mobile terminal and storage medium
CN106793019B (en) Method and device for attaching APN (Access Point name) and mobile terminal
CN109525698B (en) SIM card identification configuration method, storage medium and mobile phone
KR100734395B1 (en) method for copying installed card data at mobile phone and mobile phone thereof
US11698994B2 (en) Method for a first start-up operation of a secure element which is not fully customized
CN113301570B (en) Anti-theft method and device for SIM card
CN101742730B (en) Intelligent card-based machine-card binding method and mobile terminal used for same
US9363362B2 (en) Method of performing network personalization on mobile devices
KR101339472B1 (en) Method for reading a phonebook data in subscriber identity module card, and terminal thereof
WO2006000529A1 (en) Method for associating an application with a subscriber identity module
KR100755915B1 (en) Mobile banking method through mobile telecommunication phone
KR100641167B1 (en) Initialization method for mobile communication terminal
KR101160361B1 (en) Method of Providing a Mobile Equipment Service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210820

RJ01 Rejection of invention patent application after publication