CN113840278A - Equipment state modification method and device and electronic equipment - Google Patents

Equipment state modification method and device and electronic equipment Download PDF

Info

Publication number
CN113840278A
CN113840278A CN202010595435.0A CN202010595435A CN113840278A CN 113840278 A CN113840278 A CN 113840278A CN 202010595435 A CN202010595435 A CN 202010595435A CN 113840278 A CN113840278 A CN 113840278A
Authority
CN
China
Prior art keywords
verification code
mobile terminal
verification
state
terminal
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
CN202010595435.0A
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.)
Oneplus Technology Shenzhen Co Ltd
Original Assignee
Oneplus Technology Shenzhen Co 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 Oneplus Technology Shenzhen Co Ltd filed Critical Oneplus Technology Shenzhen Co Ltd
Priority to CN202010595435.0A priority Critical patent/CN113840278A/en
Publication of CN113840278A publication Critical patent/CN113840278A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data
    • H04W8/245Transfer of terminal data from a network towards a terminal

Abstract

The application provides a method and a device for modifying equipment state and electronic equipment, wherein the method is applied to the electronic equipment, the electronic equipment is respectively in communication connection with a mobile terminal and a server, and the method comprises the following steps: if the mobile terminal is in a flashing mode, acquiring a terminal identifier of the mobile terminal; generating a first verification code corresponding to the mobile terminal based on the terminal identification; the terminal identification and the first verification code are sent to a server, so that the server performs first verification on the first verification code based on the terminal identification, and a second verification code is generated according to the first specified string when the first verification is successful; wherein, the first appointed string has a corresponding relation with the terminal identification; receiving a second verification code fed back by the server, and modifying the equipment state of the mobile terminal based on the second verification code; the device states include a locked state and an unlocked state. The method and the device allow the user to modify the device authority of the mobile terminal, and improve user experience.

Description

