[go: up one dir, main page]

CN106485151B - Method and device for controlling flashing - Google Patents

Method and device for controlling flashing Download PDF

Info

Publication number
CN106485151B
CN106485151B CN201610852049.9A CN201610852049A CN106485151B CN 106485151 B CN106485151 B CN 106485151B CN 201610852049 A CN201610852049 A CN 201610852049A CN 106485151 B CN106485151 B CN 106485151B
Authority
CN
China
Prior art keywords
value
bootstrap program
flag bit
security authentication
program
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.)
Active
Application number
CN201610852049.9A
Other languages
Chinese (zh)
Other versions
CN106485151A (en
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.)
Beijing Xiaomi Mobile Software Co Ltd
Beijing Smartmi Technology Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Beijing Smartmi Technology 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 Beijing Xiaomi Mobile Software Co Ltd, Beijing Smartmi Technology Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610852049.9A priority Critical patent/CN106485151B/en
Publication of CN106485151A publication Critical patent/CN106485151A/en
Application granted granted Critical
Publication of CN106485151B publication Critical patent/CN106485151B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/575Secure boot

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a method and a device for controlling a flashing machine, which are used for improving a bootstrap program so as to facilitate the safety of the control flashing machine. The method comprises the following steps: running a primary bootstrap program; detecting whether the value of a first flag bit in the primary bootstrap program is a first value; the first flag bit is stored in a separate storage area; when the first flag bit is a first value, a secondary bootstrap program is operated; performing security authentication through the secondary bootstrap program; and when the security authentication is passed, running a flashing bootstrap program. By adopting the method provided by the disclosure, the flashing bootstrap program is started to run when the first flag bit in the primary bootstrap program is the first value and the security authentication is passed, namely the flashing bootstrap program can be run after the mobile terminal passes the double verification, so that the safety of flashing is improved by improving the bootstrap program.

Description

