CN107301070B - Upgrading method and terminal - Google Patents
Upgrading method and terminal Download PDFInfo
- Publication number
- CN107301070B CN107301070B CN201710470896.3A CN201710470896A CN107301070B CN 107301070 B CN107301070 B CN 107301070B CN 201710470896 A CN201710470896 A CN 201710470896A CN 107301070 B CN107301070 B CN 107301070B
- Authority
- CN
- China
- Prior art keywords
- file
- hash value
- upgrade
- ota
- backup area
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The invention relates to the technical field of mobile communication, in particular to an upgrading method and an upgrading system, wherein the upgrading method comprises the following steps: before the system is upgraded by the patch upgrade patch, the system file is backed up in the preset backup area, so that the system file in the backup area can be checked when the system is upgraded by the OTA, and the OTA upgrade of the system is completed. The invention solves the problem that OTA upgrading fails because the system files of the system partitions are changed when the system is upgraded by the patch upgrading package; meanwhile, the problem of safety of the system caused by the fact that the version needs to be made again when the OTA is upgraded every time if the system is upgraded only through the OTA, the required time is long, and some bugs of the system cannot be repaired in time is solved.
Description
Technical Field
The present invention relates to the field of mobile communications technologies, and in particular, to an upgrade method and a terminal.
Background
With the rapid development of the internet and the wide use of the Android system, the firmware upgrade of the Android terminal is more and more important, and the native OTA upgrade technology of Google is adopted at present.
Some vendors introduce open source pkg technology for patch upgrade and combine google OTA upgrade technology to meet the underlying upgrade requirements of individual customers.
The above techniques have several problems:
1. pkg techniques can theoretically update all files in various partitions, like file replacement. During the use process of a client, the requirement of upgrading certain files in a system partition of a system by pkg technology is avoided, so that the purpose of quick upgrading is achieved. When a file of the system partition is modified, the modified file in the system partition fails to be checked when the OTA is upgraded, and therefore the OTA fails.
2. The OTA upgrading needs to make a edition again every time, generates and releases a corresponding OTA upgrading packet, and can prolong the repair cycle of certain emergency system bugs.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the invention provides a method and a terminal capable of upgrading a system through a patch upgrade patch without influencing the normal upgrading of an OTA (over the air) system.
In order to solve the technical problem, the invention provides an upgrading method, which comprises the following steps:
before the system is upgraded by the patch upgrade patch, the system file is backed up in the preset backup area, so that the system file in the backup area can be checked when the system is upgraded by the OTA, and the OTA upgrade of the system is completed.
The invention also provides an upgrade terminal, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the program to realize the following steps:
before the system is upgraded by the patch upgrade patch, the system file is backed up in the preset backup area, so that the system file in the backup area can be checked when the system is upgraded by the OTA, and the OTA upgrade of the system is completed.
The invention has the beneficial effects that:
before the system is upgraded by the patch upgrade patch, the system file is backed up in the backup area, so that when the system needs OTA upgrade, the system file in the backup area can be read and correspondingly verified, so that the system can normally finish OTA upgrade, and the problem that the OTA upgrade fails because the system file of a system partition is changed when the system is upgraded by the patch upgrade patch is solved; meanwhile, the problem of safety of the system caused by the fact that the version needs to be made again when the OTA is upgraded every time if the system is upgraded only through the OTA, the required time is long, and some bugs of the system cannot be repaired in time is solved.
Drawings
FIG. 1 is a flow chart of an upgrade method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an upgrade terminal according to an embodiment of the present invention;
description of reference numerals:
1. a memory; 2. a processor.
Detailed Description
In order to explain technical contents, objects and effects of the present invention in detail, the following detailed description is given with reference to the accompanying drawings in conjunction with the embodiments.
The most key concept of the invention is as follows: before the system is upgraded through the patch upgrade patch, the system file is backed up, so that the backed-up system file can be checked when the system is upgraded through the OTA, and the normal OTA upgrade can be completed.
Referring to fig. 1, the present invention provides an upgrade method, including the following steps:
before the system is upgraded by the patch upgrade patch, the system file is backed up in the preset backup area, so that the system file in the backup area can be checked when the system is upgraded by the OTA, and the OTA upgrade of the system is completed.
As can be seen from the above description, in the present invention, before the system is upgraded by the patch upgrade patch, the system file is backed up in the backup area, so that when the system needs to perform OTA upgrade, the system file in the backup area can be read, and corresponding verification is performed, so that the system can normally complete OTA upgrade, thereby solving the problem that when the system is upgraded by the patch upgrade patch, the system file of the system partition can be changed, which results in failure of OTA upgrade; meanwhile, the problem of safety of the system caused by the fact that the version needs to be made again when the OTA is upgraded every time if the system is upgraded only through the OTA, the required time is long, and some bugs of the system cannot be repaired in time is solved.
Further, "checking the system file in the backup area" specifically includes:
acquiring an OTA upgrade package required by system upgrade;
obtaining a hash value in the OTA upgrade package to obtain a first hash value;
obtaining a hash value in a system file of the backup area to obtain a second hash value;
and checking the second hash value and the first hash value.
According to the above description, the method can ensure that the system file is matched with the OTA upgrade package when the system is upgraded, and avoid the problem that the system is still upgraded by the changed system file and the obtained OTA upgrade package after the system file is changed, so that the system is failed to be upgraded and the system is crashed.
Further, the upgrading method further includes:
the OTA upgrade package comprises a difference file between a current version and a target version of the system;
and if the second hash value and the first hash value are successfully checked, upgrading the system according to the system file and the differential file in the system backup area.
From the above description, it can be known that by the above method, only the corresponding differential file required for system upgrade needs to be made, and a complete upgrade file does not need to be made, thereby improving the system upgrade efficiency to a certain extent and reducing the use cost.
Further, the upgrading method further includes:
when the system is upgraded through OTA, the system files in the system partition are verified, and if the verification fails, the system files in the backup area are verified.
From the above description, the method ensures the system upgrading speed, and simultaneously ensures the stability and the safety of the system upgrading.
Further, the upgrading method further includes:
making a difference file between the current version and the target version of the system;
acquiring a standard hash value corresponding to the current version system file;
and obtaining an OTA upgrade package according to the difference file and the standard hash value.
From the above description, it can be seen that, by the above method, only the difference file between the current version and the target version needs to be made and the standard hash value corresponding to the current version needs to be obtained, and a finished system upgrade package does not need to be made.
Referring to fig. 2, the upgrade terminal provided by the present invention includes a memory 1, a processor 2 and a computer program stored in the memory 1 and capable of running on the processor 2, and when the processor 2 executes the program, the following steps are implemented:
before the system is upgraded by the patch upgrade patch, the system file is backed up in the preset backup area, so that the system file in the backup area can be checked when the system is upgraded by the OTA, and the OTA upgrade of the system is completed.
Further, the "checking the system file in the backup area" of the upgrade terminal specifically includes:
acquiring an OTA upgrade package required by system upgrade;
obtaining a hash value in the OTA upgrade package to obtain a first hash value;
obtaining a hash value in a system file of the backup area to obtain a second hash value;
and checking the second hash value and the first hash value.
Further, in the upgrade terminal, the step implemented when the processor executes the program further includes:
the OTA upgrade package comprises a difference file between a current version and a target version of the system;
and if the second hash value and the first hash value are successfully checked, upgrading the system according to the system file and the differential file in the system backup area.
Further, in the upgrade terminal, the step implemented when the processor executes the program further includes:
when the system is upgraded through OTA, the system files in the system partition are verified, and if the verification fails, the system files in the backup area are verified.
Further, in the upgrade terminal, the step implemented when the processor executes the program further includes:
making a difference file between the current version and the target version of the system;
acquiring a standard hash value corresponding to the current version system file;
and obtaining an OTA upgrade package according to the difference file and the standard hash value.
The first embodiment of the invention is as follows:
the invention provides an upgrading method, which comprises the following steps:
before the system is upgraded by the patch upgrade patch, backing up system files in a preset backup area, so that the system files in the backup area can be verified when the system is upgraded by an OTA (over the air) to finish the OTA upgrade of the system;
the "checking the system file in the backup area" specifically includes:
acquiring an OTA upgrade package required by system upgrade;
obtaining a hash value in the OTA upgrade package to obtain a first hash value;
obtaining a hash value in a system file of the backup area to obtain a second hash value;
and checking the second hash value and the first hash value.
The "checking the system file of the backup area" further includes:
the OTA upgrade package comprises a difference file between a current version and a target version of the system;
and if the second hash value and the first hash value are successfully checked, upgrading the system according to the system file and the differential file in the system backup area.
Before obtaining the OTA upgrade package required for system upgrade, the method further includes:
making a difference file between the current version and the target version of the system;
acquiring a standard hash value corresponding to the current version system file;
and obtaining an OTA upgrade package according to the difference file and the standard hash value.
Referring to fig. 1, the second embodiment of the present invention is:
before upgrading the system through the patch upgrading package, copying system files in a system partition in the terminal to a preset backup area for backup, installing the patch upgrading package, modifying the system in the patch upgrading process, and completing patch upgrading after the system is restarted;
if the system needs OTA upgrade, all system files of the system partition of the terminal are verified, because the system is upgraded by patches in advance, the system files fail to be verified, at the moment, the system files are read from the backup area for verification, and the verification process is as follows: the method comprises the steps of obtaining an OTA upgrade package required by system upgrade, and before obtaining the OTA upgrade package required by the system upgrade, manufacturing the OTA upgrade package, wherein the manufacturing process is as follows: manufacturing a difference file between a current version and a target version of a system, acquiring a standard hash value corresponding to the system file of the current version, and obtaining an OTA upgrade patch according to the difference file and the standard hash value; obtaining a hash value in the OTA upgrade package to obtain a first hash value; obtaining a hash value in a system file of the backup area to obtain a second hash value; and checking the second hash value and the first hash value. If the hash value is successfully verified, the system file in the backup area is used as the original file of the old version and the OTA upgrade package is used for carrying out differential upgrade on the system so as to finish OTA upgrade of the system.
Referring to fig. 2, a third embodiment of the present invention is:
the invention provides an upgrading terminal, which comprises a memory, a processor and a computer program which is stored on the memory and can be run on the processor, wherein the processor executes the program to realize the following steps:
before the system is upgraded by the patch upgrade patch, backing up system files in a preset backup area, so that the system files in the backup area can be verified when the system is upgraded by an OTA (over the air) to finish the OTA upgrade of the system;
the "checking the system file in the backup area" specifically includes:
acquiring an OTA upgrade package required by system upgrade;
obtaining a hash value in the OTA upgrade package to obtain a first hash value;
obtaining a hash value in a system file of the backup area to obtain a second hash value;
and checking the second hash value and the first hash value.
The "checking the system file of the backup area" further includes:
the OTA upgrade package comprises a difference file between a current version and a target version of the system;
and if the second hash value and the first hash value are successfully checked, upgrading the system according to the system file and the differential file in the system backup area.
Before obtaining the OTA upgrade package required for system upgrade, the method further includes:
making a difference file between the current version and the target version of the system;
acquiring a standard hash value corresponding to the current version system file;
and obtaining an OTA upgrade package according to the difference file and the standard hash value.
In summary, before the system is upgraded by the patch upgrade patch, the system file is backed up in the backup area, so that when the system needs to be upgraded by the OTA, the system file in the backup area can be read and correspondingly verified, so that the system can normally complete the OTA upgrade, and the problem that the system file of the system partition can be changed when the system is upgraded by the patch upgrade patch, so that the OTA upgrade fails is solved; meanwhile, the problem of safety of the system caused by the fact that the version needs to be made again when the OTA is upgraded every time if the system is upgraded only through the OTA, the required time is long, and some bugs of the system cannot be repaired in time is solved.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to other related technical fields, are included in the scope of the present invention.
Claims (8)
1. An upgrade method, comprising the steps of:
before the system is upgraded by the patch upgrade patch, the system file is backed up in a preset backup area, so that the system file in the system partition is verified when the system is upgraded by the OTA, if the verification fails, the system file in the backup area is verified, and if the verification succeeds, the system file in the backup area is used as an original file of an old version and the OTA upgrade patch to differentially upgrade the system, so that the OTA upgrade of the system is completed.
2. The upgrading method according to claim 1, wherein the "checking the system file in the backup area" specifically includes:
acquiring an OTA upgrade package required by system upgrade;
obtaining a hash value in the OTA upgrade package to obtain a first hash value;
obtaining a hash value in a system file of the backup area to obtain a second hash value;
and checking the second hash value and the first hash value.
3. The upgrading method according to claim 2, further comprising:
the OTA upgrade package comprises a difference file between a current version and a target version of the system;
and if the second hash value and the first hash value are successfully checked, upgrading the system according to the system file and the differential file in the system backup area.
4. The upgrading method according to claim 1, further comprising:
making a difference file between the current version and the target version of the system;
acquiring a standard hash value corresponding to the current version system file;
and obtaining an OTA upgrade package according to the difference file and the standard hash value.
5. An upgrade terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the following steps when executing the program:
before the system is upgraded by the patch upgrade patch, the system file is backed up in a preset backup area, so that the system file in the system partition is verified when the system is upgraded by the OTA, if the verification fails, the system file in the backup area is verified, and if the verification succeeds, the system file in the backup area is used as an original file of an old version and the OTA upgrade patch to differentially upgrade the system, so that the OTA upgrade of the system is completed.
6. The upgrade terminal according to claim 5, wherein the "checking the system file in the backup area" specifically includes:
acquiring an OTA upgrade package required by system upgrade;
obtaining a hash value in the OTA upgrade package to obtain a first hash value;
obtaining a hash value in a system file of the backup area to obtain a second hash value;
and checking the second hash value and the first hash value.
7. The upgrade terminal according to claim 6, wherein the processor, when executing the program, performs the steps further comprising:
the OTA upgrade package comprises a difference file between a current version and a target version of the system;
and if the second hash value and the first hash value are successfully checked, upgrading the system according to the system file and the differential file in the system backup area.
8. The upgrade terminal according to claim 5, wherein the processor, when executing the program, performs the steps further comprising:
making a difference file between the current version and the target version of the system;
acquiring a standard hash value corresponding to the current version system file;
and obtaining an OTA upgrade package according to the difference file and the standard hash value.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710470896.3A CN107301070B (en) | 2017-06-20 | 2017-06-20 | Upgrading method and terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710470896.3A CN107301070B (en) | 2017-06-20 | 2017-06-20 | Upgrading method and terminal |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107301070A CN107301070A (en) | 2017-10-27 |
| CN107301070B true CN107301070B (en) | 2020-09-29 |
Family
ID=60136355
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710470896.3A Active CN107301070B (en) | 2017-06-20 | 2017-06-20 | Upgrading method and terminal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107301070B (en) |
Families Citing this family (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107888577B (en) * | 2017-10-31 | 2021-03-19 | 美智光电科技股份有限公司 | Door lock firmware upgrade method, door lock, server, system and storage medium |
| CN109101279B (en) * | 2018-06-26 | 2021-08-24 | 珠海全志科技股份有限公司 | Compatibility starting method of multi-version system |
| CN110096301A (en) * | 2019-05-08 | 2019-08-06 | 深信服科技股份有限公司 | A kind of hot upgrade method of storage system, system and electronic equipment and storage medium |
| CN110392103B (en) * | 2019-07-18 | 2023-12-19 | 上海擎感智能科技有限公司 | Uploading method, device and server for upgrade package of vehicle-mounted equipment |
| CN110554934B (en) * | 2019-09-06 | 2022-08-19 | 超越科技股份有限公司 | Embedded equipment and system partitioning and upgrading method thereof |
| CN114168168B (en) * | 2020-09-10 | 2025-06-13 | 华为技术有限公司 | Device tree repair method, system and computer readable storage medium |
| CN114020299A (en) * | 2021-11-16 | 2022-02-08 | 四川长虹电器股份有限公司 | A method for updating system files of an Android device |
| CN114816495A (en) * | 2022-05-25 | 2022-07-29 | 歌尔股份有限公司 | OTA (over the air) upgrading method and device, electronic equipment and readable storage medium |
| CN115250174A (en) * | 2022-07-26 | 2022-10-28 | 深圳微言科技有限责任公司 | A privacy protection system for behavioral data |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103186390A (en) * | 2011-12-29 | 2013-07-03 | 中国移动通信集团公司 | Home gateway and software upgrading method thereof |
| CN104461648A (en) * | 2014-12-22 | 2015-03-25 | 广东欧珀移动通信有限公司 | OTA upgrade backing-up method and system for intelligent terminals |
| CN105138347A (en) * | 2015-07-17 | 2015-12-09 | 广东欧珀移动通信有限公司 | A differential upgrade package generation method, software upgrade method and corresponding device |
| CN105468477A (en) * | 2015-11-20 | 2016-04-06 | 青岛海信移动通信技术股份有限公司 | Android system protection method and apparatus |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105335181A (en) * | 2014-08-06 | 2016-02-17 | 中兴通讯股份有限公司 | OTA upgrade realization method and terminal |
| CN106790247A (en) * | 2017-01-23 | 2017-05-31 | 青岛海信移动通信技术股份有限公司 | A kind of method and apparatus of android system upgrading |
-
2017
- 2017-06-20 CN CN201710470896.3A patent/CN107301070B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103186390A (en) * | 2011-12-29 | 2013-07-03 | 中国移动通信集团公司 | Home gateway and software upgrading method thereof |
| CN104461648A (en) * | 2014-12-22 | 2015-03-25 | 广东欧珀移动通信有限公司 | OTA upgrade backing-up method and system for intelligent terminals |
| CN105138347A (en) * | 2015-07-17 | 2015-12-09 | 广东欧珀移动通信有限公司 | A differential upgrade package generation method, software upgrade method and corresponding device |
| CN105468477A (en) * | 2015-11-20 | 2016-04-06 | 青岛海信移动通信技术股份有限公司 | Android system protection method and apparatus |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107301070A (en) | 2017-10-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107301070B (en) | Upgrading method and terminal | |
| US9804933B2 (en) | System differential upgrade method, apparatus, and mobile terminal | |
| CN113821235B (en) | Operating system data update method, equipment, storage medium and program product | |
| CN106775610B (en) | Electronic equipment starting method and electronic equipment | |
| TWI533216B (en) | Operating system updating method | |
| US20110320794A1 (en) | Flash System And Method For Updating The Flash System | |
| CN112416406B (en) | Terminal equipment upgrading method, device, terminal equipment and medium | |
| US10437580B2 (en) | Software updating methods and systems | |
| EP3153968B1 (en) | Multi-system terminal system updating method, updating device and terminal | |
| US20170242685A1 (en) | Updating of firmware | |
| CN108021427A (en) | Information system deployment and updating management method based on Docker | |
| CN110209420A (en) | A kind of method and device updating bootstrap loader | |
| CN103218242A (en) | Method of automatic update | |
| CN107220060A (en) | It is a kind of while supporting the method and system of multiple OTA AKUs upgrading | |
| WO2018032757A1 (en) | Method and device for updating component | |
| WO2018024198A1 (en) | Application upgrade method and system for set-top box, and set-top box | |
| WO2020029967A1 (en) | Method and apparatus for repairing fault in operating system | |
| CN107643898A (en) | Terminal staging method and device | |
| WO2015184732A1 (en) | Bootstrap storage method, bootstrap fault recovery method and device, and computer storage medium | |
| CN104536841A (en) | Self-repairing method and self-repairing system for Data subarea of Android system | |
| CN104427120B (en) | Communication terminal and its processing method of Nonvolatile data | |
| CN113721948A (en) | Database upgrading method, system and storage medium | |
| CN109375953B (en) | Operating system starting method and device | |
| WO2021012170A1 (en) | Firmware booting method and device, and computer-readable storage medium | |
| CN110716723A (en) | Firmware upgrading method and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address |
Address after: Room 201-9, Zone C, No. 18 Guanri Road, Phase II, Software Park, Torch High tech Zone, Xiamen City, Fujian Province, 361000 Patentee after: Fujian Huisibo Digital Technology Co.,Ltd. Address before: No. 89 Software Avenue, Tongpan Road, Gulou District, Fuzhou City, Fujian Province, 350000. 510, Floor 5, 34 #, Zone C, Fuzhou Software Park Patentee before: FUZHOU HUISIBO INFORMATION TECHNOLOGY Co.,Ltd. |
|
| CP03 | Change of name, title or address |