CN109766119B - Recovery partition upgrade method, terminal and computer readable storage medium - Google Patents

Recovery partition upgrade method, terminal and computer readable storage medium Download PDF

Info

Publication number
CN109766119B
CN109766119B CN201910068719.1A CN201910068719A CN109766119B CN 109766119 B CN109766119 B CN 109766119B CN 201910068719 A CN201910068719 A CN 201910068719A CN 109766119 B CN109766119 B CN 109766119B
Authority
CN
China
Prior art keywords
terminal
upgrade
recovery
recovery partition
partition
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
CN201910068719.1A
Other languages
Chinese (zh)
Other versions
CN109766119A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201910068719.1A priority Critical patent/CN109766119B/en
Publication of CN109766119A publication Critical patent/CN109766119A/en
Application granted granted Critical
Publication of CN109766119B publication Critical patent/CN109766119B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a recovery partition upgrading method, a terminal and a computer readable storage medium, wherein the method comprises the following steps: when the terminal is started, detecting a preset zone bit used for indicating that the recovery partition needs to be upgraded from the terminal; and upgrading the recovery partition when the flag bit is detected. According to the technical scheme of the invention, when the recovery partition of the terminal is required to be upgraded, a flag bit is preset in the terminal, the detection is automatically carried out when the terminal is started, if the flag bit is detected, the recovery is required to be upgraded, and the upgrading process is executed to realize the upgrading of the recovery partition.

Description