Method and device for controlling flashing
Technical Field
The present disclosure relates to the field of communications and computer processing, and in particular, to a method and apparatus for controlling a flash.
Background
With the development of electronic technology, mobile terminals have been commonly used. The core of the mobile terminal is an operating system on top of which a user can install various applications. If the mobile terminal is used for a long time and too many applications are installed, the mobile terminal may have problems of low processing speed, too much memory occupation and the like. At this point, the user may choose to flush, i.e., reinstall the operating system and applications. If the mobile terminal is stolen and is refreshed, the password set by the original user can be deleted, and the safety of the mobile terminal is influenced. Therefore, how to improve the security of the flash is an urgent problem to be solved.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method and apparatus for controlling a brusher.
According to a first aspect of the embodiments of the present disclosure, there is provided a method of controlling a flash, including:
running a primary bootstrap program;
detecting whether the value of a first flag bit in the primary bootstrap program is a first value; the first flag bit is stored in a separate storage area;
when the value of the first flag bit is a first value, a secondary bootstrap program is operated;
performing security authentication through the secondary bootstrap program;
and when the security authentication is passed, running a flashing bootstrap program.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the value of the first flag bit in the first-level bootstrap program is the first value and the security authentication passes, the flashing bootstrap program is started to run, namely the flashing bootstrap program can be run after the mobile terminal passes the double verification, so that the safety of flashing is improved by improving the bootstrap program.
In one embodiment, the method further comprises:
and when the value of the first flag bit is a second value, operating the operating system.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the flag bit is the second value which does not allow the machine refreshing, the operating system is operated, so that a user who does not know the screen locking password can not refresh the machine by changing the value of the first flag bit, and the safety of the machine refreshing is improved.
In one embodiment, the method further comprises:
receiving an input setting operation of the first zone bit through an operating system; the setting operation includes setting a value of the first flag bit to a first value.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the operating system in this embodiment provides an entry for accessing the primary boot program, so that a user can conveniently provide the operating system to change the value of the first flag bit to control whether the machine is allowed to be refreshed, thereby not only meeting the requirements of machine refreshing, but also improving the safety of machine refreshing.
In one embodiment, the method further comprises:
and when the security authentication is not passed, setting the value of the first flag bit to be a second value through the secondary bootstrap program.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the security authentication fails, the value of the first flag bit is set to be the second value through the secondary bootstrap program, so that the condition that the machine is refreshed by other users when the value of the first flag bit is defaulted to be the first value is avoided, and the security of the machine refreshing is improved.
In one embodiment, the performing, by the secondary boot program, security authentication includes:
receiving an input verification code, and not displaying a user name corresponding to the verification code in an interface;
matching the received verification code with a verification code corresponding to a pre-bound user name;
the pre-bound user name is obtained from a primary bootstrap program;
and when the verification codes are matched and consistent, confirming that the security authentication is passed.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the security authentication is carried out, only the verification code input box is displayed, but the user name is not displayed, so that the condition that after other people know the user name, the passwords corresponding to the user name are obtained through other channels is avoided, and the security of the machine-refreshing is further improved.
In one embodiment, the method further comprises:
and encrypting the first flag bit, so that the first flag bit can be accessed only by the primary bootstrap program, the secondary bootstrap program or the appointed application program of the operating system, and can be changed only by the secondary bootstrap program or the appointed application program of the operating system.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: through the encryption of the first zone bit, the safety of the first zone bit can be improved, the first zone bit is not easy to modify, and the safety of the flash is further improved.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for controlling a brusher, including:
the first running module is used for running a primary bootstrap program;
the detection module is used for detecting whether the value of a first flag bit in the primary bootstrap program is a first value; the first flag bit is stored in a separate storage area;
the second operation module is used for operating a secondary bootstrap program when the value of the first zone bit is a first value;
the authentication module is used for carrying out security authentication through the secondary bootstrap program;
and the third running module is used for running the flashing bootstrap program when the security authentication passes.
In one embodiment, the apparatus further comprises:
and the fourth running module is used for running the operating system when the value of the first flag bit is the second value.
In one embodiment, the apparatus further comprises:
the receiving module is used for receiving the input setting operation of the first zone bit through an operating system; the setting operation includes setting a value of the first flag bit to a first value.
In one embodiment, the apparatus further comprises:
and the setting module is used for setting the value of the first flag bit to be a second value through the secondary bootstrap program when the security authentication is not passed.
In one embodiment, the authentication module includes:
the receiving submodule is used for receiving the input verification code, and a user name corresponding to the verification code is not displayed in the interface;
the matching sub-module is used for matching the received verification code with the verification code corresponding to the pre-bound user name; the pre-bound user name is obtained from a primary bootstrap program;
and the confirmation submodule is used for confirming that the security authentication is passed when the verification codes are matched and consistent.
In one embodiment, the apparatus further comprises:
and the encryption module is used for encrypting the first flag bit, so that the first flag bit can only be accessed through the primary bootstrap program, the secondary bootstrap program or the appointed application program of the operating system, and can only be changed through the secondary bootstrap program or the appointed application program of the operating system.
According to a third aspect of the embodiments of the present disclosure, there is provided an apparatus for controlling a brusher, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
running a primary bootstrap program;
detecting whether the value of a first flag bit in the primary bootstrap program is a first value; the first flag bit is stored in a separate storage area;
when the value of the first flag bit is a first value, a secondary bootstrap program is operated;
performing security authentication through the secondary bootstrap program;
and when the security authentication is passed, running a flashing bootstrap program.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart illustrating a method of controlling a flush in accordance with an exemplary embodiment;
FIG. 2 is a flow chart illustrating a method of controlling a flush in accordance with an exemplary embodiment;
FIG. 3 is a flow chart illustrating a method of controlling a flush in accordance with an exemplary embodiment;
FIG. 4 is a flow chart illustrating a method of controlling a flush in accordance with an exemplary embodiment;
FIG. 5 is a flow chart illustrating a method of controlling a flush in accordance with an exemplary embodiment;
FIG. 6 is a flow chart illustrating a method of controlling a flush in accordance with an exemplary embodiment;
FIG. 7 is a block diagram illustrating an apparatus for controlling a flush in accordance with an exemplary embodiment;
FIG. 8 is a block diagram illustrating an apparatus for controlling a flush in accordance with an exemplary embodiment;
FIG. 9 is a block diagram illustrating an apparatus for controlling a flush in accordance with an exemplary embodiment;
FIG. 10 is a block diagram illustrating an apparatus for controlling a flush in accordance with an exemplary embodiment;
FIG. 11A is a block diagram illustrating an authentication module in accordance with an exemplary embodiment;
FIG. 11B is a block diagram illustrating an authentication module in accordance with an exemplary embodiment;
FIG. 11C is a block diagram illustrating an apparatus for controlling a flush in accordance with an exemplary embodiment;
FIG. 12 is a block diagram illustrating an apparatus for controlling a flush in accordance with an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
With the development of electronic technology, mobile terminals have been commonly used. The core of the mobile terminal is an operating system on top of which a user can install various applications. If the mobile terminal is used for a long time and too many applications are installed, the mobile terminal may have problems of low processing speed, too much memory occupation and the like. At this point, the user may select a flush. The function of the mobile terminal can be more complete by flashing, and the mobile terminal can be restored to the original state. Sometimes, the damage of an operating system of the mobile terminal causes function failure or cannot be started, and the problem can be solved through flashing.
In the related technology, the flashing process does not need to verify whether a person who conducts the flashing operation is the user, so that if the mobile terminal is stolen by other people, various passwords set by the original user can be deleted through flashing, and the safety of the mobile terminal is affected. Therefore, how to improve the security of the flash is an urgent problem to be solved.
In the present disclosure, a first level bootstrap program is run; detecting whether the value of a first flag bit in a primary bootstrap program is a first value; the first flag bit indicates whether the flash is allowed or not, and the first value indicates that the flash is allowed; the first flag bit is stored in a separate storage area; when the value of the first flag bit is a first value, a secondary bootstrap program is operated; performing security authentication through a secondary bootstrap program; and when the security authentication is passed, running a flashing bootstrap program. The bootstrap program in this disclosure refers to a short program executed by the system itself after the mobile terminal is started, and the bootstrap process is completed by the system, and after the terminal is started, the bootstrap program is used to input a small amount of instructions and data, and then the instructions and data are input into other programs, and this process is called bootstrap. By adopting the scheme provided by the disclosure, the flashing bootstrap program is started to run when the value of the first flag bit in the primary bootstrap program is the first value and the security authentication is passed, namely the flashing bootstrap program can be run after the mobile terminal passes the double verification, so that the safety of flashing is improved by improving the bootstrap program.
Fig. 1 is a flowchart illustrating a method of controlling a flash according to an exemplary embodiment, which may be implemented by a mobile terminal, as shown in fig. 1, and includes the steps of:
in step S101, a primary boot program is executed;
in step S102, detecting whether a value of a first flag bit in a primary boot program is a first value; the first flag bit is stored in a separate storage area;
in step S103, when the value of the first flag bit is the first value, the secondary boot program is executed;
in step S104, security authentication is performed by the secondary boot program;
in step S105, when the security authentication is passed, the flush boot program is executed.
In this embodiment, when the user is flashing, the mobile terminal first runs the primary bootstrap program, and detects whether a value of the first flag bit in the primary bootstrap program is a first value.
Wherein, the first flag bit indicates whether the flash is allowed or not; the first flag bit has two values, the first value is used for indicating that the flash is allowed, the second value is used for indicating that the flash is not allowed, for example, the first value is true, and the second value is false; or the first value is 0 and the second value is 1. In the related art, the first flag bit indicating whether the flush is allowed is not included in the primary boot program.
The value of the first flag bit in the primary bootstrap program is defaulted to be the second value, so that if the user of the flash is a local user, the value of the first flag bit needs to be modified to be the first value through the operating system. In addition, the first flag bit is stored in a separate storage area, which may be a secure chip separate from the memory chip, and the configuration file storing the flag bit may be encrypted.
When the value of the first flag bit is a first value, a secondary bootstrap program is run, and the secondary bootstrap program is used for performing security verification, wherein the specific verification process is as follows:
before security verification, the mobile terminal is bound in advance with a specific account number, which may be registered by the user or provided by the manufacturer of the mobile terminal. The username for the particular account is saved in the first bootstrap after binding. When the specific account is provided by the mobile terminal manufacturer, the mobile terminal manufacturer provides the user name and the initial verification code of the specific account at the same time, and the user can modify the initial verification code.
The secondary bootstrap program provides a function of connecting a wireless network, after the secondary bootstrap program is operated, an input box of a verification code is popped up, the input box of the verification code is used for inputting the verification code corresponding to a pre-bound account, wherein, during security verification, a user name corresponding to the account can not be displayed, so when other users want to update the mobile terminal, as the user name of the account bound by the mobile terminal can not be obtained, the password corresponding to the user name can not be found through other channels, therefore, the security of the mobile terminal can be further improved without displaying the user name, and the secondary bootstrap program obtains a specific account pre-bound by the user through the primary bootstrap program. In the verification process, the verification code input by the user is sent to the server through the function of the wireless network, and the verification result fed back by the server is received.
And when the verification code input by the user is correct, the safety certification is passed. And when the security authentication is passed, normal flashing operation can be carried out, and the mobile terminal starts to run a flashing bootstrap program.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the value of the first flag bit in the first-level bootstrap program is the first value and the security authentication passes, the flashing bootstrap program is started to run, namely the flashing bootstrap program can be run after the mobile terminal passes the double verification, so that the safety of flashing is improved by improving the bootstrap program.
In one embodiment, as shown in fig. 2, after the above step S102, the method may further be implemented as the following step S201:
in step S201, when the value of the first flag bit is the second value, the operating system is run; wherein the second value indicates that a flush is not allowed.
And when the value of the first flag bit is a second value which does not allow the flash, operating the operating system, namely not entering a second bootstrap program, and not performing the flash operation but performing the normal boot operation. When the user sets the screen locking password, the mobile terminal can be operated only by inputting the screen locking password after the mobile terminal is started, so that the user who does not know the screen locking password cannot modify the value of the first zone bit. And because the value of the first flag bit in the primary bootstrap program is defaulted to the second value, and a user who does not know the screen locking password cannot modify the value of the first flag bit, the user who does not know the screen locking password cannot modify the value of the first flag bit from the default second value to the first value, and only can perform the on-off operation.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the flag bit is the second value which does not allow the machine refreshing, the operating system is operated, so that a user who does not know the screen locking password can not refresh the machine by changing the value of the first flag bit, and the safety of the machine refreshing is improved.
In one embodiment, as shown in fig. 3, before the above step S101, the method may further be implemented as the following step S301:
in step S301, receiving, by an operating system, an input setting operation on a first flag bit; the setting operation includes setting a value of the first flag bit to a first value.
Since the value of the first flag bit in the primary boot program defaults to the second value that is not allowed to be refreshed, in the present embodiment, a modification function of the first flag bit in the primary boot program for indicating whether to allow the flashing is provided. Therefore, if the user who wants to swipe the phone is the local user, after the screen locking password is input for unlocking, the value of the first flag bit can be modified to the first value through the operating system. If the user who wants to power on the mobile terminal is other users, the user cannot enter the operating system of the mobile terminal for operation because the user does not know the screen locking password, so that the value of the first flag bit cannot be modified from the default second value to the first value, and only the power on/off operation can be performed.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the setting operation of the first flag bit can be received through the operating system, so that the user of the computer knowing the first value can perform the flashing operation.
In one embodiment, as shown in fig. 4, after the above step S104, the method may further be implemented as the following step S401:
in step S401, when the security authentication fails, the value of the first flag is set to a second value by the secondary boot program.
If the user does not set the screen locking password for the mobile terminal or the screen locking password of the mobile terminal is cracked by other users, and if other users want to flush the mobile terminal, the mobile terminal can enter the security authentication stage through the verification of the primary bootstrap program. Sometimes, a user who cannot pass the security authentication attempts to pass the security authentication by repeatedly attempting the security authentication, and according to the scheme provided by this embodiment, the user who cannot pass the security authentication needs to reset the value of the first flag bit every time the user attempts to pass the security authentication, which increases the difficulty in deciphering the security authentication.
Or, when the security authentication is not passed for a plurality of times (for example, 3 times), the value of the first flag bit is set to the second value by the secondary boot program. The user may not input the verification code correctly due to hand mistake, and the security authentication fails, so that the user is allowed to try the security authentication for multiple times, and when the multiple attempts fail, the value of the first flag bit is set to be the second value. However, the number of allowed attempts is not necessarily excessive.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the security authentication fails, the value of the first flag bit is set to be the second value through the secondary bootstrap program, so that the condition that the machine is refreshed by other users when the value of the first flag bit is defaulted to be the first value is avoided, and the security of the machine refreshing is improved.
In one embodiment, as shown in FIG. 5, the above step S104 can be implemented as the following steps S501-S503:
in step S501, an input verification code is received, and a user name corresponding to the verification code is not displayed in the interface;
in step S502, matching the received verification code with the verification code corresponding to the pre-bound user name; the pre-bound user name is obtained from a primary bootstrap program;
in step S503, when the verification codes match, it is confirmed that the security authentication is passed.
Before step S501, an input box of the verification code may be output without displaying the user name; in step S501, the input authentication code is received through the input box.
Before security verification, the mobile terminal is bound with a specific account in advance, and the specific account can be registered by the user or provided by the manufacturer of the mobile terminal. When the specific account is provided by the mobile terminal manufacturer, the mobile terminal manufacturer provides the user name and the initial verification code of the specific account at the same time, and the user can modify the initial verification code.
After the secondary bootstrap program is run, popping up an input box of a verification code, wherein the input box of the verification code is used for inputting the verification code corresponding to the pre-bound account, and the user name corresponding to the account can not be displayed during security verification.
After receiving the verification code input by the user through the popped-up input box, matching the received verification code with the verification code corresponding to the user name of the pre-bound account. The secondary bootstrap program provides the function of connecting the wireless network, so the verification code can be sent to a server of a mobile terminal manufacturer, the server matches the verification code with the verification code corresponding to the user name bound in advance by the mobile terminal manufacturer, and when the verification code is always matched, the security authentication is passed.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the security authentication is carried out, only the verification code input box is displayed, but the user name is not displayed, so that the condition that after other people know the user name, the passwords corresponding to the user name are obtained through other channels is avoided, and the security of the machine-refreshing is further improved.
In one embodiment, the method further comprises:
and encrypting the first flag bit, so that the first flag bit can be accessed only by the primary bootstrap program, the secondary bootstrap program or the appointed application program of the operating system, and can be changed only by the secondary bootstrap program or the appointed application program of the operating system. For example, the configuration file where the first flag bit is located is encrypted and stored in a separate secure chip. The Encryption process can also be realized by a security chip in a hardware Encryption mode, and the Encryption method can adopt a known Data Encryption mode such as DES (Data Encryption Standard) Encryption. The first flag bit is encrypted at the time of shipment. Before detecting whether the value of the first flag bit is the first value in step S102, the first flag bit is decrypted. If the value of the first flag bit is modified, encryption needs to be performed again after the modification. To improve safety.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: through the encryption of the first zone bit, the safety of the first zone bit can be improved, the first zone bit is not easy to modify, and the safety of the flash is further improved.
Fig. 6 is a flowchart illustrating a method of controlling a flash according to an exemplary embodiment, which may be implemented by a mobile terminal, as shown in fig. 6, and includes the steps of:
in step S601, receiving, by an operating system, an input setting operation on a first flag bit;
in step S602, a primary boot program is executed;
in step S603, detecting whether a value of a first flag bit in the primary boot program is a first value;
in step S604, when the value of the first flag bit is the second value, the operating system is run;
in step S605, when the value of the first flag bit is the first value, the secondary boot program is executed;
in step S606, the input box of the authentication code is output without displaying the user name;
in step S607, receiving the input verification code through the input box;
in step S608, matching the received verification code with the verification code corresponding to the pre-bound user name;
in step S609, when the verification codes match and are consistent, it is confirmed that the security authentication is passed;
in step S610, when the security authentication passes, the flush bootstrap program is run;
in step S611, when the security authentication is not passed, the value of the first flag is set to a second value by the secondary boot program. And then the system can be restarted, and the operating system is accessed through a primary bootstrap program.
The implementation process of controlling the flash is known from the above description, and the process is implemented by the mobile terminal and the computer, and the following description is respectively directed to the internal structures and functions of the two devices.
FIG. 7 is a block diagram illustrating an apparatus for controlling a flush in accordance with an exemplary embodiment. Referring to fig. 7, the apparatus includes:
a first running module 71, configured to run a primary bootstrap;
a detection module 72, configured to detect whether a value of a first flag in the primary boot program is a first value; the first flag bit is stored in a separate storage area;
a second operation module 73, configured to operate a secondary bootstrap when the value of the first flag bit is the first value;
an authentication module 74 for performing security authentication through a secondary bootstrap;
and a third running module 75, configured to run the flush boot program when the security authentication passes.
In one embodiment, as shown in fig. 8, the apparatus further comprises:
and a fourth operation module 81, configured to operate the operating system when the value of the first flag is the second value.
In one embodiment, as shown in fig. 9, the apparatus further comprises:
a receiving module 91, configured to receive, through an operating system, an input setting operation on a first flag bit; the setting operation includes setting a value of the first flag bit to a first value.
In one embodiment, as shown in fig. 10, the apparatus further comprises:
and the setting module 101 is configured to set, by the secondary boot program, the value of the first flag bit to a second value when the security authentication fails.
In one embodiment, as shown in FIG. 11A, authentication module 74 includes:
the receiving sub-module 112 is configured to receive the input verification code, and not display a user name corresponding to the verification code in the interface;
the matching sub-module 113 is configured to match the received verification code with a verification code corresponding to a pre-bound user name;
and the confirming sub-module 114 is used for confirming that the security authentication is passed when the verification codes are matched and consistent.
In one embodiment, as shown in fig. 11B, the authentication module 74 further includes:
the output sub-module 111 is used for outputting an input box of the verification code and not displaying a user name; the receiving sub-module 112 receives the inputted verification code through the input box.
In one embodiment, as shown in fig. 11C, the apparatus further comprises:
an encryption module 115, configured to encrypt the first flag bit, so that the first flag bit can only be accessed by the primary boot program, the secondary boot program, or a specific application program of the operating system, and can only be changed by the secondary boot program or the specific application program of the operating system.
In one embodiment, the apparatus further comprises:
and the decryption module is used for decrypting the first zone bit.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 12 is a block diagram illustrating an apparatus 1200 for controlling a flush, according to an example embodiment. For example, the apparatus 1200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 12, the apparatus 1200 may include one or more of the following components: processing component 1202, memory 1204, power component 1206, multimedia component 1208, audio component 1210, input/output (I/O) interface 1212, sensor component 1214, and communications component 1216.
The processing component 1202 generally controls overall operation of the apparatus 1200, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 1202 may include one or more processors 1220 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 1202 can include one or more modules that facilitate interaction between the processing component 1202 and other components. For example, the processing component 1202 can include a multimedia module to facilitate interaction between the multimedia component 1208 and the processing component 1202.
The memory 1204 is configured to store various types of data to support operation at the apparatus 1200. Examples of such data include instructions for any application or method operating on the device 1200, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1204 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply components 1206 provide power to the various components of device 1200. The power components 1206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power supplies for the apparatus 1200.
The multimedia components 1208 include a screen that provides an output interface between the device 1200 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1208 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 1200 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
Audio component 1210 is configured to output and/or input audio signals. For example, audio component 1210 includes a Microphone (MIC) configured to receive external audio signals when apparatus 1200 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 1204 or transmitted via the communication component 1216. In some embodiments, audio assembly 1210 further includes a speaker for outputting audio signals.
The I/O interface 1212 provides an interface between the processing component 1202 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 1214 includes one or more sensors for providing various aspects of state assessment for the apparatus 1200. For example, the sensor assembly 1214 may detect an open/closed state of the apparatus 1200, the relative positioning of the components, such as a display and keypad of the apparatus 1200, the sensor assembly 1214 may also detect a change in the position of the apparatus 1200 or one of the components of the apparatus 1200, the presence or absence of user contact with the apparatus 1200, the orientation or acceleration/deceleration of the apparatus 1200, and a change in the temperature of the apparatus 1200. The sensor assembly 1214 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 1214 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1214 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communications component 1216 is configured to facilitate communications between the apparatus 1200 and other devices in a wired or wireless manner. The apparatus 1200 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1216 receives the broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1216 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 1200 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as memory 1204 comprising instructions, executable by processor 1220 of apparatus 1200 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
An apparatus for controlling a brusher, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
running a primary bootstrap program;
detecting whether the value of a first flag bit in the primary bootstrap program is a first value; the first flag bit is stored in a separate storage area;
when the value of the first flag bit is a first value, a secondary bootstrap program is operated;
performing security authentication through the secondary bootstrap program;
and when the security authentication is passed, running a flashing bootstrap program.
The processor may be further configured to:
and when the value of the first flag bit is a second value, operating the operating system.
The processor may be further configured to:
receiving an input setting operation of the first zone bit through an operating system; the setting operation includes setting a value of the first flag bit to a first value.
The processor may be further configured to:
and when the security authentication is not passed, setting the value of the first flag bit to be a second value through the secondary bootstrap program.
The processor may be further configured to:
the performing, by the secondary bootstrap, security authentication includes:
receiving an input verification code, and not displaying a user name corresponding to the verification code in an interface;
matching the received verification code with a verification code corresponding to a pre-bound user name;
the pre-bound user name is obtained from a primary bootstrap program;
and when the verification codes are matched and consistent, confirming that the security authentication is passed.
The processor may be further configured to:
the method further comprises the following steps:
and encrypting the first flag bit, so that the first flag bit can be accessed only by the primary bootstrap program, the secondary bootstrap program or the appointed application program of the operating system, and can be changed only by the secondary bootstrap program or the appointed application program of the operating system.
A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of controlling a flash, the method comprising:
running a primary bootstrap program;
detecting whether the value of a first flag bit in the primary bootstrap program is a first value; the first flag bit is stored in a separate storage area;
when the value of the first flag bit is a first value, a secondary bootstrap program is operated;
performing security authentication through the secondary bootstrap program;
and when the security authentication is passed, running a flashing bootstrap program.
The instructions in the storage medium may further include:
and when the value of the first flag bit is a second value, operating the operating system.
The instructions in the storage medium may further include:
receiving an input setting operation of the first zone bit through an operating system; the setting operation includes setting a value of the first flag bit to a first value.
The instructions in the storage medium may further include:
and when the security authentication is not passed, setting the value of the first flag bit to be a second value through the secondary bootstrap program.
The instructions in the storage medium may further include:
the performing, by the secondary bootstrap, security authentication includes:
receiving an input verification code, and not displaying a user name corresponding to the verification code in an interface;
matching the received verification code with a verification code corresponding to a pre-bound user name;
the pre-bound user name is obtained from a primary bootstrap program;
and when the verification codes are matched and consistent, confirming that the security authentication is passed.
The instructions in the storage medium may further include:
the method further comprises the following steps:
and encrypting the first flag bit, so that the first flag bit can be accessed only by the primary bootstrap program, the secondary bootstrap program or the appointed application program of the operating system, and can be changed only by the secondary bootstrap program or the appointed application program of the operating system.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (7)