Equipment state modification method and device and electronic equipment
Technical Field
The present application relates to the field of mobile terminal technologies, and in particular, to a method and an apparatus for modifying a device state, and an electronic device.
Background
Currently, a mobile terminal usually does not open the right to modify the device state to the user, and the device state is used to decide whether the user can freely refresh software to the mobile terminal and whether to enforce authentication, wherein the device state includes LOCKED state and UNLOCKED state, when the device state is LOCKED state, the user is prevented from refreshing new software to the mobile terminal, and when the device state is UNLOCKED state, the user is allowed to refresh new software to the mobile terminal. The device state of the existing mobile terminal is usually defaulted to the LOCKED state, and the right for modifying the device state is not opened to the user, so as to avoid the tampering of the related functions of the operator, but the operation of the user on the mobile terminal is limited, which results in poor user experience.
Disclosure of Invention
In view of this, an object of the present application is to provide a method and an apparatus for modifying a device state, and an electronic device, which allow a user to modify a device permission of a mobile terminal, and improve user experience.
In a first aspect, an embodiment of the present application provides a method for modifying a device status, where the method is applied to an electronic device, and the electronic device is in communication connection with a mobile terminal and a server, respectively, and the method includes: if the mobile terminal is in a flashing mode, acquiring a terminal identification of the mobile terminal; generating a first verification code corresponding to the mobile terminal based on the terminal identification; sending the terminal identification and the first verification code to the server, so that the server performs first verification on the first verification code based on the terminal identification, and generating a second verification code according to a first specified string when the first verification is successful; the first specified string and the terminal identification have a corresponding relation; receiving the second verification code fed back by the server, and modifying the equipment state of the mobile terminal based on the second verification code; the device states include a locked state and an unlocked state.
In one embodiment, the step of generating the first verification code corresponding to the mobile terminal based on the terminal identifier includes: inserting a second specified string into the terminal identification; processing the terminal identification inserted with the second specified string by using a hash function to obtain a first hash value; and taking the first hash value as a first verification code corresponding to the mobile terminal.
In one embodiment, the device state of the mobile terminal defaults to the locked state; the step of modifying the device state of the mobile terminal based on the second verification code comprises: and swiping the second verification code into the mobile terminal by utilizing a pre-stored flashing tool so as to enable the mobile terminal to perform second verification on the second verification code, and modifying the locking state into a non-locking state when the second verification is successful.
In one embodiment, the terminal identification includes one or more of an IMEI number, a PCBA number, and a production number.
In a second aspect, an embodiment of the present application further provides a method for modifying a device state, where the method is applied to a server, the server is in communication connection with an electronic device, and the electronic device is configured to modify the device state of a mobile terminal, and the method includes: receiving a terminal identification and a first verification code of the mobile terminal, which are sent by the electronic equipment; the first verification code is generated by the electronic equipment pair based on the terminal identification; performing first verification on the first verification code based on the terminal identification; if the first verification is successful, generating a second verification code according to the first specified string and feeding the second verification code back to the electronic equipment, so that the electronic equipment modifies the equipment state of the mobile terminal based on the second verification code; the device states include a locked state and an unlocked state.
In one embodiment, the step of performing the first verification on the first verification code based on the terminal identifier includes: generating a third verification code corresponding to the mobile terminal based on the terminal identification; and if the first verification code is the same as the third verification code, determining that the first verification is successful.
In one embodiment, the step of generating a second verification code according to the first specified string and feeding back the second verification code to the electronic device if the first verification is successful includes: inserting a second specified string into the first specified string; processing the first specified string inserted into the second specified string by using a hash function to obtain a second hash value; and encrypting the second hash value by using an encryption algorithm to obtain a second verification code.
In a third aspect, an embodiment of the present application further provides an apparatus for modifying a device state, where the apparatus is applied to an electronic device, the electronic device is configured to modify a device state of a mobile terminal, and the electronic device is communicatively connected to the mobile terminal and a server respectively, and the apparatus includes: the identification acquisition module is used for acquiring the terminal identification of the mobile terminal; the first verification code generation module is used for generating a first verification code corresponding to the mobile terminal based on the terminal identification; the first verification code sending module is used for sending the terminal identification and the first verification code to the server so that the server performs first verification on the first verification code based on the terminal identification, and generates and feeds back a second verification code according to a first specified string when the first verification is successful; the first specified string and the terminal identification have a corresponding relation; and the state modification module is used for receiving the second verification code fed back by the server and modifying the equipment state of the mobile terminal based on the second verification code.
In a fourth aspect, an embodiment of the present application further provides an apparatus for modifying a device state, where the apparatus is applied to a server, the server is in communication connection with an electronic device, the electronic device is configured to modify the device state of a mobile terminal, and the device state includes a locked state and an unlocked state, and the apparatus includes: the first verification code receiving module is used for receiving the terminal identifier of the mobile terminal and the first verification code sent by the electronic equipment; the first verification code is generated by the electronic equipment pair based on the terminal identification; the verification module is used for verifying the first verification code for the first time based on the terminal identification; and the second verification code sending module is used for generating a second verification code according to the first specified string and feeding the second verification code back to the electronic equipment if the first verification is successful, so that the electronic equipment modifies the equipment state of the mobile terminal based on the second verification code.
In a fifth aspect, an embodiment of the present application further provides an electronic device, including a processor and a memory; the memory has stored thereon a computer program which, when executed by the processor, performs the method of any one of the aspects as provided in the first aspect, or performs the method as provided in the second aspect.
In a sixth aspect, embodiments of the present application further provide a computer storage medium for storing computer software instructions for performing any one of the methods provided in the first aspect, or for performing any one of the methods provided in the second aspect.
The method, the device and the electronic equipment for modifying the equipment state are applied to the electronic equipment, the terminal identification of the mobile terminal is obtained if the mobile terminal is in a flashing mode, then the first verification code corresponding to the mobile terminal is generated based on the terminal identification, the terminal identification and the first verification code are sent to a server, so that the server performs first verification on the first verification code based on the terminal identification, a second verification code is generated according to a first specified string when the first verification is successful, and if the second verification code fed back by the server is received, the equipment state of the mobile terminal can be modified based on the second verification code. The first specified string and the terminal identification have a corresponding relationship, and the equipment state comprises a locking state and a non-locking state. According to the method, the terminal identification of the mobile terminal can be obtained when the mobile terminal is in the flashing mode, so that the first verification code is generated based on the terminal identification, the server verifies the first verification code and feeds back the second verification code, and further the equipment state of the mobile terminal can be modified based on the second verification code.
The method, the device and the electronic equipment for modifying the equipment state are applied to a server, if a terminal identifier and a first verification code of a mobile terminal sent by the electronic equipment are received, the first verification code can be verified for the first time based on the terminal identifier, if the first verification is successful, a second verification code is generated according to a first specified string and fed back to the electronic equipment, and therefore the electronic equipment can modify the equipment state of the mobile terminal based on the second verification code. The first verification code is generated by the electronic equipment pair based on the terminal identification, and the equipment state comprises a locking state and a non-locking state. The method verifies the first verification code based on the terminal identification sent by the electronic equipment, and provides the second verification code for the electronic equipment when the verification is successful, so that the electronic equipment modifies the equipment state based on the second verification code.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the detailed description of the present application or the technical solutions in the prior art, the drawings needed to be used in the detailed description of the present application or the prior art description will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a method for modifying a device status according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of generating a first hash value according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another method for modifying a device status according to an embodiment of the present application;
fig. 4a is a schematic diagram of generating a second hash value according to an embodiment of the present application;
fig. 4b is a schematic diagram of generating a second verification code according to an embodiment of the present application;
FIG. 4c is a schematic diagram of another embodiment of the present application for generating a second verification code;
FIG. 5 is a schematic diagram of a target UI interface provided by an embodiment of the application;
FIG. 6 is a schematic diagram of a delivery interface provided by an embodiment of the present application;
fig. 7 is a schematic structural diagram of an apparatus for modifying a device status according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of another apparatus state modification device provided in an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the embodiments, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, a user cannot modify a device state of a mobile terminal by using a method and a device and electronic equipment, and can open the permission of modifying the device permission of the mobile terminal to the user, so that the requirement of the user for refreshing software in the mobile terminal is met, and the user experience is improved.
In order to facilitate understanding of the present embodiment, first, a method for modifying a device state disclosed in the embodiments of the present application is described in detail, where the method is applied to an electronic device, and the electronic device is respectively in communication connection with a mobile terminal and a server, where the electronic device may include a computer and may also include a tablet or a mobile phone for modifying a device state of the mobile terminal, and the mobile terminal may include a tablet or a mobile phone for modifying a device state, and the electronic device and the mobile terminal may be connected in a wired or wireless manner. Specifically, referring to a flow diagram of a method for modifying a device status shown in fig. 1, the method mainly includes the following steps S102 to S108:
and step S102, if the mobile terminal is in the flashing mode, acquiring the terminal identification of the mobile terminal.
Here, the flash mode (fastboot mode) may be understood as a mode for performing operations such as reinstallation or update on a system of the Mobile terminal, and the terminal identifier may be understood as information unique to the Mobile terminal, such as an IMEI (International Mobile Equipment Identity) number, a PCBA number (Printed Circuit Board + Assembly), a production number (serial number), and the like. In one embodiment, a user may operate the mobile terminal to enter a flashing mode, and read a terminal identifier of the mobile terminal after the mobile terminal enters the flashing mode. For example, the mobile terminal is powered off, then a volume up-down key of the mobile terminal is pressed at the same time, then the mobile terminal is started, the flashing mode of the mobile terminal can be awakened, and then the terminal identifier of the mobile terminal is obtained through a user input or electronic equipment reading mode.
And step S104, generating a first verification code corresponding to the mobile terminal based on the terminal identification.
In one embodiment, the terminal identifier may be salted, and then a value corresponding to the salted terminal identifier is generated by using an objective function, for example, if the objective function uses a hash function (SHA256), a hash value corresponding to the salted terminal identifier may be generated by using the objective function, and the generated hash value is used as the first verification code.
Step S106, the terminal identification and the first verification code are sent to the server, so that the server performs first verification on the first verification code based on the terminal identification, and a second verification code is generated according to the first specified string when the first verification is successful.
In an embodiment, the first specified string may be a character string at a specified position in the terminal identifier, for example, if the terminal identifier includes an IMEM number, the first specified string may be a character string at a specified position in the IMEI number; if the terminal identifier includes a production number, the first specified character string may be the production number. In specific implementation, a user can access the server through a specified website, the server can also be understood as an official website of the mobile terminal, the first verification code and the terminal identification are filled in through a page configured in advance in the server, so that the first verification code and the terminal identification are sent to the server, the server verifies the first verification code based on the terminal identification at the moment, and if verification is successful, the server generates a second verification code based on the first specified string by adopting the same method as the step S104 and feeds the second verification code back to the electronic equipment.
And step S108, receiving the second verification code fed back by the server, and modifying the equipment state of the mobile terminal based on the second verification code.
And when the device state is the non-locking state, the user is allowed to refresh the new software to the mobile terminal. In one embodiment, when the second verification code fed back by the server is received, the electronic device may flush the second verification code into the mobile terminal, and the mobile terminal verifies the second verification code, and when the mobile terminal verifies successfully, the device state of the mobile terminal may be modified.
According to the method for modifying the equipment state, the terminal identification of the mobile terminal can be obtained when the mobile terminal is in the flashing mode, so that the first verification code is generated based on the terminal identification, the server verifies the first verification code and feeds back the second verification code, and the equipment state of the mobile terminal can be modified based on the second verification code.
In an implementation manner, an embodiment of the present application exemplarily provides an implementation manner for generating a first verification code corresponding to a mobile terminal based on a terminal identifier, where a second specified string may be inserted into the terminal identifier, and then the terminal identifier into which the second specified string is inserted is processed by using a hash function to obtain a first hash value, and the first hash value is used as the first verification code corresponding to the mobile terminal. The terminal identification comprises one or more of an IMEI number, a PCBA number and a production number, the second designated character string can be configured in advance, and in specific implementation, the second designated character string can be inserted into any position in the terminal identification through salt adding (salt), so that the security of the terminal identification is increased to a certain extent, and then the SHA256 is used for generating a corresponding first hash value. To facilitate understanding of the method for generating the first verification code provided in the foregoing embodiments, an embodiment of the present application provides a specific implementation manner for generating the first verification code, and referring to a schematic diagram of generating the first hash value shown in fig. 2, in the diagram, "salt 1, string, and salt 2" indicates a terminal identifier inserted with a second specified string, where "salt 1" and "salt 2" indicate the second specified string, and "string" indicates the terminal identifier, which is processed by the hash function SHA256, so that the first verification code hash value can be obtained.
Generally, to avoid tampering with the operator-related functions, the device state of the mobile terminal defaults to a locked state, or the device state in the mobile terminal is directly removed. In order to meet the requirement of a user for modifying the equipment state, the equipment state can be modified based on the second verification code when the second verification code fed back by the server is received, and in specific implementation, the second verification code can be brushed into the mobile terminal by using a pre-stored brushing tool, so that the mobile terminal carries out secondary verification on the second verification code, and the locking state is modified into the unlocking state when the secondary verification is successful. In one embodiment, the second verification code may be encrypted, the mobile terminal needs to decrypt the second verification code, and the mobile terminal itself may also generate a corresponding hash value based on the first specified string, and if the decrypted second verification code is the same as the hash value generated by the mobile terminal, it may be determined that the second verification is successful, and at this time, the mobile terminal may be modified from the locked state to the unlocked state.
With respect to the method for modifying the device status provided in the foregoing embodiment, an embodiment of the present application provides another method for modifying the device status, where the method is applied to a server, the server is in communication connection with an electronic device, and the electronic device is used to modify the device status of a mobile terminal, see a flowchart of another method for modifying the device status shown in fig. 3, where the method mainly includes the following steps S302 to S306:
step S302, receiving the terminal identification and the first verification code of the mobile terminal sent by the electronic equipment.
In an embodiment, the salt (that is, the second specifying string) and the terminal identifier may be fused, that is, the second specifying string is inserted into the terminal identifier, and then the hash function SHA256 is used to generate the first verification code. In specific implementation, the server can be accessed through the electronic device, and the first verification code and the terminal identifier are filled in through a page configured in the server in advance, so that the first verification code and the terminal identifier are received through the page.
And step S304, carrying out first verification on the first verification code based on the terminal identification.
In one embodiment, the server may generate a third verification code based on the terminal identifier, where the third verification code is generated in the same manner as the first verification code, and if the third verification code is the same as the first verification code, it may be determined that the first verification is successful.
In step S306, if the first verification is successful, a second verification code is generated according to the first specified string and is fed back to the electronic device, so that the electronic device modifies the device status of the mobile terminal based on the second verification code.
The first specified string and the terminal identification have a corresponding relation, and the equipment state comprises a locking state and a non-locking state. For example, if the terminal identifier includes an IMEM number, the first specified string may be a character string at a specified position in the IMEI number, and in one embodiment, the server may perform salting processing on the first specified string, insert the second specified string into the first specified string, generate a second hash value corresponding to the first specified string into which the second specified string is inserted by using the SHA256, and encrypt the second hash value to obtain the to-be-second verification code.
According to the method for modifying the equipment state, the first verification code is verified based on the terminal identification sent by the electronic equipment, and the second verification code is provided for the electronic equipment when the verification is successful, so that the electronic equipment modifies the equipment state based on the second verification code.
For the step S304, the embodiment of the present application provides an implementation manner that the first verification code is verified for the first time based on the terminal identifier, and a third verification code corresponding to the mobile terminal may be generated based on the terminal identifier, and when the first verification code is the same as the third verification code, it is determined that the first verification is successful. Specifically, the server performs salting processing on the terminal identifier, generates a hash value corresponding to the salted terminal identifier by using a hash function, and uses the hash value as a third verification code, wherein if the first verification code is the same as the third verification code, it can be determined that the first verification is successful.
In the embodiment of the application, when the step of generating the second verification code according to the first specified string and feeding the second verification code back to the electronic device is executed, the second specified string may be inserted into the first specified string, and then the first specified string inserted into the second specified string is processed by using a hash function to obtain the second hash value, and the second hash value is encrypted by using an encryption algorithm to obtain the second verification code, specifically, refer to a schematic diagram of generating the second hash value shown in fig. 4a, where "salt 1, string, salt2, string, and salt 3" in the diagram represent the first specified string inserted with the second specified string, where "salt 1", "salt 2" and "salt 3" represent the second specified string, and "string" represents the terminal identifier, and the terminal identifier is processed by using the hash function SHA256, so that the second hash value can be obtained. In addition, the embodiment of the present application exemplarily provides a schematic diagram for generating the second verification code, as shown in fig. 4b and 4 c. Referring to a schematic diagram of generating the second verification code shown in fig. 4b, the second hash value is subjected to an encryption Algorithm to obtain a second verification code Signature, where the encryption Algorithm may include, for example, RSA2048private key (Ron Rivest, Adi Shamir, leonarard Adleman) Algorithm, ElGamal Algorithm, Rabin Algorithm, and ECDSA (Elliptic Curve Digital Signature Algorithm); referring to fig. 4c, another schematic diagram of generating the second verification code is shown, where the second verification code is obtained by fusing the second hash value and the digital signature.
Based on the method for modifying the device status provided in the above embodiment, the present application provides a specific implementation of the method for modifying the device status exemplarily, which is as follows, in steps 1 to 6:
step 1, entering a target UI (user interface) interface through an OEM (Original Equipment Manufacturer) function of the mobile terminal. The target UI interface is shown in fig. 5, and the target UI interface is provided with an obtaining method of a terminal identifier, so as To prompt a user To obtain the terminal identifier based on the obtaining method, such as "To be able To unlock devices, prepare by following steps, which are configured in fig. 5, 1.Using the #06# To find devices' IMEI; 2, Using the 'fastboot get unlock code' to get the unlock-code; if your application is summary, we will not be you by mail, this process may take 1 ~ 2weeks ", the user may obtain the IMEI of the mobile terminal based on the above steps, in addition, the target UI shown in FIG. 5 also includes IMEI filling box, PCBA filling box, production number filling box and second verification code filling box, the user fills the terminal identification of the mobile terminal and the second verification code into the corresponding filling box, the second verification is performed, when the second verification is successful, the device status of the mobile terminal may be modified.
And 2, responding to the first operation of the user aiming at the mobile terminal, and acquiring the IMEI of the mobile terminal. The embodiment of the present application exemplarily provides a first operation, for example, a dialing interface of the mobile terminal is called, and the user presses #06# to obtain the IMEI of the mobile terminal.
And 3, if the mobile terminal enters the flashing mode, acquiring the first verification code through the electronic equipment. In specific implementations, see step 3.1 to step 3.3 below:
and 3.1, downloading the flashing tool and decompressing to a specified root directory of the electronic equipment. The flash tool can adopt a fastboot windows.
And 3.2, responding to a second operation of the user for the mobile terminal so as to enable the mobile terminal to enter a flashing mode. The embodiment of the present application exemplarily provides a second operation, for example, a flashing mode in which the mobile terminal is awakened by turning off the mobile terminal, then simultaneously pressing down the volume up-down key, and finally turning on the mobile terminal.
And 3.3, connecting the electronic equipment and the mobile terminal, and obtaining the first verification code through the electronic equipment. In particular, the second specified string may be inserted into the first specified string, and a hash function may be used to generate the corresponding first verification code.
And 4, sending the first verification code and the IMEI to the server to obtain a second verification code (token) fed back by the server. As shown in fig. 6, a user needs to fill an IMEI filling box, a mail filling box, and a first verification code filling box in a sending interface, and by submitting the content of the sending page, a server can verify the first verification code based on the IMEI, and feed back a second verification code through a mailbox when the verification is successful.
And 5, swiping the second verification code into the mobile terminal.
And 6, the mobile terminal modifies the equipment state from the locking state to the non-locking state based on the second verification code.
To sum up, the embodiment of the application combines the specific information (the terminal identifier) of the mobile terminal, the SHA256 function, the salt fusion and the RSA204 asymmetric encryption algorithm to protect the Android device state, and allows the user to modify the device state of the mobile terminal under the condition of successful verification, thereby satisfying the requirement of the user for refreshing software in the mobile terminal and improving the user experience.
For the method for modifying the device status provided in the foregoing embodiment, an embodiment of the present application provides a device for modifying the device status, where the device is applied to an electronic device, the electronic device is used to modify the device status of a mobile terminal, and the electronic device is respectively connected to the mobile terminal and a server in a communication manner, see a schematic structural diagram of the device for modifying the device status shown in fig. 7, and the device mainly includes the following structures:
an identifier obtaining module 702, configured to obtain a terminal identifier of the mobile terminal.
A first verification code generating module 704, configured to generate a first verification code corresponding to the mobile terminal based on the terminal identifier.
A first verification code sending module 706, configured to send the terminal identifier and the first verification code to the server, so that the server performs first verification on the first verification code based on the terminal identifier, and generates and feeds back a second verification code according to the first specified string when the first verification is successful; and the first specified string and the terminal identification have a corresponding relation.
A state modification module 708, configured to receive the second verification code fed back by the server, and modify the device state of the mobile terminal based on the second verification code; the device states include a locked state and an unlocked state.
According to the device for modifying the equipment state, the terminal identification of the mobile terminal can be obtained when the mobile terminal is in the flashing mode, so that the first verification code is generated based on the terminal identification, the server verifies the first verification code and feeds back the second verification code, and the equipment state of the mobile terminal can be modified based on the second verification code.
In one embodiment, the first verification code generation module 704 is further configured to: inserting the second specified string into the terminal identifier; processing the terminal identification inserted with the second specified string by using a hash function to obtain a first hash value; and taking the first hash value as a first verification code corresponding to the mobile terminal.
In one embodiment, the device state of the mobile terminal defaults to a locked state; the state modification module 708 is further configured to: and brushing the second verification code into the mobile terminal by utilizing a prestored flashing tool so as to enable the mobile terminal to perform second verification on the second verification code, and modifying the locking state into the non-locking state when the second verification is successful.
In one embodiment, the terminal identifier includes one or more of an IMEI number, a PCBA number, and a production number.
For the method for modifying the device status provided in the foregoing embodiment, an embodiment of the present application provides a device for modifying the device status, where the device is applied to a server, the server is in communication connection with an electronic device, and the electronic device is used to modify the device status of a mobile terminal, and referring to a schematic structural diagram of the device for modifying the device status shown in fig. 8, the device mainly includes the following structures:
a first verification code receiving module 802, configured to receive a terminal identifier of a mobile terminal and a first verification code sent by an electronic device; the first verification code is generated by the electronic equipment pair based on the terminal identification.
The verification module 804 is configured to perform a first verification on the first verification code based on the terminal identifier.
A second verification code sending module 806, configured to generate a second verification code according to the first specified string and feed back the second verification code to the electronic device if the first verification is successful, so that the electronic device modifies the device state of the mobile terminal based on the second verification code; the device states include a locked state and an unlocked state.
The device for modifying the equipment state provided by the embodiment of the application verifies the first verification code based on the terminal identifier sent by the electronic equipment, and provides the second verification code to the electronic equipment when the verification is successful, so that the electronic equipment modifies the equipment state based on the second verification code.
In one embodiment, the verification module 804 is configured to: generating a third verification code corresponding to the mobile terminal based on the terminal identification; and if the first verification code is the same as the third verification code, determining that the first verification is successful.
In one embodiment, the second verification code sending module 806 is further configured to include: inserting the second specified string into the first specified string; processing the first specified string inserted into the second specified string by using a hash function to obtain a second hash value; and encrypting the second hash value by using an encryption algorithm to obtain a second verification code.
The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned.
The embodiment of the application provides electronic equipment, and particularly, the electronic equipment comprises a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, performs the method of any of the above described embodiments.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device 100 includes: the system comprises a processor 90, a memory 91, a bus 92 and a communication interface 93, wherein the processor 90, the communication interface 93 and the memory 91 are connected through the bus 92; the processor 90 is arranged to execute executable modules, such as computer programs, stored in the memory 91.
The Memory 91 may include a high-speed Random Access Memory (RAM) and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 93 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
Bus 92 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
The memory 91 is used for storing a program, the processor 90 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present application may be applied to the processor 90, or implemented by the processor 90.
The processor 90 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 90. The Processor 90 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 91, and the processor 90 reads the information in the memory 91 and performs the steps of the above method in combination with the hardware thereof.
The computer program product of the readable storage medium provided in the embodiment of the present application includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the foregoing method embodiment, which is not described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A method for modifying the state of equipment is characterized in that the method is applied to electronic equipment which is respectively connected with a mobile terminal and a server in a communication way, and the method comprises the following steps:
if the mobile terminal is in a flashing mode, acquiring a terminal identification of the mobile terminal;
generating a first verification code corresponding to the mobile terminal based on the terminal identification;
sending the terminal identification and the first verification code to the server, so that the server performs first verification on the first verification code based on the terminal identification, and generating a second verification code according to a first specified string when the first verification is successful; the first specified string and the terminal identification have a corresponding relation;
receiving the second verification code fed back by the server, and modifying the equipment state of the mobile terminal based on the second verification code; the device states include a locked state and an unlocked state.
2. The method according to claim 1, wherein the step of generating the first verification code corresponding to the mobile terminal based on the terminal identifier comprises:
inserting a second specified string into the terminal identification;
processing the terminal identification inserted with the second specified string by using a hash function to obtain a first hash value;
and taking the first hash value as a first verification code corresponding to the mobile terminal.
3. The method according to claim 1, wherein the device state of the mobile terminal defaults to the locked state;
the step of modifying the device state of the mobile terminal based on the second verification code comprises:
and swiping the second verification code into the mobile terminal by utilizing a pre-stored flashing tool so as to enable the mobile terminal to perform second verification on the second verification code, and modifying the locking state into a non-locking state when the second verification is successful.
4. The method of claim 1, wherein the terminal identification comprises one or more of an IMEI number, a PCBA number, and a production number.
5. A method for modifying the device state is applied to a server, the server is in communication connection with an electronic device, and the electronic device is used for modifying the device state of a mobile terminal, and the method comprises the following steps:
receiving a terminal identification and a first verification code of the mobile terminal, which are sent by the electronic equipment; the first verification code is generated by the electronic equipment pair based on the terminal identification;
performing first verification on the first verification code based on the terminal identification;
if the first verification is successful, generating a second verification code according to the first specified string and feeding the second verification code back to the electronic equipment, so that the electronic equipment modifies the equipment state of the mobile terminal based on the second verification code; the device states include a locked state and an unlocked state.
6. The method of claim 5, wherein the step of performing the first verification of the first verification code based on the terminal identifier comprises:
generating a third verification code corresponding to the mobile terminal based on the terminal identification;
and if the first verification code is the same as the third verification code, determining that the first verification is successful.
7. The method according to claim 5, wherein the step of generating a second verification code according to the first specified string and feeding back the second verification code to the electronic device if the first verification is successful comprises:
inserting a second specified string into the first specified string;
processing the first specified string inserted into the second specified string by using a hash function to obtain a second hash value;
and encrypting the second hash value by using an encryption algorithm to obtain a second verification code.
8. An apparatus for modifying a device status, the apparatus being applied to an electronic device, the electronic device being configured to modify a device status of a mobile terminal, the electronic device being communicatively connected to the mobile terminal and a server, respectively, the apparatus comprising:
the identification acquisition module is used for acquiring the terminal identification of the mobile terminal if the mobile terminal is in a flashing mode;
the first verification code generation module is used for generating a first verification code corresponding to the mobile terminal based on the terminal identification;
the first verification code sending module is used for sending the terminal identification and the first verification code to the server so that the server performs first verification on the first verification code based on the terminal identification, and generates and feeds back a second verification code according to a first specified string when the first verification is successful; the first specified string and the terminal identification have a corresponding relation;
the state modification module is used for receiving a second verification code fed back by the server and modifying the equipment state of the mobile terminal based on the second verification code; the device states include a locked state and an unlocked state.
9. An apparatus for modifying a device status, the apparatus being applied to a server, the server being communicatively connected to an electronic device, the electronic device being configured to modify the device status of a mobile terminal, the apparatus comprising:
the first verification code receiving module is used for receiving the terminal identifier of the mobile terminal and the first verification code sent by the electronic equipment; the first verification code is generated by the electronic equipment pair based on the terminal identification;
the verification module is used for verifying the first verification code for the first time based on the terminal identification;
a second verification code sending module, configured to generate a second verification code according to the first specified string and feed back the second verification code to the electronic device if the first verification is successful, so that the electronic device modifies the device state of the mobile terminal based on the second verification code; the device states include a locked state and an unlocked state.
10. An electronic device comprising a processor and a memory;
the memory has stored thereon a computer program which, when executed by the processor, performs the method of any of claims 1 to 4, or the method of claims 5 to 7.
11. A computer storage medium for storing computer software instructions for use in the method of any one of claims 1 to 4 or for performing the method of any one of claims 5 to 7.
CN202010595435.0A 2020-06-24 2020-06-24 Equipment state modification method and device and electronic equipment Pending CN113840278A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010595435.0A CN113840278A (en) 2020-06-24 2020-06-24 Equipment state modification method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010595435.0A CN113840278A (en) 2020-06-24 2020-06-24 Equipment state modification method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113840278A true CN113840278A (en) 2021-12-24

