WO2021097611A1 - 刷机方法及相关装置 - Google Patents
刷机方法及相关装置 Download PDFInfo
- Publication number
- WO2021097611A1 WO2021097611A1 PCT/CN2019/119184 CN2019119184W WO2021097611A1 WO 2021097611 A1 WO2021097611 A1 WO 2021097611A1 CN 2019119184 W CN2019119184 W CN 2019119184W WO 2021097611 A1 WO2021097611 A1 WO 2021097611A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- information
- flashing
- terminal device
- hash value
- message digest
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
Definitions
- This application relates to the field of computer technology, and in particular to a method of brushing and related devices.
- the embodiments of the present application provide a flashing method and related devices, which are beneficial to improve the security and adaptability of the flashing of the terminal equipment.
- an embodiment of the present application provides a method for flashing a phone, which is applied to a terminal device, and the method includes:
- an embodiment of the present application provides a method for brushing, which is applied to an electronic device, and the method includes:
- the terminal device Sending response information to the terminal device, where the response information includes a request for obtaining device information of the terminal device;
- an embodiment of the present application provides a device for brushing, which is applied to a terminal device.
- the device for brushing includes a processing unit and a communication unit, wherein:
- the processing unit is configured to receive a digitally signed first form sent by an electronic device through the communication unit, where the first form includes at least one message digest; and digital signature information used to verify the first form; And for determining the version information of the flashing package according to the first form if the digital signature information of the first form is verified; and for determining whether the flashing package is a preset version according to the version information And, if so, perform a data verification operation to fully verify the flashing package; and for upgrading the firmware of the mobile terminal according to the verified flashing package.
- the embodiments of the present application provide a flashing device, which is applied to electronic equipment, and the flashing device includes a processing unit and a communication unit, wherein:
- the processing unit is configured to receive the flashing request information sent by the terminal device through the communication unit; and is configured to send response information to the terminal device through the communication unit, and the response information includes the device that obtains the terminal device.
- Information request ; and for receiving the first device information sent by the terminal device through the communication unit; and for sending the first device information and the second device information to the server, and the second device refers to all The device information of the electronic device; and for receiving the authorization information sent by the server through the communication unit; and for judging whether the terminal meets the flashing condition based on the authorization information; and for using the The communication unit sends a flashing package to the terminal device.
- an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured by the above Executed by a processor, and the foregoing program includes instructions for executing the steps in the first aspect and the second aspect of the embodiments of the present application.
- an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables a computer to execute Some or all of the steps described in one aspect and the second aspect.
- an embodiment of the present application provides a computer program product, wherein the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the above-mentioned computer program is operable to cause a computer to execute as implemented in this application. Examples include part or all of the steps described in the first aspect and the second aspect.
- the computer program product may be a software installation package.
- the terminal device first receives the first form that is digitally signed from the electronic device.
- the first form includes at least one message digest; secondly, the digital signature information of the first form is verified; If the digital signature information of the form is verified, the version information of the flashing package is determined according to the first form; secondly, it is determined whether the flashing package is the firmware package of the preset version according to the version information; if so, the data verification operation is performed to fully verify the flashing machine Package; upgrade the firmware of the mobile terminal according to the verified flashing package.
- the terminal device first verifies the digital signature of the form, which improves the security when flashing the phone; if the digital signature is verified, the terminal device further determines the version information of the flashing package, and when the version information is adapted, it is completely The flashing package avoids the situation that the firmware package gets wrong and the flashing version is wrong.
- FIG. 1 is a schematic diagram of the system structure of a brushing method provided by an embodiment of the present application
- FIG. 2A is a schematic flowchart of a method for flashing a device provided by an embodiment of the present application
- 2B is a schematic diagram of a message summary table provided by an embodiment of the present application.
- FIG. 3 is a schematic flow chart of another method for flashing a device provided by an embodiment of the present application.
- FIG. 4 is a schematic flow chart of another method for flashing a device provided by an embodiment of the present application.
- FIG. 5 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
- Fig. 6 is a block diagram of the functional unit composition of a brushing device provided by an embodiment of the present application.
- FIG. 1 is a schematic diagram of the system structure of a flashing method provided by an embodiment of the present application, in which the mobile terminal 101 is in communication connection with the electronic device 102, and the electronic device 102 is in communication connection with the server 103.
- the mobile terminal 101 When the mobile terminal 101 detects a flashing instruction, the mobile terminal 101 first sends the flashing request information to the electronic device 102; after the electronic device 102 receives the flashing request information, it sends a response message to the mobile terminal 101, where the response information includes acquiring the mobile terminal 101’s device information request; after the mobile terminal 101 receives the response information, it sends the first device information of the mobile terminal 101 to the electronic device 102; after the electronic device 102 receives the first device information sent by the mobile terminal 101, it extracts the first device information of the local terminal. Second device information, and send both the first device information and the second device information to the server 103.
- the server 103 determines whether the mobile terminal 101 and the electronic device 102 have the authority to flash the device according to the first device information and the second device information. In the case of having permission, the authorization information is sent to the electronic device 102, and the electronic device 102 sends a flashing package to the mobile terminal 101 in the case that the electronic device 102 determines that the mobile terminal has the flashing permission according to the authorization information.
- the terminal devices, electronic devices, and servers involved in the embodiments of this application may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices, or other processing devices connected to wireless modems, as well as various forms User equipment (UE), mobile station (mobile station, MS), terminal device (terminal device) and so on.
- UE User equipment
- MS mobile station
- terminal device terminal device
- FIG. 2A is a schematic flowchart of a flashing method provided by an embodiment of the present application.
- the flashing method described in this embodiment is applied to a terminal device.
- the method may include the following steps:
- Step 201 The terminal device receives the digitally signed first form sent by the electronic device.
- the first table includes at least one message summary; it should be noted that the first table only includes the message summary corresponding to some or all of the flashing commands in the flashing package.
- the message digest is generated by calculating the hash value according to the flashing command in the flashing package. .
- Step 202 The terminal device verifies the digital signature information of the first form.
- the terminal device has a built-in flash verification tool built-in at the factory.
- the built-in flash verification tool is signed by the manufacturer and cannot be changed; the digital signature information in the first form is also signed by the manufacturer; the first form is verified by the built-in flash verification tool.
- the digital signature information of one form can determine whether the flashing package corresponding to the first form is a genuine flashing package.
- Step 203 If the digital signature information of the first form passes the verification, the terminal device determines the version information of the flashing package according to the first form.
- Step 204 The terminal device judges whether the flashing package is the firmware of the preset version according to the version information.
- Step 205 If yes, the terminal device performs a data verification operation to completely verify the flashing package.
- Step 206 The terminal device upgrades the firmware of the mobile terminal according to the verified flashing package
- the terminal device first receives the first form that is digitally signed from the electronic device.
- the first form includes at least one message digest; secondly, the digital signature information of the first form is verified; If the digital signature information of the form is verified, the version information of the flashing package is determined according to the first form; secondly, it is determined whether the flashing package is the firmware package of the preset version according to the version information; if so, the data verification operation is performed to fully verify the flashing machine Package; upgrade the firmware of the mobile terminal according to the verified flashing package.
- the terminal device first verifies the digital signature of the form, which improves the security when flashing the phone; if the digital signature is verified, the terminal device further determines the version information of the flashing package, and when the version information is adapted, it is completely The flashing package avoids the situation that the firmware package gets wrong and the flashing version is wrong.
- the data verification operation includes the following steps: detecting whether the currently processed form is an unprocessed form; if so, determining the firmware data corresponding to the first type of message digest in the currently processed form; Verify the firmware data corresponding to the message digest of the first type; under the condition that the verification is passed, detect whether the currently processed form includes a message digest of the second type, and the message digest of the second type includes the information of the second form. Preset hash value.
- the first type of message digest is generated according to the flashing command; the specific method of verifying the firmware data corresponding to the first type of message digest includes: determining the actual hash value of the firmware data corresponding to the first type of message digest, and obtaining the current
- the preset hash value in the processed table is judged whether the preset hash value is the same as the actual hash value. If they are the same, the firmware data is determined to pass the verification, otherwise the firmware data does not pass the verification.
- the currently processed table includes N message digests of the first type, and N is a positive integer; each message digest of the first type stores the hash value of a corresponding flashing command, which is called a preset hash value ; N message digests of the first type correspond to N flashing commands, the mobile terminal determines the above N flashing commands in the flashing package, and calculates the actual hash value of each flashing command in the N flashing commands according to the preset calculation rules, and obtains N actual hash values, when the N actual hash values are the same as the N preset hash values, it is determined that the firmware data corresponding to the message digest of the first type in the first table has passed the verification.
- the preset calculation rule may be the SHA256 algorithm.
- the message digest of the second type is the preset hash value corresponding to the next table.
- the terminal device can verify the firmware data in the current table, ensuring the integrity of the firmware data corresponding to the message summary in the current table.
- the method further includes: if not, determining that the flashing package is verified.
- the method further includes: if so, obtaining a second table, and calculating the actual hash value of the second table. Hope value; determine whether the actual hash value matches the preset hash value; if so, update the currently processed table to the second table.
- the method further includes: updating the status of the currently processed table to the processed state .
- FIG. 2B is a schematic diagram of a message summary table provided by an embodiment of the present application. As shown in the figure, all the message summaries corresponding to the flashing package constitute three tables. Among them, in Table 1, message digest 0 to message digest 52 are the message digests corresponding to the firmware data in the flashing package; message digest 53 is the message digest obtained by calculating the hash value of message digest 54-message digest 181 in Table 2 (message digest The digest 54 to the message digest 181 are regarded as a message, and the hash value of the message is calculated to obtain the message digest 53).
- Table 1 message digest 0 to message digest 52 are the message digests corresponding to the firmware data in the flashing package
- message digest 53 is the message digest obtained by calculating the hash value of message digest 54-message digest 181 in Table 2 (message digest The digest 54 to the message digest 181 are regarded as a message, and the hash value of the message is calculated to obtain the message digest 53).
- message digest 54 to message digest 180 are the message digests corresponding to the firmware data in the flashing package; message digest 181 is the message digest obtained by calculating the hash value of message digest 182 to message digest 262 in Table 3 (message digest 182 can be The message digest 262 is regarded as a message, and the hash value of the message is calculated to obtain the message digest 181).
- form 1 is digitally signed, and message digest 0 to message digest 53 are digitally signed.
- form 1 passes the digital signature verification, it means that form 1 is safe, and message digest 53 in form 1 is form 2.
- the terminal device stores the preset hash value corresponding to the next table (except the last table) in the last message digest in each table.
- the first table is digitally signed
- the security transmission is realized, and each form does not need to be digitally signed, which reduces the data processing volume of the terminal device and improves the data processing efficiency of the terminal device.
- the method further includes : Send an ACK associated with the second table to the electronic device.
- ACK refers to the Acknowledge character.
- the terminal device sends an ACK to the electronic device to indicate that the terminal device has confirmed that the current form is correct and is ready to receive the next form.
- the terminal device can return an ACK to notify the electronic device to send the data of the next form, so as to achieve continuous data acquisition, ensure continuous verification of data, and improve the data processing efficiency of the terminal device.
- the method further includes: if not, terminating the data verification operation.
- the determining the version information of the flashing package according to the first table includes: obtaining first firmware data corresponding to the first type of message digest in the first table; extracting the first firmware data Version information in.
- the first table refers to Table 1.
- the version information is compiled into the firmware data corresponding to Table 1 in the flashing package, so that the terminal device is processed at the beginning You can get version information. And continue to perform the flashing operation when the version information is adapted; and terminate the flashing operation if the version information is not adapted.
- the terminal device can first obtain the version information, so that the terminal device can perform subsequent operations according to the version information, which improves the intelligence of the terminal device.
- the method before the receiving the digitally signed first form sent by the electronic device, the method further includes: sending a flashing request information to the electronic device; receiving response information from the electronic device, the The response information includes a request to obtain device information; and the device information of the terminal device is sent to the electronic device.
- the terminal device sends a flashing request and device information to the electronic device, so that the electronic device can recognize the identity of the terminal device, and then execute an adapted flashing strategy.
- the method for flashing the device and the terminal device described in this embodiment may include the following steps:
- Step 301 The terminal device sends a flashing request information to the electronic device.
- Step 302 The terminal device receives response information from the electronic device, where the response information includes a request to obtain device information.
- Step 303 The terminal device sends the device information of the terminal device to the electronic device.
- Step 304 The terminal device receives the digitally signed first form sent by the electronic device.
- Step 305 The terminal device verifies the digital signature information of the first form.
- Step 306 If the digital signature information of the first form passes the verification, the terminal device determines the version information of the flashing package according to the first form.
- Step 307 The terminal device determines whether the flashing package is a firmware package of a preset version according to the version information.
- Step 308 If the flashing package is a firmware package of the preset version, the terminal device detects whether the currently processed form is an unprocessed form.
- Step 309 If the currently processed form is an unprocessed form, the terminal device determines the firmware data corresponding to the first type of message digest in the currently processed form.
- Step 310 The terminal device verifies the firmware data corresponding to the message digest of the first type.
- Step 311 Under the condition that the verification is passed, the terminal device detects whether the currently processed table includes a message digest of the second type, and the message digest of the second type includes a preset hash value of the second table.
- Step 312 If the currently processed form does not include the message digest of the second type, the terminal device generates a flashing package according to the firmware data in all the received forms; if the currently processed form includes the message digest of the second type, then receive In the second table, calculate the actual hash value of the second table; determine whether the actual hash value matches the preset hash value; if so, update the currently processed table to be the second table.
- the terminal device first receives the first form that is digitally signed from the electronic device.
- the first form includes at least one message digest; secondly, the digital signature information of the first form is verified; If the digital signature information of the form is verified, the version information of the flashing package is determined according to the first form; secondly, it is determined whether the flashing package is the firmware package of the preset version according to the version information; if so, the data verification operation is performed to fully verify the flashing machine Package; upgrade the firmware of the mobile terminal according to the verified flashing package.
- the terminal device first verifies the digital signature of the form, which improves the security when flashing the phone; if the digital signature is verified, the terminal device further determines the version information of the flashing package, and when the version information is adapted, it is completely The flashing package avoids the situation that the firmware package gets wrong and the flashing version is wrong.
- FIG. 4 is a schematic diagram of an embodiment flow of another flashing method provided by an embodiment of the application, which is applied to an electronic device.
- the method may include the following steps:
- Step 401 The electronic device receives the flashing request information sent by the terminal device.
- Step 402 The electronic device sends response information to the terminal device, where the response information includes a request to obtain device information of the terminal device.
- Step 403 The electronic device receives the first device information sent by the terminal device.
- Step 404 The electronic device sends the first device information and the second device information to the server, where the second device refers to the device information of the electronic device.
- Step 405 The electronic device receives the authorization information sent by the server.
- Step 406 The electronic device judges whether the terminal device meets the flashing condition according to the authorization information.
- Step 407 If yes, the electronic device sends a flashing package to the terminal device.
- the electronic device receives the flashing request information sent by the terminal device; sends response information to the terminal device, and the response information includes a request to obtain the device information of the terminal device; and receives the terminal device.
- the first device information sent by the device; the first device information and the second device information are sent to the server, where the second device refers to the device information of the electronic device; the authorization information sent by the server is received; according to the The authorization information determines whether the terminal device meets the flashing condition; if so, sending a flashing package to the terminal device.
- the electronic device interacts with the terminal device to obtain the device information of the terminal device; the electronic device interacts with the server to obtain the interactive information of the server for the electronic device and the terminal device, thereby realizing the verification of the terminal device and the electronic device by the server, which improves The security of the flashing machine.
- FIG. 5 is a schematic structural diagram of a terminal device 500 provided by an embodiment of the present application.
- the terminal device 500 includes an application processor 510, a memory 520, a communication interface 530, and one or more programs 521, where the one or more programs 521 are stored in the aforementioned memory 520 and are configured to be executed by the aforementioned application processor 510,
- the one or more programs 521 include instructions for performing the following steps:
- the terminal device first receives the first form that is digitally signed from the electronic device.
- the first form includes at least one message digest; secondly, the digital signature information of the first form is verified; If the digital signature information of the form is verified, the version information of the flashing package is determined according to the first form; secondly, it is determined whether the flashing package is the firmware package of the preset version according to the version information; if so, the data verification operation is performed to fully verify the flashing machine Package; upgrade the firmware of the mobile terminal according to the verified flashing package.
- the terminal device first verifies the digital signature of the form, which improves the security when flashing the phone; if the digital signature is verified, the terminal device further determines the version information of the flashing package, and when the version information is adapted, it is completely The flashing package avoids the situation that the firmware package gets wrong and the flashing version is wrong.
- the instructions in the program are specifically used to perform the following operations: detecting whether the currently processed form is an unprocessed form; if so, determining the currently processed form The firmware data corresponding to the message digest of the first type in the table; verify the firmware data corresponding to the message digest of the first type; under the condition of passing the verification, detect whether the currently processed table includes the message digest of the second type, The message digest of the second type includes the preset hash value of the second table.
- the instructions in the program are specifically used to perform the following operations: if not, determine the flashing Package verification passed.
- the instructions in the program are specifically used to perform the following operations: if so, obtain the second table, Calculate the actual hash value of the second table; determine whether the actual hash value matches the preset hash value; if so, update the currently processed table to the second table.
- the program in are specifically used to perform the following operations: send an ACK associated with the second table to the electronic device.
- the instructions in the program are specifically used to perform the following operations: if not, terminate the Data verification operation.
- the instructions in the program are specifically used to perform the following operations: obtaining the corresponding summary of the first type of message in the first table The first firmware data; extract the version information in the first firmware data.
- the instructions in the program are specifically used to perform the following operations: sending the flashing request information to the electronic device;
- an electronic device includes hardware structures and/or software modules corresponding to each function.
- the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
- the embodiment of the present application may divide the electronic device into functional units according to the foregoing method examples.
- each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit.
- the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
- FIG. 6 is a block diagram of the functional unit composition of a flashing device 600 involved in an embodiment of the present application.
- the terminal device of the flashing device 600 includes a processing unit 601 and a communication unit 602, in which,
- the processing unit is configured to receive a digitally signed first form through the communication unit, the first form including at least one message digest; and digital signature information for verifying the first form; and If the digital signature information of the first form is verified, the version information of the flashing package is determined according to the first form; and it is used to determine whether the flashing package is a firmware package of a preset version according to the version information; And if it is, perform a data verification operation through the communication unit to update the flashing package; and for upgrading the firmware of the mobile terminal according to the verified flashing package.
- the multi-brushing device may further include a storage unit 603 for storing program codes and data of the electronic device.
- the processing unit 601 may be an application processor
- the communication unit 602 may be a global communication bus, a transceiver, etc.
- the storage unit 603 may be a memory.
- the terminal device first receives the first form that is digitally signed from the electronic device.
- the first form includes at least one message digest; secondly, the digital signature information of the first form is verified; If the digital signature information of the form is verified, the version information of the flashing package is determined according to the first form; secondly, it is determined whether the flashing package is the firmware package of the preset version according to the version information; if so, the data verification operation is performed to fully verify the flashing machine Package; upgrade the firmware of the mobile terminal according to the verified flashing package.
- the terminal device first verifies the digital signature of the form, which improves the security when flashing the phone; if the digital signature is verified, the terminal device further determines the version information of the flashing package, and when the version information is adapted, it is completely The flashing package avoids the situation that the firmware package gets wrong and the flashing version is wrong.
- the processing unit 601 is specifically configured to: detect whether the currently processed form is an unprocessed form; if so, determine that the currently processed form is the first one in the currently processed form.
- the type of message digest includes the preset hash value of the second table.
- the processing unit 601 is specifically configured to: if not, determine that the flashing package is verified.
- the processing unit 601 is specifically configured to: if so, receive the second message digest through the communication unit 602 Table, calculating the actual hash value of the second table; judging whether the actual hash value matches the preset hash value; if so, updating the currently processed table to the second table.
- the processing The unit 601 is specifically configured to send an ACK associated with the second table to the electronic device through the communication unit 602.
- the processing unit 601 is specifically configured to: if not, terminate the data verification operation.
- the processing unit 601 is specifically configured to: obtain the first firmware corresponding to the first type of message digest in the first table Data; extract the version information in the first firmware data.
- the processing unit 601 before the receiving the digitally signed first form sent by the electronic device, is specifically configured to: send the flashing request information to the electronic device through the communication unit 602;
- the response information of the electronic device is received through the communication unit 602, the response information includes a request for acquiring device information; the device information of the terminal device is sent to the electronic device.
- the embodiment of the present application also provides a flashing device, which is characterized in that it is applied to electronic equipment.
- the flashing device includes a processing unit and a communication unit, wherein:
- the processing unit is configured to receive the flashing request information sent by the terminal device through the communication unit; and is configured to send response information to the terminal device through the communication unit, and the response information includes the device that obtains the terminal device.
- Information request ; and for receiving the first device information sent by the terminal device through the communication unit; and for sending the first device information and the second device information to the server, and the second device refers to all The device information of the electronic device; and for receiving the authorization information sent by the server through the communication unit; and for judging whether the terminal device satisfies the flashing condition according to the authorization information;
- the communication unit sends a flashing package to the terminal device.
- An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes the computer to execute any part or part of the flashing method described in the above method embodiment. All steps.
- the embodiments of the present application also provide a computer program product.
- the computer program product includes a non-transitory computer-readable storage medium storing a computer program.
- the computer program is operable to cause a computer to execute the method described in the foregoing method embodiment. Part or all of the steps of any flashing method.
- the disclosed device may be implemented in other ways.
- the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit can be realized in the form of hardware or software program module.
- the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer readable memory.
- the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory.
- a number of instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned memory includes: U disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), mobile hard disk, magnetic disk, or optical disk and other media that can store program codes.
- the program can be stored in a computer-readable memory, and the memory can include: a flash disk , ROM, RAM, magnetic disk or CD, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Telephone Function (AREA)
Abstract
Description
Claims (20)
- 一种刷机方法,其特征在于,应用于终端设备,所述方法包括:接收电子设备发送的被数字签名的第一表格,所述第一表格包括至少一条消息摘要;验证所述第一表格的数字签名信息;若所述第一表格的所述数字签名信息通过验证,则根据所述第一表格确定刷机包的版本信息;根据所述版本信息判断所述刷机包是否为预设版本的固件包;若是,则执行数据验证操作以完全验证所述刷机包;根据通过验证的所述刷机包升级所述移动终端的固件。
- 根据权利要求1所述的方法,其特征在于,所述数据验证操作包括以下步骤:检测当前处理的表格是否为未处理的表格;若是,则确定所述当前处理的表格中第一类型的消息摘要对应的固件数据;验证所述第一类型的消息摘要对应的固件数据;在验证通过的条件下,检测所述当前处理的表格中是否包括第二类型的消息摘要,所述第二类型的消息摘要包括第二表格的预设哈希值。
- 根据权利要求2所述的方法,其特征在于,所述检测所述当前处理的表格中是否包括第二类型的消息摘要之后,所述方法还包括:若否,则确定所述刷机包验证通过。
- 根据权利要求2所述的方法,其特征在于,所述检测所述当前处理的表格中是否包括第二类型的消息摘要之后,所述方法还包括:若是,则获取第二表格,计算所述第二表格的实际哈希值;判断所述实际哈希值是否与所述预设哈希值匹配;若是,则更新所述当前处理的表格为所述第二表格。
- 根据权利要求4所述的方法,其特征在于,所述判断所述实际哈希值是否与所述预设哈希值匹配之后,所述更新所述当前处理的表格为所述第二表格之前,所述方法还包括:向所述电子设备发送关联所述第二表格的ACK。
- 根据权利要求4所述的方法,其特征在于,所述判断所述实际哈希值是否与所述预设哈希值匹配之后,所述方法还包括:若否,则终止所述数据验证操作。
- 根据权利要求1-6任一项所述的方法,其特征在于,所述根据所述第一表格确定刷机包的版本信息,包括:获取所述第一表格中第一类型消息摘要对应的第一固件数据;提取所述第一固件数据中的版本信息。
- 根据权利要求1-7任一项所述的方法,其特征在于,所述接收电子设备发送的被数 字签名的第一表格之前,所述方法还包括:向所述电子设备发送刷机请求信息;接收所述电子设备的响应信息,所述响应信息包括获取设备信息的请求;向所述电子设备发送所述终端设备的设备信息。
- 一种刷机方法,其特征在于,应用于电子设备,所述方法包括;接收终端设备发送的刷机请求信息;向所述终端设备发送响应信息,所述响应信息包括获取所述终端设备的设备信息的请求;接收所述终端设备发送的第一设备信息;向服务器发送所述第一设备信息和第二设备信息,所述第二设备是指所述电子设备的设备信息;接收所述服务器发送的授权信息;根据所述授权信息判断所述终端设备是否满足刷机条件;若是,则向所述终端设备发送刷机包。
- 一种刷机装置,其特征在于,终端设备,所述刷机装置包括处理单元和通信单元,其中,所述处理单元,用于通过所述通信单元接收电子设备发送的被数字签名的第一表格,所述第一表格包括至少一条消息摘要;以及用于验证所述第一表格的数字签名信息;以及用于若所述第一表格的所述数字签名信息通过验证,则根据所述第一表格确定刷机包的版本信息;以及用于根据所述版本信息判断所述刷机包是否为预设版本的固件包;以及用于若是,则执行数据验证操作以完全验证所述刷机包;以及用于根据通过验证的所述刷机包升级所述移动终端的固件。
- 根据权利要求10所述的装置,其特征在于,在所述执行数据验证操作方面,所述处理单元具体用于:检测当前处理的表格是否为未处理的表格;以及用于若是,则确定所述当前处理的表格中第一类型的消息摘要对应的固件数据;以及用于验证所述第一类型的消息摘要对应的固件数据;以及用于在验证通过的条件下,检测所述当前处理的表格中是否包括第二类型消息摘要,所述第二类型的消息摘要包括第二表格的预设哈希值。
- 根据权利要求11所述的装置,其特征在于,在所述检测所述当前处理的表格中是否包括第二类型的消息摘要之后方面,所述处理单元具体用于:若否,则确定所述刷机包验证通过。
- 根据权利要求11所述的方法,其特征在于,在所述检测所述当前处理的表格中是否包括第二类型的消息摘要之后方面,所述处理单元具体用于:若是,则通过所述通信单元接收第二表格,计算所述第二表格的实际哈希值;以及用 于判断所述实际哈希值是否与所述预设哈希值匹配;以及用于若是,则更新所述当前处理的表格为所述第二表格。
- 根据权利要求13所述的方法,其特征在于,在所述判断所述实际哈希值是否与所述预设哈希值匹配之后,所述更新所述当前处理的表格为所述第二表格之前方面,所述处理单元具体用于:通过所述通信单元向所述电子设备发送关联所述第二表格的ACK。
- 根据权利要求13所述的方法,其特征在于,在所述判断所述实际哈希值是否与所述预设哈希值匹配之后方面,所述处理单元具体用于:若否,则终止所述数据验证操作。
- 根据权利要求10-15任一项所述的方法,其特征在于,在所述根据所述第一表格确定刷机包的版本信息方面,所述处理单元具体用于:获取所述第一表格中第一类型消息摘要对应的第一固件数据;以及用于提取所述第一固件数据中的版本信息。
- 根据权利要求10-16任一项所述的方法,其特征在于,在所述接收电子设备发送的被数字签名的第一表格之前方面,所述处理单元具体用于:通过所述通信单元向所述电子设备发送刷机请求信息;以及用于通过所述通信单元接收所述电子设备的响应信息,所述响应信息包括获取设备信息的请求;通过所述通信单元向所述电子设备发送所述终端设备的设备信息。
- 一种刷机装置,其特征在于,应用于电子设备,所述刷机装置包括处理单元和通信单元,其中,所述处理单元,用于通过所述通信单元接收终端设备发送的刷机请求信息;以及用于通过所述通信单元向所述终端设备发送响应信息,所述响应信息包括获取所述终端设备的设备信息的请求;以及用于通过所述通信单元接收所述终端设备发送的第一设备信息;以及用于向服务器发送所述第一设备信息和第二设备信息,所述第二设备是指所述电子设备的设备信息;以及用于通过所述通信单元接收所述服务器发送的授权信息;以及用于根据所述授权信息判断所述终端是否满足刷机条件;以及用于若是,则通过所述通信单元向所述终端设备发送刷机包。
- 一种电子设备,其特征在于,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-9任一项所述的方法中的步骤的指令。
- 一种计算机可读存储介质,其特征在于,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-9任一项所述的方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201980100613.3A CN114424163A (zh) | 2019-11-18 | 2019-11-18 | 刷机方法及相关装置 |
PCT/CN2019/119184 WO2021097611A1 (zh) | 2019-11-18 | 2019-11-18 | 刷机方法及相关装置 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2019/119184 WO2021097611A1 (zh) | 2019-11-18 | 2019-11-18 | 刷机方法及相关装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021097611A1 true WO2021097611A1 (zh) | 2021-05-27 |
Family
ID=75981079
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/119184 WO2021097611A1 (zh) | 2019-11-18 | 2019-11-18 | 刷机方法及相关装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114424163A (zh) |
WO (1) | WO2021097611A1 (zh) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100251231A1 (en) * | 2009-03-25 | 2010-09-30 | Microsoft Corporation | Device dependent on-demand compiling and deployment of mobile applications |
CN105183499A (zh) * | 2015-08-04 | 2015-12-23 | 上海青橙实业有限公司 | 刷机方法、移动终端及终端系统 |
CN106709284A (zh) * | 2016-11-23 | 2017-05-24 | 北京小米移动软件有限公司 | 刷机包验证方法及装置 |
CN107194242A (zh) * | 2017-03-30 | 2017-09-22 | 百富计算机技术(深圳)有限公司 | 固件升级方法和装置 |
-
2019
- 2019-11-18 CN CN201980100613.3A patent/CN114424163A/zh active Pending
- 2019-11-18 WO PCT/CN2019/119184 patent/WO2021097611A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100251231A1 (en) * | 2009-03-25 | 2010-09-30 | Microsoft Corporation | Device dependent on-demand compiling and deployment of mobile applications |
CN105183499A (zh) * | 2015-08-04 | 2015-12-23 | 上海青橙实业有限公司 | 刷机方法、移动终端及终端系统 |
CN106709284A (zh) * | 2016-11-23 | 2017-05-24 | 北京小米移动软件有限公司 | 刷机包验证方法及装置 |
CN107194242A (zh) * | 2017-03-30 | 2017-09-22 | 百富计算机技术(深圳)有限公司 | 固件升级方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
CN114424163A (zh) | 2022-04-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10387856B2 (en) | Online payment method, system, and apparatus | |
US10097530B2 (en) | Security authentication method and bidirectional forwarding detection BFD device | |
EP3490304B1 (en) | Method for identifying access point and hotspot, and related products | |
CN106484453B (zh) | 一种实现系统升级的方法及装置 | |
CN109213781B (zh) | 风控数据查询方法及装置 | |
US9081969B2 (en) | Apparatus and method for remotely deleting critical information | |
CN103327119B (zh) | 远程控制方法、装置及系统 | |
CN107248995B (zh) | 账号验证方法及装置 | |
CN111176794A (zh) | 一种容器管理方法、装置及可读存储介质 | |
WO2023035901A1 (zh) | 系统软件升级方法、装置、设备和计算机存储介质 | |
CN111625263A (zh) | 一种服务器部件固件更新方法 | |
CN114339755A (zh) | 注册验证方法及装置、电子设备和计算机可读存储介质 | |
CN114666097B (zh) | 一种物联网设备的通信方法及系统 | |
CN105516054A (zh) | 一种用户身份验证的方法及装置 | |
CN105549995B (zh) | 一种音频设备升级方法及装置 | |
CN107277163B (zh) | 一种设备远程映射方法及装置 | |
CN108574658B (zh) | 一种应用登录方法及其设备 | |
CN111600703B (zh) | 基于sm2的签名方法、系统、电子设备及存储介质 | |
CN111698097B (zh) | 一种证书认证方法及装置 | |
CN104079527A (zh) | 一种信息处理方法及电子设备 | |
WO2021097611A1 (zh) | 刷机方法及相关装置 | |
JP2018129791A5 (zh) | ||
CN109699015A (zh) | 机卡绑定关系认证方法、装置以及通信系统 | |
CN109446052B (zh) | 一种应用程序的校验方法及设备 | |
CN109699030A (zh) | 无人机认证方法、装置、设备和计算机可读存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19953142 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19953142 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 281022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19953142 Country of ref document: EP Kind code of ref document: A1 |