1. A method of controlling a brusher, comprising:
running a primary bootstrap program;
detecting whether the value of a first flag bit in the primary bootstrap program is a first value; the first flag bit is stored in a separate storage area;
when the value of the first flag bit is a first value, a secondary bootstrap program is operated;
performing security authentication through the secondary bootstrap program;
when the security authentication passes, operating a flashing bootstrap program;
the method further comprises the following steps:
when the value of the first flag bit is a second value, operating an operating system;
receiving an input setting operation of the first zone bit through an operating system; the setting operation includes setting a value of the first flag bit to a first value;
the performing, by the secondary bootstrap, security authentication includes:
receiving an input verification code, and not displaying a user name corresponding to the verification code in an interface;
matching the received verification code with a verification code corresponding to a pre-bound user name;
the pre-bound user name is obtained from a primary bootstrap program;
and when the verification codes are matched and consistent, confirming that the security authentication is passed.
2. The method of controlling a brusher of claim 1, further comprising:
and when the security authentication is not passed, setting the value of the first flag bit to be a second value through the secondary bootstrap program.
3. The method of controlling a brusher of claim 1, further comprising:
and encrypting the first flag bit, so that the first flag bit can be accessed only by the primary bootstrap program, the secondary bootstrap program or the appointed application program of the operating system, and can be changed only by the secondary bootstrap program or the appointed application program of the operating system.
4. An apparatus for controlling a brusher, comprising:
the first running module is used for running a primary bootstrap program;
the detection module is used for detecting whether the value of a first flag bit in the primary bootstrap program is a first value; the first flag bit is stored in a separate storage area;
the second operation module is used for operating a secondary bootstrap program when the value of the first zone bit is a first value;
the authentication module is used for carrying out security authentication through the secondary bootstrap program;
the third running module is used for running the flashing bootstrap program when the security authentication passes;
the device further comprises:
the fourth running module is used for running the operating system when the value of the first flag bit is a second value;
the receiving module is used for receiving the input setting operation of the first zone bit through an operating system; the setting operation includes setting a value of the first flag bit to a first value;
the authentication module includes:
the receiving submodule is used for receiving the input verification code, and a user name corresponding to the verification code is not displayed in the interface;
the matching sub-module is used for matching the received verification code with the verification code corresponding to the pre-bound user name; the pre-bound user name is obtained from a primary bootstrap program;
and the confirmation submodule is used for confirming that the security authentication is passed when the verification codes are matched and consistent.
5. The apparatus for controlling a brusher of claim 4, further comprising:
and the setting module is used for setting the value of the first flag bit to be a second value through the secondary bootstrap program when the security authentication is not passed.
6. The apparatus for controlling a brusher of claim 4, further comprising:
and the encryption module is used for encrypting the first flag bit, so that the first flag bit can only be accessed through the primary bootstrap program, the secondary bootstrap program or the appointed application program of the operating system, and can only be changed through the secondary bootstrap program or the appointed application program of the operating system.
7. An apparatus for controlling a brusher, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
running a primary bootstrap program;
detecting whether the value of a first flag bit in the primary bootstrap program is a first value; the first flag bit is stored in a separate storage area;
when the value of the first flag bit is a first value, a secondary bootstrap program is operated;
performing security authentication through the secondary bootstrap program;
when the security authentication passes, operating a flashing bootstrap program;
when the value of the first flag bit is a second value, operating an operating system;
receiving an input setting operation of the first zone bit through an operating system; the setting operation includes setting a value of the first flag bit to a first value;
the performing, by the secondary bootstrap, security authentication includes:
receiving an input verification code, and not displaying a user name corresponding to the verification code in an interface;
matching the received verification code with a verification code corresponding to a pre-bound user name;
the pre-bound user name is obtained from a primary bootstrap program;
and when the verification codes are matched and consistent, confirming that the security authentication is passed.
CN201610852049.9A 2016-09-26 2016-09-26 Method and device for controlling flashing Active CN106485151B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610852049.9A CN106485151B (en) 2016-09-26 2016-09-26 Method and device for controlling flashing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610852049.9A CN106485151B (en) 2016-09-26 2016-09-26 Method and device for controlling flashing