Family

ID=78964984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010595435.0A Pending CN113840278A (en) 2020-06-24 2020-06-24 Equipment state modification method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113840278A (en)

Similar Documents

Publication Publication Date Title
US9881348B2 (en) Activation system architecture
US7506381B2 (en) Method for securing an electronic device, a security system and an electronic device
US8966248B2 (en) Secure software file transfer systems and methods for vehicle control modules
JP2021516495A (en) Key management methods, devices, systems, computer equipment and computer programs
JP2017157018A (en) Information processing device, information processing method, information processing program, and trusted platform module
CN112187544A (en) Firmware upgrading method and device, computer equipment and storage medium
CN112579125B (en) Firmware upgrading method and device, electronic equipment and storage medium
JP2009253783A (en) Mobile terminal, data protection method and program for data protection
CN112882750A (en) OTA upgrade package processing method and device and electronic equipment
CN112270001A (en) Key management method, device, server, medium and system
CN113676332B (en) Two-dimensional code authentication method, communication device and storage medium
CN114430346A (en) Login method and device and electronic equipment
CN113127844A (en) Variable access method, device, system, equipment and medium
CN109905395B (en) Method and related device for verifying credibility of client
CN111628863A (en) Data signature method and device, electronic equipment and storage medium
CN111211898A (en) Method for setting control authority of electronic equipment, electronic equipment and readable storage medium
CN113840278A (en) Equipment state modification method and device and electronic equipment
CN107918739B (en) Data protection method and device and storage medium
CN110826034A (en) File signature method and device, electronic equipment and readable storage medium
CN114553542A (en) Data packet encryption method and device and electronic equipment
CN111343170B (en) Electronic signing method and system
CN112699366A (en) Cross-platform login-free secure communication method and device and electronic equipment
CN111625871A (en) Method, system and device for ensuring integrity of virtual machine mirror image
JP2007027955A (en) Mobile communication system, mobile communication terminal and method for storing authentication data
CN113194090B (en) Authentication method, authentication device, terminal device and computer readable storage medium

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