Recovery partition upgrade method, terminal and computer readable storage medium
Technical Field
The present invention relates to the field of mobile terminals, and in particular, to a recovery partition upgrade method, a terminal, and a computer readable storage medium.
Background
In existing mobile phone systems, for example, android systems (Android systems), recovery partitions are usually set. In the recovery partition, the user may perform operations such as clearing data, installing a brush package to upgrade other partitions, and the like.
However, in the prior art, other partitions are upgraded through recovery, but there is no way to upgrade the recovery partition through other partitions, so the recovery partition is not upgraded under normal conditions. Even if there is a need to upgrade the recovery partition, it is difficult to implement the upgrade of the recovery partition.
Therefore, a technical solution is needed to implement the upgrade of the recovery partition.
Disclosure of Invention
The invention mainly aims at providing a recovery partition upgrading method, a terminal and a computer readable storage medium, and aims at realizing upgrading of recovery partitions.
In order to achieve the above object, the present invention provides a method for recovering partition upgrade, including: when the terminal is started, detecting a preset zone bit used for indicating that the recovery partition needs to be upgraded from the terminal; and upgrading the recovery partition when the flag bit is detected.
To achieve the above object, the present invention provides a terminal including a processor, a memory, a communication bus; the communication bus is used for realizing connection communication between the processor and the memory; the processor is configured to execute a recovery partition upgrade program stored in the memory to implement the steps of the foregoing method.
To achieve the above object, the present invention provides a computer-readable storage medium storing one or more programs executable by one or more processors to implement the steps of the foregoing method.
According to the above technical solutions, the recovery partition upgrade method, the terminal and the computer readable storage medium of the present invention have at least the following advantages:
according to the technical scheme of the invention, when the recovery partition of the terminal is required to be upgraded, a flag bit is preset in the terminal, the detection is automatically carried out when the terminal is started, if the flag bit is detected, the recovery is required to be upgraded, and the upgrading process is executed to realize the upgrading of the recovery partition.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention;
fig. 2 is a schematic diagram of a wireless communication system of the mobile terminal shown in fig. 1;
FIG. 3 is a flow chart of a method of restoring a partition upgrade according to one embodiment of the present invention;
FIG. 4 is a flow chart of a method of recovering a partition upgrade according to one embodiment of the present invention;
fig. 5 is a block diagram of a function trigger device according to one embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "part" or "unit" for representing elements are used only for facilitating the description of the present invention, and have no particular meaning in themselves. Thus, "module," "component," or "unit" may be used in combination.
The terminal may be implemented in various forms. For example, the terminals described in the present invention may include mobile terminals such as cell phones, tablet computers, notebook computers, palm computers, personal digital assistants (PersonalDigital Assistant, PDA), portable media players (Portable Media Player, PMP), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs, desktop computers, and the like.
The following description will be given taking a mobile terminal as an example, and those skilled in the art will understand that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for a moving purpose.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention, the mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will appreciate that the mobile terminal structure shown in fig. 1 is not limiting of the mobile terminal and that the mobile terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be used for receiving and transmitting signals during the information receiving or communication process, specifically, after receiving downlink information of the base station, processing the downlink information by the processor 110; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (General Packet Radio Service ), CDMA2000 (Code Division Multiple Access, CDMA 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the necessary constitution of a mobile terminal, and can be omitted entirely as required within a range that does not change the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the mobile terminal 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting the audio signal.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the mobile terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the mobile phone, the detailed description thereof will be omitted.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the mobile terminal. In particular, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 108 serves as an interface through which at least one external device can be connected with the mobile terminal 100. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power source 111 (e.g., a battery) for supplying power to the respective components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based will be described below.
Referring to fig. 2, fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention, where the communication network system is an LTE system of a general mobile communication technology, and the LTE system includes a UE (User Equipment) 201, an e-UTRAN (Evolved UMTS Terrestrial Radio Access Network ) 202, an epc (Evolved Packet Core, evolved packet core) 203, and an IP service 204 of an operator that are sequentially connected in communication.
Specifically, the UE201 may be the terminal 100 described above, and will not be described herein.
The E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. The eNodeB2021 may be connected with other eNodeB2022 by a backhaul (e.g., an X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide access from the UE201 to the EPC 203.
EPC203 may include MME (Mobility Management Entity ) 2031, hss (Home Subscriber Server, home subscriber server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, pgw (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function, policy and tariff function entity) 2036, and so on. The MME2031 is a control node that handles signaling between the UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location registers (not shown) and to hold user specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034 and PGW2035 may provide IP address allocation and other functions for UE201, PCRF2036 is a policy and charging control policy decision point for traffic data flows and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem ), or other IP services, etc.
Although the LTE system is described above as an example, it should be understood by those skilled in the art that the present invention is not limited to LTE systems, but may be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and the communication network system, various embodiments of the method of the present invention are provided.
As shown in fig. 3, in one embodiment of the present invention, there is provided a recovery partition upgrade method, including:
step S310, when the terminal is started, a preset zone bit used for indicating that the recovery partition needs to be upgraded is detected from the terminal.
In this embodiment, the specific form of the flag bit is not limited, and may be, for example, a file with a specific name, or a special character in a preset text. In this embodiment, the flag bit is not limited to the storage location of the terminal, for example, there may be a preset certain directory. In this embodiment, if a recovery partition of the terminal is required, a flag bit is preset and used for triggering an upgrade of the recovery partition.
Step S320, when the flag bit is detected, the recovery partition is upgraded.
In this embodiment, the upgrading manner is not limited, and the existing technical solutions for upgrading the recovery partition are all applicable to the technical solutions of this embodiment.
According to the technical scheme of the embodiment, when the recovery partition of the terminal needs to be upgraded, a flag bit is set in the terminal in advance, detection is automatically performed when the terminal is started, if the flag bit is detected, the condition that the recovery needs to be upgraded is indicated, and at the moment, the upgrading process is executed to achieve the upgrading of the recovery partition.
As shown in fig. 4, in one embodiment of the present invention, there is provided a recovery partition upgrade method, including:
step S410, an upgrade package and an upgrade script for upgrading the recovery partition of the terminal are manufactured.
In this embodiment, the upgrade package includes content for upgrading the recovery partition, and the upgrade script records a process for upgrading the recovery partition using the upgrade package.
Specifically, two methods for making an upgrade package are provided in the present embodiment: (1) Manufacturing a differential packet of a recovery mirror image of the recovery partition, and generating an upgrade packet based on the differential packet; (2) And manufacturing a replacement image of the recovery partition, and generating an upgrade package based on the replacement image.
In this embodiment, for the mode (1), a difference packet may be generated based on the difference between the new version content and the original version content of the recovery partition, and the data size of the difference packet is smaller, so that the terminal can download and store the difference packet conveniently; (2) And generating a replacement mirror image based on the new version of the recovery, namely completely replacing original edition content by the new version of the recovery, wherein the method has stronger stability in the upgrading process.
Step S420, detecting an upgrade script, and setting a flag bit in a cache partition of the terminal when the upgrade script is found to be used for upgrading the recovery partition.
In this embodiment, after each upgrade script is manufactured, the upgrade script is detected, and if the upgrade script is found to be used for upgrading the recovery partition of the terminal, a flag bit is set in the cache partition (cache partition) of the terminal. The advantage of setting the flag bit in the cache partition is that the data in the cache partition is automatically cleared when the terminal is restarted into normal mode (normal mode), so that it is not necessary to perform the deletion operation of the flag bit.
Step S430, after setting the flag bit in the terminal, setting a start-up item for triggering detection of the flag bit when the terminal is started up.
In this embodiment, by setting the startup item, the terminal can timely detect whether the recovery partition needs to be upgraded after startup.
Step S440, when the terminal is started, a preset zone bit used for indicating that the recovery partition needs to be upgraded is detected from the terminal.
Step S450, when the flag bit is detected, an upgrade script is executed to upgrade the recovery partition by using the upgrade package.
In this embodiment, when the upgrade package is manufactured based on the differential package, the upgrade script is performed in a differential upgrade manner; when the upgrade package is manufactured based on the replacement image, the upgrade script is manufactured in an image replacement mode.
Step S460, after the recovery partition upgrade is completed, the startup item is deleted.
In this embodiment, after the recovery partition is upgraded, it is not necessary to reserve a startup item, so as to avoid unnecessary startup detection when the terminal is started next time.
Step S470, generating a user prompt according to the execution progress of the upgrade script.
In this embodiment, in order to ensure that the user knows the upgrade condition in time, a user prompt is generated to prompt the current upgrade progress.
According to the technical scheme of the embodiment, the technical scheme for upgrading the recovery partition in the normal mode can be realized: firstly, manufacturing a recovery mirror image difference packet through a script, and placing the difference packet into an upgrade packet; making an upgrade script, and making the upgrade script in a differential upgrade or mirror image replacement mode; firstly, upgrading other partitions in a recovery mode, judging whether the recovery partition needs to be upgraded in an upgrading script, and if the recovery partition needs to be upgraded, placing a flag bit in a cache partition; writing a starting item, and detecting whether a flag bit exists or not when starting; and if the flag bit exists, wrapping the recovery upgrade into the recovery partition through the upgrade script.
At present, after a terminal is shipped, fota upgrading (over-the-air software upgrading) is the only mode capable of improving user experience, and if a recovery partition cannot be upgraded, partial function realization is blocked, recovery upgrading can be achieved through the technical scheme of the embodiment, and improvement of terminal functions is facilitated.
As shown in fig. 5, in one embodiment of the present invention, there is provided a terminal including a processor 510, a memory 520, a communication bus 530; communication bus 530 is used to enable connected communication between processor 510 and memory 520; the processor 510 is configured to execute a recovery partition upgrade program stored in the memory 520 to implement the following steps:
when the terminal is started, a preset zone bit used for indicating that the recovery partition needs to be upgraded is detected from the terminal.
In this embodiment, the specific form of the flag bit is not limited, and may be, for example, a file with a specific name, or a special character in a preset text. In this embodiment, the flag bit is not limited to the storage location of the terminal, for example, there may be a preset certain directory. In this embodiment, if a recovery partition of the terminal is required, a flag bit is preset and used for triggering an upgrade of the recovery partition.
And upgrading the recovery partition when the flag bit is detected.
In this embodiment, the upgrading manner is not limited, and the existing technical solutions for upgrading the recovery partition are all applicable to the technical solutions of this embodiment.
According to the technical scheme of the embodiment, when the recovery partition of the terminal needs to be upgraded, a flag bit is set in the terminal in advance, detection is automatically performed when the terminal is started, if the flag bit is detected, the condition that the recovery needs to be upgraded is indicated, and at the moment, the upgrading process is executed to achieve the upgrading of the recovery partition.
In one embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing one or more programs executable by one or more processors to implement the steps of:
and making an upgrade package and an upgrade script for upgrading the recovery partition of the terminal.
In this embodiment, the upgrade package includes content for upgrading the recovery partition, and the upgrade script records a process for upgrading the recovery partition using the upgrade package.
Specifically, two methods for making an upgrade package are provided in the present embodiment: (1) Manufacturing a differential packet of a recovery mirror image of the recovery partition, and generating an upgrade packet based on the differential packet; (2) And manufacturing a replacement image of the recovery partition, and generating an upgrade package based on the replacement image.
In this embodiment, for the mode (1), a difference packet may be generated based on the difference between the new version content and the original version content of the recovery partition, and the data size of the difference packet is smaller, so that the terminal can download and store the difference packet conveniently; (2) And generating a replacement mirror image based on the new version of the recovery, namely completely replacing original edition content by the new version of the recovery, wherein the method has stronger stability in the upgrading process.
And detecting an upgrade script, and setting a flag bit in a cache partition of the terminal when the upgrade script is found to be used for upgrading the recovery partition.
In this embodiment, after each upgrade script is manufactured, the upgrade script is detected, and if the upgrade script is found to be used for upgrading the recovery partition of the terminal, a flag bit is set in the cache partition (cache partition) of the terminal. The advantage of setting the flag bit in the cache partition is that the data in the cache partition is automatically cleared when the terminal is restarted into normal mode (normal mode), so that it is not necessary to perform the deletion operation of the flag bit.
After the flag bit is set in the terminal, a startup item is set for triggering detection of the flag bit when the terminal is started.
In this embodiment, by setting the startup item, the terminal can timely detect whether the recovery partition needs to be upgraded after startup.
When the terminal is started, a preset zone bit used for indicating that the recovery partition needs to be upgraded is detected from the terminal.
And when the flag bit is detected, executing an upgrade script to upgrade the recovery partition by using the upgrade package.
In this embodiment, when the upgrade package is manufactured based on the differential package, the upgrade script is performed in a differential upgrade manner; when the upgrade package is manufactured based on the replacement image, the upgrade script is manufactured in an image replacement mode.
And deleting the starting item after the recovery partition is upgraded.
In this embodiment, after the recovery partition is upgraded, it is not necessary to reserve a startup item, so as to avoid unnecessary startup detection when the terminal is started next time.
And generating a user prompt according to the execution progress of the upgrade script.
In this embodiment, in order to ensure that the user knows the upgrade condition in time, a user prompt is generated to prompt the current upgrade progress.
According to the technical scheme of the embodiment, the technical scheme for upgrading the recovery partition in the normal mode can be realized: firstly, manufacturing a recovery mirror image difference packet through a script, and placing the difference packet into an upgrade packet; making an upgrade script, and making the upgrade script in a differential upgrade or mirror image replacement mode; firstly, upgrading other partitions in a recovery mode, judging whether the recovery partition needs to be upgraded in an upgrading script, and if the recovery partition needs to be upgraded, placing a flag bit in a cache partition; writing a starting item, and detecting whether a flag bit exists or not when starting; and if the flag bit exists, wrapping the recovery upgrade into the recovery partition through the upgrade script.
At present, after a terminal is shipped, fota upgrading (over-the-air software upgrading) is the only mode capable of improving user experience, and if a recovery partition cannot be upgraded, partial function realization is blocked, recovery upgrading can be achieved through the technical scheme of the embodiment, and improvement of terminal functions is facilitated.
In one embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing one or more programs executable by one or more processors to implement the steps of:
and making an upgrade package and an upgrade script for upgrading the recovery partition of the terminal.
In this embodiment, the upgrade package includes content for upgrading the recovery partition, and the upgrade script records a process for upgrading the recovery partition using the upgrade package.
Specifically, two methods for making an upgrade package are provided in the present embodiment: (1) Manufacturing a differential packet of a recovery mirror image of the recovery partition, and generating an upgrade packet based on the differential packet; (2) And manufacturing a replacement image of the recovery partition, and generating an upgrade package based on the replacement image.
In this embodiment, for the mode (1), a difference packet may be generated based on the difference between the new version content and the original version content of the recovery partition, and the data size of the difference packet is smaller, so that the terminal can download and store the difference packet conveniently; (2) And generating a replacement mirror image based on the new version of the recovery, namely completely replacing original edition content by the new version of the recovery, wherein the method has stronger stability in the upgrading process.
And detecting an upgrade script, and setting a flag bit in a cache partition of the terminal when the upgrade script is found to be used for upgrading the recovery partition.
In this embodiment, after each upgrade script is manufactured, the upgrade script is detected, and if the upgrade script is found to be used for upgrading the recovery partition of the terminal, a flag bit is set in the cache partition (cache partition) of the terminal. The advantage of setting the flag bit in the cache partition is that the data in the cache partition is automatically cleared when the terminal is restarted into normal mode (normal mode), so that it is not necessary to perform the deletion operation of the flag bit.
After the flag bit is set in the terminal, a startup item is set for triggering detection of the flag bit when the terminal is started.
In this embodiment, by setting the startup item, the terminal can timely detect whether the recovery partition needs to be upgraded after startup.
When the terminal is started, a preset zone bit used for indicating that the recovery partition needs to be upgraded is detected from the terminal.
And when the flag bit is detected, executing an upgrade script to upgrade the recovery partition by using the upgrade package.
In this embodiment, when the upgrade package is manufactured based on the differential package, the upgrade script is performed in a differential upgrade manner; when the upgrade package is manufactured based on the replacement image, the upgrade script is manufactured in an image replacement mode.
And deleting the starting item after the recovery partition is upgraded.
In this embodiment, after the recovery partition is upgraded, it is not necessary to reserve a startup item, so as to avoid unnecessary startup detection when the terminal is started next time.
And generating a user prompt according to the execution progress of the upgrade script.
In this embodiment, in order to ensure that the user knows the upgrade condition in time, a user prompt is generated to prompt the current upgrade progress.
According to the technical scheme of the embodiment, the technical scheme for upgrading the recovery partition in the normal mode can be realized: firstly, manufacturing a recovery mirror image difference packet through a script, and placing the difference packet into an upgrade packet; making an upgrade script, and making the upgrade script in a differential upgrade or mirror image replacement mode; firstly, upgrading other partitions in a recovery mode, judging whether the recovery partition needs to be upgraded in an upgrading script, and if the recovery partition needs to be upgraded, placing a flag bit in a cache partition; writing a starting item, and detecting whether a flag bit exists or not when starting; and if the flag bit exists, wrapping the recovery upgrade into the recovery partition through the upgrade script.
At present, after a terminal is shipped, fota upgrading (over-the-air software upgrading) is the only mode capable of improving user experience, and if a recovery partition cannot be upgraded, partial function realization is blocked, recovery upgrading can be achieved through the technical scheme of the embodiment, and improvement of terminal functions is facilitated.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (8)

1. A method for recovering a partition upgrade, comprising:
when a terminal is started, detecting a preset zone bit used for indicating that the recovery partition needs to be upgraded from the terminal;
upgrading the recovery partition when the flag bit is detected;
when the terminal is started, before the flag bit for indicating that the recovery partition needs to be upgraded is detected from the terminal, the method further comprises the following steps:
making an upgrade package and an upgrade script for upgrading the recovery partition of the terminal;
detecting the upgrade script, setting the zone bit in the terminal when the upgrade script is used for upgrading the recovery partition, and setting a starting item for triggering and detecting the zone bit when the terminal is started;
the upgrading of the recovery partition includes:
and executing the upgrade script to upgrade the recovery partition by using the upgrade package.
2. The method of claim 1, wherein the creating an upgrade package and an upgrade script for upgrading the recovery partition of the terminal comprises:
and manufacturing a differential packet of the recovery mirror image of the recovery partition, and generating the upgrade packet based on the differential packet.
3. The method of claim 1, wherein the creating an upgrade package and an upgrade script for upgrading the recovery partition of the terminal comprises:
and manufacturing a replacement image of the recovery partition, and generating the upgrade package based on the replacement image.
4. The method of claim 1, wherein the setting a flag bit in the terminal comprises:
and setting the zone bit in a cache partition of the terminal.
5. The method as recited in claim 1, further comprising:
and deleting the starting item after the recovery partition is upgraded.
6. The method as recited in claim 1, further comprising:
and generating a user prompt according to the execution progress of the upgrade script.
7. A terminal, wherein the terminal comprises a processor, a memory and a communication bus; the communication bus is used for realizing connection communication between the processor and the memory; the processor is configured to execute a recovery partition upgrade program stored in a memory to implement the steps of the method of any one of claims 1 to 6.
8. A computer readable storage medium storing one or more programs executable by one or more processors to implement the steps of the method of any of claims 1 to 6.
CN201910068719.1A 2019-01-24 2019-01-24 Recovery partition upgrade method, terminal and computer readable storage medium Active CN109766119B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910068719.1A CN109766119B (en) 2019-01-24 2019-01-24 Recovery partition upgrade method, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910068719.1A CN109766119B (en) 2019-01-24 2019-01-24 Recovery partition upgrade method, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109766119A CN109766119A (en) 2019-05-17
CN109766119B true CN109766119B (en) 2023-10-17

Family

ID=66455232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910068719.1A Active CN109766119B (en) 2019-01-24 2019-01-24 Recovery partition upgrade method, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109766119B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110399153B (en) * 2019-07-25 2023-11-03 Oppo广东移动通信有限公司 System upgrading method, device, terminal and computer readable storage medium
CN110569058B (en) * 2019-09-09 2023-06-30 Oppo(重庆)智能科技有限公司 System upgrading method, device, terminal and computer readable storage medium
CN111694608B (en) * 2020-06-08 2023-06-20 阿波罗智联(北京)科技有限公司 System upgrading method and device of terminal equipment, electronic equipment and terminal equipment
CN111694589B (en) * 2020-06-15 2023-09-29 Oppo(重庆)智能科技有限公司 Upgrade package generation method, device, server and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965736A (en) * 2015-06-19 2015-10-07 青岛海信移动通信技术股份有限公司 Continuous upgrade method and apparatus
CN105468396A (en) * 2014-09-11 2016-04-06 深圳Tcl数字技术有限公司 Generating method for differential package, upgrading method, generating apparatus, and Linux terminal
CN107133056A (en) * 2017-06-09 2017-09-05 北京云创远景软件有限责任公司 The method and apparatus of smart machine upgrading restoring subregion
CN108984196A (en) * 2018-06-29 2018-12-11 深圳市九洲电器有限公司 A kind of method for upgrading system and Android TV system set-top box of Android TV system set-top box
CN108984198A (en) * 2018-07-16 2018-12-11 深圳市茁壮网络股份有限公司 A kind of upgrade method and device of android system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468396A (en) * 2014-09-11 2016-04-06 深圳Tcl数字技术有限公司 Generating method for differential package, upgrading method, generating apparatus, and Linux terminal
CN104965736A (en) * 2015-06-19 2015-10-07 青岛海信移动通信技术股份有限公司 Continuous upgrade method and apparatus
CN107133056A (en) * 2017-06-09 2017-09-05 北京云创远景软件有限责任公司 The method and apparatus of smart machine upgrading restoring subregion
CN108984196A (en) * 2018-06-29 2018-12-11 深圳市九洲电器有限公司 A kind of method for upgrading system and Android TV system set-top box of Android TV system set-top box
CN108984198A (en) * 2018-07-16 2018-12-11 深圳市茁壮网络股份有限公司 A kind of upgrade method and device of android system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种基于Android平台机顶盒的按键修复Recovery系统方法;黄荣铭;叶宇煌;;有线电视技术(05);全文 *

Also Published As

Publication number Publication date
CN109766119A (en) 2019-05-17

Similar Documents

Publication Publication Date Title
CN108572764B (en) Character input control method and device and computer readable storage medium
CN109587747B (en) SIM card switching control method, terminal and computer storage medium
CN109766119B (en) Recovery partition upgrade method, terminal and computer readable storage medium
CN109040441B (en) Application body-separating display method, mobile terminal and computer readable storage medium
CN110187925B (en) Desktop pre-starting control method, device and computer readable storage medium
CN108958936B (en) Application program switching method, mobile terminal and computer readable storage medium
CN107818022B (en) Application program interface merging method, mobile terminal and computer readable storage medium
CN110677897B (en) Network search control method, terminal and computer readable storage medium
CN109725819B (en) Interface display method and device, double-screen double-system terminal and readable storage medium
CN109254972B (en) Offline command word bank updating method, terminal and computer readable storage medium
CN113067734B (en) Electronic price tag upgrading method, electronic price tag system, electronic terminal and storage medium
CN107748680B (en) Kernel configuration method, terminal and computer readable storage medium
CN110187934B (en) Application control method, terminal and computer readable storage medium
CN110413330B (en) Face unlocking initialization method, equipment and computer readable storage medium
CN110083294B (en) Screen capturing method, terminal and computer readable storage medium
CN110191477B (en) Network search control method, terminal and computer readable storage medium
CN109684020B (en) Theme switching method, device and computer readable storage medium
CN108845821B (en) Application program updating method, terminal and computer readable storage medium
CN109151201B (en) Anti-addiction method, mobile terminal and computer storage medium
CN109062688B (en) Memory allocation method, server and mobile terminal
CN108566476B (en) Information processing method, terminal and computer readable storage medium
CN110955397A (en) Method for setting frame rate of game terminal, game terminal and storage medium
CN110572518B (en) Screen-extinguishing control method, mobile terminal and computer-readable storage medium
CN110413415B (en) Memory management control method, equipment and computer readable storage medium
CN110069161B (en) Screen recognition method, mobile terminal and computer-readable storage medium

Legal Events

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