Publications (2)

Publication Number Publication Date
CN106485151A CN106485151A (en) 2017-03-08
CN106485151B true CN106485151B (en) 2020-03-17

Family

ID=58267684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610852049.9A Active CN106485151B (en) 2016-09-26 2016-09-26 Method and device for controlling flashing

Country Status (1)

Country Link
CN (1) CN106485151B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491293A (en) * 2018-03-14 2018-09-04 北京思特奇信息技术股份有限公司 A kind of data managing method and system
CN109710292B (en) * 2018-12-28 2024-01-05 Tcl移动通信科技(宁波)有限公司 Mobile terminal machine brushing control processing method, mobile terminal and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI309767B (en) * 2004-11-24 2009-05-11 Compal Electronics Inc A security initiating method for wireless recognization
CN103577733A (en) * 2013-09-02 2014-02-12 小米科技有限责任公司 Safety protection method and device for terminal equipment and terminal equipment
CN104239099A (en) * 2014-09-10 2014-12-24 厦门美图移动科技有限公司 Mobile phone flushing control method
CN104200153B (en) * 2014-09-12 2019-04-16 北京赛科世纪科技股份有限公司 A kind of starting verification method and system

Also Published As

Publication number Publication date
CN106485151A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
CN104869612B (en) Access the method and device of network
CN109146470B (en) Method and device for generating payment code
CN106453052B (en) Message interaction method and device
EP3076632B1 (en) Method and apparatus for accessing a network
US20220382884A1 (en) Method and device for parsing shared password
US20180341953A1 (en) Method and apparatus for reporting loss of card or device associated with account number or stolen of account number
CN107766701B (en) Electronic equipment, dynamic library file protection method and device
KR101639147B1 (en) Method, device, program and storage medium for sending information in voice service
CN109039860B (en) Method and device for sending and displaying message and method and device for identity authentication
US20170171794A1 (en) Method and apparatus for acquiring routing information
CN105511922A (en) Application startup controlling method and device
KR20160064033A (en) Method and apparatus of verifying terminal
US9667784B2 (en) Methods and devices for providing information in voice service
CN111917728A (en) Password verification method and device
CN106471513B (en) Authority control method and device
CN106611112A (en) Application program safe processing method, device and equipment
CN105681261A (en) Security authentication method and apparatus
CN105046127A (en) Encryption and decryption method and apparatus
US10402562B2 (en) Method and device for encrypting application
CN106485151B (en) Method and device for controlling flashing
CN106372943A (en) Message processing method and device
CN106534083B (en) Brush machine Tool validation method and device
CN106791145A (en) Short message management method and device
CN106462696A (en) Authority controlling method and device
CN106980454B (en) Unlocking method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant