A terminal and external memory card portable system upgrade method

By using processors and communication units in the terminal, comparing the version number of the portable system and upgrading it, the problem that the portable system cannot be upgraded is solved, and the effective upgrade of the portable system is achieved.

CN114138293BActive Publication Date: 2025-04-29QINGDAO HISENSE MOBILE COMM TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010924082.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-04
Publication Date
2025-04-29
Estimated Expiration
2040-09-04

AI Technical Summary

Technical Problem

The existing terminals lack effective upgrade process when upgrading portable systems, resulting in the inability to upgrade the portable system.

Method used

By introducing a processor and a communication unit into the terminal, the verification partition of the external memory card is used to obtain the version number of the portable system, and compare it with the latest version number in the server. If there is an update, it will be restarted and enter the recovery mode for upgrading.

Benefits of technology

It realizes the upgrade of the portable system in the external memory card when the terminal runs different systems, ensuring that the portable system can obtain the latest version number and updates in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114138293B_ABST
    Figure CN114138293B_ABST
Patent Text Reader

Abstract

The present invention discloses a terminal and an external memory card portable system upgrade method, which relates to the technical field of multi-system upgrade, and the method comprises: a terminal connected to an external memory card containing a portable system compares the version number of the portable system obtained in the check partition of the external memory card with the version number of the latest portable system in the server, if the portable system is currently running, and it is determined according to the comparison result that the portable system has been updated, then restart and enter the recovery mode, in which the portable system stored in the external memory card is upgraded, and the version number in the check partition is replaced with the upgraded new version number; if the local system is currently running, and it is determined according to the comparison result that the portable system has been updated, then the portable system stored in the external memory card is directly upgraded, and the version number in the check partition is replaced with the upgraded new version number. The present invention can realize the upgrade of the portable system under different operating systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of multi-system upgrade, and in particular to a terminal and an external memory card portable system upgrade method. Background Art

[0002] With the update of technology, the system on the terminal will also be upgraded. Since there is only one system on the current terminal, when upgrading, it only needs to query the version number of the current system of the terminal to determine whether to upgrade. If it is upgraded, the terminal will start the local upgrade process to upgrade the local system.

[0003] However, the existing terminal does not have an external memory card containing a portable system inserted therein, so when the portable system of the external memory card needs to be upgraded, the terminal does not have an upgrade process for the portable system, thereby causing the portable system to be unable to be upgraded. Summary of the invention

[0004] The invention provides a terminal and an external memory card portable system upgrade method, which are used for upgrading the external portable system.

[0005] In a first aspect, the present invention provides a terminal, comprising: an interface, a processor and a communication unit;

[0006] The interface is used for connecting an external memory card including a portable system;

[0007] The communication unit is used to communicate with the server to obtain the latest version number of the portable system in the server;

[0008] The processor is used to compare the version number of the portable system obtained in the verification partition of the external storage card with the latest version number of the portable system in the server, wherein the external storage card includes a system partition for storing the portable system and a verification partition for storing a version number used in a verification process when starting the portable system;

[0009] If the portable system is currently running and it is determined according to the comparison result that the portable system has been updated, restarting and entering recovery mode, upgrading the portable system stored in the external memory card in the recovery mode, and replacing the version number in the verification partition with the upgraded new version number; or

[0010] If the local system is currently running, and it is determined according to the comparison result that the portable system has been updated, the portable system stored in the external storage card is directly upgraded, and the version number in the verification partition is replaced with the upgraded new version number.

[0011] The terminal provided by the present invention obtains the version number of the portable system in the verification partition of the external storage card, and compares it with the latest version number of the portable system in the server. After determining that it can be updated, it can upgrade the portable system in the external storage card under the current running of different systems.

[0012] In a possible implementation manner, the processor is specifically configured to:

[0013] If the terminal is currently running the portable system, the version number of the portable system is read from a database corresponding to the portable system; the version number of the portable system in the database corresponding to the portable system is read from a check partition of the external storage card after determining that the terminal is externally connected to an external storage card containing the portable system, and the version number of the portable system is recorded in the database corresponding to the portable system after decryption; or

[0014] If the terminal is currently running the local system, the version number of the portable system is directly read from the verification partition of the external storage card and decrypted to obtain the version number of the portable system.

[0015] An embodiment of the present invention provides a terminal, which can obtain the version number of a portable system when running different systems.

[0016] In a possible implementation manner, the processor is further configured to:

[0017] The terminal records the identification of upgrading the portable system in the first public storage area, and stores the latest version of the portable system downloaded from the server and the new version number;

[0018] If in the recovery mode, the terminal detects the identifier from the first public storage area, then the portable system on the system partition is updated according to the latest version of the portable system stored in the first public storage area, and the new version number stored in the first public storage area replaces the version number in the verification partition.

[0019] In order to avoid being unable to determine whether there is an upgrade after restart, the terminal of this embodiment can record the identifier of the portable system in the first public storage area, store the latest version of the portable system downloaded from the server, and the new version number. In this way, after restarting, the first public storage area is accessed in the recovery mode to check whether the identifier is stored, so as to determine whether there is an upgrade event and which specific system needs to be upgraded, and then the portable system is upgraded according to the content stored in the first public storage area, thereby avoiding the situation where the local machine is confused about which system to upgrade after restarting the system.

[0020] In a possible implementation manner, the processor is further configured to:

[0021] The terminal monitors whether an external memory card is inserted;

[0022] If yes, the terminal detects whether the external storage card contains an identifier of a portable system; the identifier of the portable system contained in the external storage card is added after the partition table information stored in the verification partition of the external storage card is verified with each partition information of the external storage card after power-on;

[0023] If the terminal has one, it is determined that an external memory card including a portable system is externally connected.

[0024] The present invention also provides a terminal which, when monitoring the insertion of an external memory card, can determine that the external memory card containing a portable system is externally connected to the terminal by detecting the identification of the portable system contained in the external memory card, thereby avoiding the need to check the partition table information stored in the verification partition of the external memory card and the partition information of the external memory card each time to determine that the external memory card containing the portable system is externally connected to the terminal, thereby simplifying the operation steps.

[0025] In a possible implementation manner, the processor is further configured to:

[0026] The terminal compares the version number of the local system read from the second public storage area with the latest version number of the local system in the server, wherein the version number of the local system in the second public storage area is written into the second public storage area after determining that the terminal is externally connected to an external storage card containing a portable system;

[0027] If the terminal is currently running the portable system and determines according to the comparison result that the local system has been updated, the terminal is restarted and enters a recovery mode, in which the local system stored in the terminal memory is upgraded.

[0028] This embodiment also provides a terminal that can provide a method for upgrading the local system when an external memory card including a portable system is connected to the terminal.

[0029] In a second aspect, the present invention provides a method for upgrading a portable system using an external memory card, comprising:

[0030] A terminal connected to an external memory card including a portable system compares a version number of the portable system obtained in a verification partition of the external memory card with a latest version number of the portable system in a server, wherein the external memory card includes a system partition for storing the portable system and a verification partition for storing a version number used in a verification process when starting the portable system;

[0031] If the terminal is currently running the portable system and determines according to the comparison result that the portable system has been updated, the terminal restarts and enters a recovery mode, upgrades the portable system stored in the external memory card in the recovery mode, and replaces the version number in the verification partition with the upgraded new version number; or

[0032] If the terminal currently runs the local system and determines that the portable system has been updated according to the comparison result, the portable system stored in the external storage card is directly upgraded, and the version number in the verification partition is replaced with the upgraded new version number.

[0033] In a possible implementation, the version number of the portable system is obtained from the verification partition of the external storage card in the following manner:

[0034] If the terminal is currently running the portable system, the version number of the portable system is read from a database corresponding to the portable system; the version number of the portable system in the database corresponding to the portable system is read from a check partition of the external storage card after determining that the terminal is externally connected to an external storage card containing the portable system, and the version number of the portable system is recorded in the database corresponding to the portable system after decryption; or

[0035] If the terminal is currently running the local system, the version number of the portable system is directly read from the verification partition of the external storage card and decrypted to obtain the version number of the portable system.

[0036] In a possible implementation manner, after the terminal determines that the portable system has been updated according to the comparison result and before restarting, the method further includes:

[0037] The terminal records the identification of upgrading the portable system in the first public storage area, and stores the latest version of the portable system downloaded from the server and the new version number;

[0038] The step of upgrading the portable system stored in the external storage card in the recovery mode and replacing the version number in the verification partition with the upgraded new version number includes:

[0039] If in the recovery mode, the terminal detects the identifier from the first public storage area, then the portable system on the system partition is updated according to the latest version of the portable system stored in the first public storage area, and the new version number stored in the first public storage area replaces the version number in the verification partition.

[0040] In a possible implementation, the terminal determines that an external storage card including a portable system is connected in the following manner:

[0041] The terminal monitors whether an external memory card is inserted;

[0042] If yes, the terminal detects whether the external storage card contains an identifier of a portable system; the identifier of the portable system contained in the external storage card is added after the partition table information stored in the verification partition of the external storage card is verified with each partition information of the external storage card after power-on;

[0043] If the terminal has one, it is determined that an external memory card including a portable system is externally connected.

[0044] In a possible implementation, the method further includes:

[0045] The terminal compares the version number of the local system read from the second public storage area with the latest version number of the local system in the server, wherein the version number of the local system in the second public storage area is written into the second public storage area after determining that the terminal is externally connected to an external storage card containing a portable system;

[0046] If the terminal is currently running the portable system and determines according to the comparison result that the local system has been updated, the terminal is restarted and enters a recovery mode, in which the local system stored in the terminal memory is upgraded.

[0047] In a third aspect, the present invention provides a computer storage medium having a computer program stored thereon, which, when executed by a processing unit, implements the steps of the external memory card portable system upgrade method described in the second aspect.

[0048] In addition, the technical effects brought about by any implementation method in the second to third aspects can refer to the technical effects brought about by different implementation methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0050] Figure 1 A schematic diagram of partitioning of an external memory card provided by an embodiment of the present invention;

[0051] Figure 2A schematic diagram of a terminal into which an external memory card is inserted provided by an embodiment of the present invention;

[0052] Figure 3 A structural block diagram of a terminal provided by an embodiment of the present invention;

[0053] Figure 4 A schematic diagram of a software structure of a terminal provided by an embodiment of the present invention;

[0054] Figure 5 A flowchart of a method for starting a terminal provided by an embodiment of the present invention;

[0055] Figure 6 An interface diagram for a user to select whether to start a portable system is provided in an embodiment of the present invention;

[0056] Figure 7 A flow chart of a method for generating an identification of an external memory card containing a portable system provided by an embodiment of the present invention;

[0057] Figure 8 A flowchart for recording the version number of a local system provided by an embodiment of the present invention;

[0058] Fig. 9 A flowchart of a first external memory card portable system upgrade method provided by an embodiment of the present invention;

[0059] Fig.10 A flowchart of a second external memory card portable system upgrade method provided by an embodiment of the present invention;

[0060] Fig.11 A flowchart of a third external memory card portable system upgrade method provided by an embodiment of the present invention;

[0061] Fig.12 A flowchart of a fourth external memory card portable system upgrade method provided by an embodiment of the present invention;

[0062] Fig.13 A flowchart of a method for upgrading a currently running portable system provided by an embodiment of the present invention;

[0063] Fig.14 An interface diagram for a user to select whether to upgrade the local system provided in an embodiment of the present invention;

[0064] Fig.15 An interface diagram for a user to select whether to upgrade a local system and a portable system provided in an embodiment of the present invention;

[0065] Fig.16 The present invention provides a flowchart of a method for upgrading a local system when the local system is currently running. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0067] The following are explanations of some of the terms that appear in the text:

[0068] 1. In the embodiments of the present invention, the term "or" describes the association relationship of associated objects, indicating that two relationships may exist. For example, A or B may represent two situations: A exists alone, and B exists alone.

[0069] 2. In the embodiments of the present invention, the term "terminal" or "terminal device" refers to a device at the outermost periphery of a computer network that can access a wireless local area network WLAN to input user information and output processing results, including desktop computers, mobile phones, notebooks, tablet computers, POS machines, and vehicle-mounted computers.

[0070] The application scenarios described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0071] In an embodiment of the present invention, a terminal is provided that can be inserted with an external memory card storing a portable system, and the terminal can identify the external memory card containing the portable system and run the portable system on the external memory card. The external memory card in the embodiment of the present invention can be, but not limited to, an SD card (Secure Digital Memory Card / SD card), a T card, etc. The portable system in the embodiment of the present invention is an operating system, which can be, but not limited to, an Android system. The T card, i.e., a TF card, is a flash memory card.

[0072] A T card is inserted into the terminal, and the T card contains a portable system. After the T card is inserted into the terminal, the terminal can run the portable system on the T card or the local system.

[0073] Combination Figure 1 As shown, the portable system in the embodiment of the present invention is a universal system, wherein the external memory card includes the following four partitions:

[0074] 1) System partition, storing system files, which can be understood as storing files such as portable systems and system applications; the optional system partition in the present invention does not contain data strongly related to drivers or hardware, so the portable system of the external memory card in the present invention is universal.

[0075] 2) Data partition, which stores user data, such as contacts, text messages, settings, and user-installed programs;

[0076] 3) The first verification partition stores partition table information; the first verification partition has no file system and cannot be mounted, but can be directly read by the terminal;

[0077] Optionally, the first verification partition also includes a version number of the portable system.

[0078] 4) The second verification partition stores system verification files; the second verification partition has a file system that needs to be mounted before the terminal can read it.

[0079] The external storage card in the embodiment of the present invention can burn the data or files of the above four partitions into the external storage card through a burning tool. Since the system partition in the present invention burns the system file, the system file only contains files of the portable system and system applications, and does not contain content related to the driver or hardware (which can be understood as not containing the manufacturer's private files).

[0080] At the same time, because the local system will verify the data in the system partition by using the vbmeta verification data in a protection partition, the normal system startup process will be carried out only when the verification values ​​are consistent. Therefore, this causes the local system of a terminal to only recognize one system. If you want to recognize multiple systems, you need to build in multiple vbmeta verification data and prepare multiple system partitions to achieve switching between the two systems.

[0081] In order to solve the above problem, during the process of starting the portable system, in order not to destroy the verification of the system partition of the terminal local system, during the kernel startup phase of the startup process, the local system normally performs the verification of the local system partition. After the local system partition verification is successful, the portable system is started.

[0082] Based on the above problems, the portable system provided by the present invention is universal, and there is no strong correlation between the portable system and the device, and it does not have high coupling.

[0083] Combination Figure 2As shown, when the terminal is inserted with an external memory card containing a portable system, i.e., a T card, the terminal can run the portable system. When the portable system is running, the application in the data partition is started, and its application icon is displayed on the user interface of the terminal. The applications in the portable system include, for example, calendar, music, stock market, mailbox, phone, camera, gallery, SMS, etc.

[0084] Likewise, when the terminal is currently running the local system, the application in the local memory can be run, and its application icon is displayed on the user interface of the terminal.

[0085] Since the operation of the terminal requires the operation of the operating system and the driving system, when the terminal is currently running a portable system, the driving system of the local machine and the portable system of the external storage card are used, and when the terminal is currently running a local system, the driving system of the local machine and the operating system of the local machine are used. Since the system to be upgraded is upgraded in an inactive state, when the terminal can run two systems, an embodiment of the present invention provides a terminal having an interface for an external storage card containing a portable system, a communication unit for communicating with a server to obtain the latest version number of the portable system in the server, and a processor for performing logic processing, so that the portable system can be upgraded when the currently running system is different.

[0086] Among them, the upgrade process is mainly implemented in the processor.

[0087] The following is a detailed introduction to the processor:

[0088] The processor is used to determine whether the terminal is externally connected to an external memory card including a portable system.

[0089] Specifically, the processor is used to verify the partition table information stored in the verification partition of the external storage card and the partition information of the external storage card after power-on, and after the verification passes, add an identification that the external storage card contains a portable system.

[0090] The processor is used to monitor whether an external memory card is inserted, and if so, to detect whether the external memory card contains the identification of the portable system, and if so, to determine whether the external memory card containing the portable system is externally connected. That is, it can detect whether there is a new version of the portable system, so that the relevant processing of the upgrade event can be further performed according to the information.

[0091] It should be noted that the upgrade event refers to querying the system version number at a preset time, accessing the server to see if there is the latest version, and upgrading if there is, and ending the entire process if not.

[0092] In the event of an upgrade, the processor is used to obtain the version number of the portable system.

[0093] Specifically, due to the different operating systems, the areas that the system can access are also different. At the same time, the version number stored in the first verification partition is encrypted. Therefore, in order to enable the terminal to quickly and conveniently obtain the version number of the portable system when using different systems, the processor provided in the embodiment of the present invention is also used to, after determining that the terminal is connected to an external storage card containing a portable system, read the version number of the portable system from the first verification partition of the external storage card and decrypt it and record it in the database corresponding to the portable system. The corresponding database is, for example, the settings database sdrom_version corresponding to the portable system. If the portable system is currently running, when it is necessary to query whether to upgrade, the processor is used to directly read the version number of the portable system from the database corresponding to the portable system. In this way, there is no need for decryption, which simplifies the processing and improves the processing speed.

[0094] When the local system is currently running, the processor cannot access the database corresponding to the portable system when the local system is running. In order to enable the processor to obtain the version number of the portable system, the processor is used to directly read the version number of the portable system from the verification partition of the external storage card and decrypt it to obtain the version number of the portable system.

[0095] The processor is used for comparing the version number of the portable system obtained from the verification partition of the external storage card with the latest version number of the portable system in the server.

[0096] If it is determined that the portable system is currently running, and it is determined based on the comparison result that the portable system has been updated, since the running system cannot be upgraded, the processor of the terminal is used to restart the terminal and enter the recovery mode. In the recovery mode, the portable system stored in the external storage card is upgraded, and the version number in the first verification partition is replaced with the upgraded new version number.

[0097] If it is determined that the local system is currently running, and it is determined based on the comparison result that the portable system has been updated, since the running system is not a portable system, and the upgrade of the portable system is only an operating system upgrade, it does not affect the local drive system, that is, it does not affect the normal operation of the local machine. Therefore, the terminal's processing is used to directly upgrade the portable system stored in the external storage card, and replace the version number in the first verification partition with the upgraded new version number.

[0098] However, in the event of upgrading the portable system while the local system is currently running, due to the limited processing power of the processor, in order to avoid upgrade interruption and resulting upgrade failure, the terminal of the embodiment of the present invention can limit the user's use of the local system to a certain extent.

[0099] For example, close the application running in the background; and / or pop up a prompt page to remind the user that the portable system is being upgraded and please use it later.

[0100] During the upgrade process, since the upgrade requires a restart, in order to avoid not knowing which system needs to be upgraded after the restart, the processor of the terminal is used to record the identification of the upgraded portable system in the first public storage area before restarting after determining that there is a portable system update, and store the latest version of the portable system downloaded from the server, as well as the new version number. The public storage area is an area that can be accessed by the portable system currently running on the terminal or the local system. The area can be in the local memory or on an external storage card. The first public storage area can be a cache partition in the terminal's memory, marked as: OTA_TYPE=1 means only the portable system is upgraded.

[0101] The processor of the terminal is used to enter recovery mode after restarting, detect an identifier from the first public storage area, update the portable system on the system partition according to the latest version of the portable system stored in the first public storage area, and replace the version number in the verification partition with the new version number stored in the first public storage area.

[0102] In addition to upgrading the portable system, the terminal of the embodiment of the present invention can also upgrade the local system. Specifically:

[0103] In order to be able to query the version number of the local system when the portable system is currently running, the processor is used to write the version number of the local system into the second public storage area after determining that the external storage card containing the portable system is connected.

[0104] When querying whether to upgrade, the processor is used to compare the version number of the local system read from the second public storage area with the latest version number of the local system in the server. If the portable system is currently running and it is determined according to the comparison result that the local system has been updated, the processor restarts and enters the recovery mode, and upgrades the local system stored in the terminal memory in the recovery mode; or, if the local system is currently running and it is determined according to the comparison result that the local system has been updated, the processor restarts and enters the recovery mode, and upgrades the local system stored in the terminal memory in the recovery mode.

[0105] Similarly, in order to avoid the terminal not knowing which system to upgrade after restart, the processor is also used to record the identification of upgrading the local system in the first public storage area, store the latest version of the local system downloaded from the server, and the new version number. The identification of upgrading the local system can be: OTA_TYPE=0 means only upgrading the local system.

[0106] Then, the processor is also used to restart and enter the recovery mode. In the recovery mode, the identifier of upgrading the local system is queried, the local system stored in the terminal memory is updated according to the latest version of the local system downloaded from the server, and the new version number of the upgraded local system is recorded in the stable partition.

[0107] When the processor determines that both the portable system and the local system need to be upgraded, the identifiers of upgrading the local system and the portable system are recorded in the first public storage area, and the latest version of the local system downloaded from the server, the latest version of the portable system downloaded from the server, the new version number of the local system, and the new version number of the portable system are stored. The identifiers of upgrading the local system and the portable system can be: OTA_TYPE=2 indicates upgrading the local system and upgrading the portable system.

[0108] If the local system is currently running, the processor can be used to directly upgrade the portable system stored in the external storage card, and replace the version number in the verification partition with the upgraded new version number, that is, directly upgrade the portable system, and then restart to enter the recovery mode, and upgrade the local system stored in the terminal memory in the recovery mode.

[0109] If the local system is currently running, in addition to the above execution methods, the processor is also used to restart and enter the recovery mode, and upgrade the portable system and the local system respectively in the recovery mode.

[0110] If the portable system is currently running, it needs to be in an unstarted state if it is not restarted due to the portable system upgrade. At the same time, since the local system upgrade requires the terminal's memory to be modified, it makes the terminal unable to be used normally.

[0111] In summary, when the portable system is currently running, if both systems need to be upgraded, the processor is used to restart and enter the recovery mode, and upgrade the portable system and the local system respectively in the recovery mode.

[0112] In view of the above description, an embodiment of the present invention further provides a structure of a terminal.

[0113] The embodiment is described in detail below by taking terminal 300 as an example. It should be understood that: Figure 3 The terminal 300 shown is only an example, and the terminal 300 may have more Figure 3The more or less components shown in the figure can be combined with two or more components, or can have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.

[0114] Figure 3 FIG. 2 exemplarily shows a hardware configuration block diagram of the terminal 300 according to an exemplary embodiment. Figure 3 As shown, the terminal 300 includes: a radio frequency (RF) circuit 310, a memory 320, a display unit 330, a camera 340, a sensor 350, an audio circuit 360, a wireless fidelity (Wi-Fi) module 370, a processor 380, a Bluetooth module 381, and a power supply 390 and other components.

[0115] The RF circuit 310 can be used to receive and send signals during the process of sending and receiving information or making calls. It can receive downlink data from the base station and hand it over to the processor 380 for processing; it can send uplink data to the base station. Generally, the RF circuit includes but is not limited to antennas, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer and other devices.

[0116] The memory 320 can be used to store software programs and data. The processor 380 executes various functions and data processing of the terminal 300 by running the software programs or data stored in the memory 320. The memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. The memory 320 stores an operating system that enables the terminal 300 to run. In the present application, the memory 320 can store an operating system and various application programs, and can also store code for executing the method described in the embodiment of the present application.

[0117] The display unit 330 may be used to receive input digital or character information and generate signal input related to user settings and function control of the terminal 300. Specifically, the display unit 330 may include a touch screen 331 disposed on the front of the terminal 300, which may collect user touch operations on or near it, such as clicking a button, dragging a scroll box, etc.

[0118] The display unit 330 can also be used to display information input by the user or information provided to the user and a graphical user interface (GUI) of various menus of the terminal 300. Specifically, the display unit 330 may include a display screen 332 disposed on the front of the terminal 300. The display screen 332 may be configured in the form of a liquid crystal display, a light emitting diode, etc. The display unit 330 may be used to display various graphical user interfaces described in this application.

[0119] The touch screen 331 may be covered on the display screen 332, or the touch screen 331 and the display screen 332 may be integrated to realize the input and output functions of the terminal 300, and the integrated touch screen may be referred to as a touch display screen. In the present application, the display unit 330 may display the application and the corresponding operation steps.

[0120] The camera 340 can be used to capture still images or videos. The object is projected onto the photosensitive element through the lens to generate an optical image. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then passed to the processor 380 for conversion into a digital image signal.

[0121] The terminal 300 may further include at least one sensor 350, such as an acceleration sensor 351, a distance sensor 352, a fingerprint sensor 353, and a temperature sensor 354. The terminal 300 may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor.

[0122] The audio circuit 360, the speaker 361, and the microphone 362 can provide an audio interface between the user and the terminal 300. The audio circuit 360 can transmit the electrical signal converted from the received audio data to the speaker 361, which is converted into a sound signal for output. The terminal 300 can also be configured with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 362 converts the collected sound signal into an electrical signal, which is received by the audio circuit 360 and converted into audio data, and then the audio data is output to the RF circuit 310 to be sent to, for example, another terminal, or the audio data is output to the memory 320 for further processing. In this application, the microphone 362 can obtain the user's voice.

[0123] Wi-Fi is a short-range wireless transmission technology. The terminal 300 can help users send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 370, which provides users with wireless broadband Internet access.

[0124] The processor 380 is the control center of the terminal 300. It uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions of the terminal 300 and processes data by running or executing software programs stored in the memory 320 and calling data stored in the memory 320. In some embodiments, the processor 380 may include one or more processing units; the processor 380 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the baseband processor mainly processes wireless communications. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 380. In this application, the processor 380 can run the operating system, application programs, user interface display and touch response, as well as the processing method described in the embodiment of the present application. In addition, the processor 380 is coupled to the display unit 330.

[0125] The Bluetooth module 381 is used to exchange information with other Bluetooth devices having Bluetooth modules through the Bluetooth protocol. For example, the terminal 300 can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 381 to exchange data.

[0126] The terminal 300 also includes a power supply 390 (such as a battery) for supplying power to various components. The power supply can be logically connected to the processor 380 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption. The terminal 300 can also be configured with a power button for turning on and off the terminal, as well as locking the screen and other functions.

[0127] Figure 4 It is a software structure block diagram of the terminal 300 according to an embodiment of the present invention.

[0128] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0129] The application layer can include a series of application packages.

[0130] like Figure 4 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0131] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0132] like Figure 4 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0133] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0134] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0135] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0136] The phone manager is used to provide communication functions of the terminal 300, such as management of call status (including connection, disconnection, etc.).

[0137] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0138] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt tone is emitted, the communication terminal vibrates, and the indicator light flashes.

[0139] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0140] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0141] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0142] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0143] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0144] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0145] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0146] A 2D graphics engine is a drawing engine for 2D drawings.

[0147] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0148] The following is an example of the workflow of the software and hardware of the terminal 300 in conjunction with the capture and photo shooting scene.

[0149] When the touch screen 131 receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, timestamp of the touch operation, and other information). The original input event is stored in the kernel layer. The application framework layer obtains the original input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is a control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture a static image or video through the camera 340.

[0150] The terminal 300 in the embodiment of the present application may be a mobile phone, a tablet computer, a wearable device, a laptop computer, a television, etc.

[0151] Through the terminal introduced above, a terminal startup method provided by an embodiment of the present invention is described below in conjunction with the accompanying drawings:

[0152] Combination Figure 5 As shown, the method includes:

[0153] S500: The terminal is powered on;

[0154] S501: Monitor whether an external memory card is inserted; if yes, execute S502; otherwise, execute S519;

[0155] S502: Read each partition of the external storage card;

[0156] S503: performing a first verification on each partition information of the external storage card according to the partition table information contained in the first verification partition in the detected external storage card;

[0157] S504: Determine whether the first check is passed, if passed, execute S505; otherwise, execute S519;

[0158] S505: pop up an interface for starting the portable system;

[0159] Combination Figure 6 As shown, it displays "Do you want to start the portable system?" and the user can select "Yes" to start the portable system. Figure 5 If you select “No”, the local system will be started, that is, the normal startup process will be carried out.

[0160] S506: Receiving an instruction to start the portable system, restarting the system;

[0161] S507: During the kernel startup phase of the local system restart, reading each partition of the external storage card, the external storage card including a system partition, a data partition, a first verification partition, and a second verification partition;

[0162] S508: performing a first verification on each partition information of the external storage card according to the partition table information stored in the first verification partition;

[0163] S509: Determine whether the first verification is passed, if passed, execute step 510, otherwise execute S519;

[0164] S510: during the mounting process phase of the local system startup, create a temporary directory, and mount the second verification partition to the temporary directory;

[0165] S511: reading a system verification file stored in the second verification partition, and the terminal determining a verification value of data in the system partition according to a preset verification algorithm;

[0166] S512, comparing the verification code stored in the system verification file with the verification value to see if they are consistent, if they are consistent, executing S513, otherwise executing S519;

[0167] S513, in the mounting process stage of the local system, replacing the system partition mounted in the local directory with the system partition of the external storage card, and running the portable system in the system partition;

[0168] S514, after running the portable system, the terminal interrupts the process of mounting the data partition of the local system, and uses the device identifier of the external storage card to mount the data partition;

[0169] S515, decrypting the data partition in a preset manner;

[0170] The preset method is the same as the encryption and decryption operation of the data partition in the prior art;

[0171] S516: after the decryption is successful, verify the version number of the portable system in the system partition according to the original system version number in the first verification partition;

[0172] S517, determine whether the verification is passed, if the verification is passed, execute S518, otherwise execute S519;

[0173] Optionally, if the terminal fails to obtain the original system version number and / or the portable system version number within a preset time, it is determined that the verification fails; or,

[0174] The terminal encrypts the version number of the currently running portable system according to the encryption algorithm of the currently running portable system to obtain the encrypted system version number. If the original system version number is the same as the encrypted system version number, it is determined that the verification is passed, that is, the original system version number is compared with the encrypted system version number to see whether they are consistent.

[0175] S518: Continue to start the portable system.

[0176] S519: Interrupt the startup of the portable system and restart the system to return to the local system.

[0177] After the above S509, if it is determined that the first verification is passed, an identification indicating that the external storage card includes the portable system is generated and stored in the public storage area.

[0178] Combination Figure 7 As shown, an embodiment of the present invention provides a method for adding an identifier of a portable system to an external storage card, comprising:

[0179] S700: Monitor whether an external memory card is inserted; if so, execute S701; otherwise, end.

[0180] S701: Read each partition of the external storage card;

[0181] S702: performing a first verification on each partition information of the external storage card according to the partition table information contained in the first verification partition in the detected external storage card;

[0182] S703: If it is determined that the first verification is passed, an identifier is added when reporting the information to the driver of the external storage card.

[0183] The flag may be flag=sdrom.

[0184] Since the currently running system cannot access the system files of another system, that is, when the portable system is currently running, the storage space corresponding to the local system cannot be accessed; when the local system is currently running, the storage space corresponding to the portable system cannot be accessed, such as the settings database. In order to complete different running systems and realize the situation of upgrading two systems more conveniently, the present invention can read the version number of the portable system in the first verification partition during the first running of the portable system, decrypt it, and record the version number, such as H1754.00.01.SD, into the settings database sdrom_version.

[0185] During the first operation of the local system, the version number of the local system is queried and written into the second public storage area of ​​the local system, for example, the stable partition of the local storage.

[0186] Combination Figure 8 As shown, specifically including:

[0187] S800: Monitor whether an external memory card is inserted; if yes, execute S801, otherwise end.

[0188] S801: Detect whether the external memory card contains an identifier of a portable system; if so, execute S802, otherwise end;

[0189] S802: Query the version number of the local system from the memory of the terminal and write it into the stable partition.

[0190] Through the terminal introduced above, the following describes various external memory card portable system upgrade methods provided by embodiments of the present invention in conjunction with the accompanying drawings:

[0191] Combination Fig. 9 As shown, the first method includes:

[0192] S900: Compare the version number of the portable system obtained from the verification partition of the external storage card with the latest version number of the portable system in the server;

[0193] S900: If the portable system is currently running and it is determined based on the comparison result that the portable system has been updated, restart and enter recovery mode. In recovery mode, the portable system storing the external storage card is upgraded and the version number in the verification partition is replaced with the upgraded new version number.

[0194] The above method introduces a way to upgrade the portable system when the portable system is currently running. Specifically, since the running system itself cannot be upgraded, it is necessary to restart and enter the recovery mode. In the recovery mode, the portable system storing the external storage card is upgraded, and the version number in the first verification partition is replaced with the upgraded new version number.

[0195] When the portable system storing the external memory card is upgraded, the portable system in the system partition of the external memory card is updated according to the latest portable system downloaded from the server, and the version number of the latest portable system downloaded from the server replaces the version number in the first verification partition.

[0196] Combination Fig.10 As shown, the second method includes:

[0197] S1000: Compare the version number of the portable system obtained from the verification partition of the external storage card with the latest version number of the portable system in the server;

[0198] S1001: If the local system is currently running, and it is determined according to the comparison result that the portable system has been updated, the portable system stored in the external storage card is directly upgraded, and the version number in the verification partition is replaced with the upgraded new version number.

[0199] The above method introduces a method for upgrading a portable system when the local system is currently running. Since the portable system is recorded on an external storage card, the terminal can run normally during the upgrade, so there is no need to restart and enter the recovery mode for upgrading, but directly perform the upgrade process.

[0200] Combination Fig.11 As shown, the third method includes:

[0201] S1100: Compare the version number of the local system read from the second public storage area with the latest version number of the local system in the server;

[0202] S1101: If the portable system is currently running, and it is determined according to the comparison result that the local system has been updated, restart and enter recovery mode, and upgrade the local system stored in the terminal memory in recovery mode.

[0203] The above method introduces how to upgrade the local system when a portable system is running. The local driver needs to be used when the portable system is running. Therefore, when the local system is upgraded, the driver should not be in a working state. Therefore, when the local system is upgraded, you can only restart and enter the recovery mode, and upgrade the local system in the recovery mode.

[0204] Combination Fig.12 As shown, the fourth method includes:

[0205] S1200: Compare the version number of the local system read from the second public storage area with the latest version number of the local system in the server;

[0206] S1201: If the local system is currently running and it is determined according to the comparison result that the local system has been updated, restart and enter recovery mode, and upgrade the local system stored in the terminal memory in the recovery mode.

[0207] Regarding the four methods introduced above, in actual application, the above methods are implemented through OTA application, in a portable system through a first OTA application, and in a local system through a second OTA application.

[0208] Through the above method, in the actual application process, if the user chooses to start the portable system, he can follow Figure 5 The portable system is started in a manner, and after the startup is completed, its applications are displayed. The first OTA application periodically queries the version number at a preset time, and determines whether to upgrade according to the version number.

[0209] Specifically, combined Fig.13 As shown, when starting the portable system, the upgrade process includes:

[0210] S1300: query the version number of the portable system in sdrom-version in the settings database, and query the version number of the local system in the stable partition;

[0211] S1301: According to the version number of the portable system, query the server whether the portable system is a new version, and according to the version number of the local system, query the server whether the local system is a new version; if only the local system has a new version, execute S1302-1304; if only the portable system has a new version, execute S1305-S1307, if both the portable system and the local system have new versions, execute S1308-S1310, if neither is upgraded, end. Among them, the schemes parallel to S1302-S1304 are as follows S1305-S1307, and S1308-S1310.

[0212] S1302: Download the corresponding upgrade package, and pop up a page to ask whether to upgrade the local system;

[0213] S1303: After determining that the user instructs to upgrade, write an identification in the cache partition to indicate that the local system needs to be upgraded;

[0214] Combination Fig.14 As shown, whether to upgrade the local system is displayed on the user interface. If the user clicks "yes", S1303 is executed. If the user clicks "no", the upgrade process is not performed, that is, S1303 and the steps after S1303 are not executed.

[0215] S1304: After writing the identifier, a restart operation is performed to enter the recovery mode, the identifier is read from the cache partition, and the local system is upgraded;

[0216] S1305: If it is determined that only the portable system has a new version, the corresponding upgrade package is downloaded, and a page is popped up to ask whether to upgrade the local system;

[0217] S1306: After determining that the user instructs to upgrade, write an identifier in the cache partition to indicate that the portable system needs to be upgraded;

[0218] S1307: After writing the identifier, a restart operation is performed to enter the recovery mode, the identifier is read from the cache partition, and the portable system is upgraded.

[0219] S1308: Download the corresponding upgrade package, and pop up a page for whether to upgrade the local system and the portable system;

[0220] S1309: After the user clicks to confirm the upgrade, a flag is written in the cache partition to indicate that the portable system and the local system need to be upgraded;

[0221] S1310: After writing the identifier, a restart operation is performed to enter the recovery mode, the identifier is read from the cache partition, and the local system and the portable system are upgraded.

[0222] Among them, a page pops up asking whether to upgrade the local system and portable system. Fig.15 As shown, only the local system and the portable system can be upgraded. The two systems are prompted separately, and the user can determine which system to upgrade. If the user only upgrades the local system, refer to S1302 to S1304 for execution. If the user only upgrades the portable system, refer to S1305 to S1307 for execution, or determine that both systems are upgraded. S1308 to S1310 are the process of determining the upgrade of both systems. If it is detected that there is no new version of both systems, then no upgrade process is performed, that is, the process ends.

[0223] In the actual application process, if the user chooses to start the local system, the local system will continue to start normally. After the startup is completed, its application will be displayed. The second OTA application will regularly query the version number according to the preset time, and determine whether to upgrade based on the version number.

[0224] Among them, when the user chooses to start the local system, the upgrade event operation process can be:

[0225] Specifically, combined Fig.16 As shown, the upgrade process includes:

[0226] S1600: Detect whether the flag parameter is sdrom, that is, detect whether the terminal is connected to an external storage card including a portable system;

[0227] S1601: If yes, read the version number of the portable system in the first verification partition in the external storage card and decrypt it, and query the version number of the local system in the stable partition;

[0228] S1602: querying the server whether the portable system is a new version according to the version number of the portable system, and querying the server whether the local system is a new version according to the version number of the local system;

[0229] S1603: Determining that the local system has only a new version, downloading the corresponding upgrade package, and popping up a page for whether to upgrade the local system;

[0230] S1604: After confirming that the user instructs to upgrade, write a flag in the cache partition to indicate that the local system needs to be upgraded;

[0231] S1605: After writing the identifier, a restart operation is performed to enter the recovery mode, the identifier is read from the cache partition, and the local system is upgraded;

[0232] The schemes parallel to S1603 to S1605 are as follows S1606 to S1608, and S1609 to S1611.

[0233] S1606: If it is determined that only the portable system has a new version, the corresponding upgrade package is downloaded, and a page is popped up to ask whether to upgrade the local system;

[0234] S1607: After determining that the user instructs to upgrade, write an identifier in the cache partition to indicate that the portable system needs to be upgraded;

[0235] S1608: The identifier is read from the cache partition, and the portable system is upgraded.

[0236] S1609: If both systems need to be upgraded, the corresponding upgrade packages are downloaded, and a page is popped up to ask whether to upgrade the local system and the portable system;

[0237] S1610: After the user clicks to confirm the upgrade, a flag is written in the cache partition to indicate that the portable system and the local system need to be upgraded;

[0238] S1611: After writing the identifier, a restart operation is performed to enter the recovery mode, the identifier is read from the cache partition, and the local system and the portable system are upgraded.

[0239] Similarly, a page pops up asking whether to upgrade the local system and portable system. Fig.15 As shown, you can upgrade only one of the systems or both systems.

[0240] Among them, in the above process, after S1602, if it is detected that both systems have no new versions, then no upgrade process is performed, and the process ends.

[0241] An embodiment of the present invention further provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes any one of the external memory card portable system upgrade methods of the embodiments of the present invention.

[0242] Those skilled in the art will readily appreciate other embodiments of the invention after considering the specification and practicing the invention invented herein. The invention is intended to cover any variations, uses or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not invented by the present invention. The description and examples are to be regarded as exemplary only, and the true scope and spirit of the invention are indicated by the following claims.

[0243] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A terminal, characterized in that: include: Interface, processor and communication unit; The interface is used for connecting an external memory card including a portable system; The communication unit is used to communicate with the server to obtain the latest version number of the portable system in the server; The processor is used to compare the version number of the portable system obtained in the verification partition of the external storage card with the latest version number of the portable system in the server, wherein the external storage card includes a system partition for storing the portable system and a verification partition for storing a version number used in a verification process when starting the portable system; If the portable system is currently running and it is determined according to the comparison result that the portable system has been updated, restarting and entering recovery mode, upgrading the portable system stored in the external memory card in the recovery mode, and replacing the version number in the verification partition with the upgraded new version number; or If the local system is currently running and it is determined according to the comparison result that the portable system has been updated, the portable system stored in the external storage card is directly upgraded, and the version number in the verification partition is replaced with the upgraded new version number; The processor is specifically used for: If the terminal is currently running the portable system, the version number of the portable system is read from a database corresponding to the portable system; the version number of the portable system in the database corresponding to the portable system is read from a check partition of the external storage card after determining that the terminal is externally connected to an external storage card containing the portable system, and the version number of the portable system is recorded in the database corresponding to the portable system after decryption; or If the terminal is currently running the local system, the version number of the portable system is directly read from the verification partition of the external storage card and decrypted to obtain the version number of the portable system.

2. The terminal according to claim 1, characterized in that The processor is further configured to: The terminal records the identification of upgrading the portable system in the first public storage area, and stores the latest version of the portable system downloaded from the server and the new version number; If in the recovery mode, the terminal detects the identifier from the first public storage area, then the portable system on the system partition is updated according to the latest version of the portable system stored in the first public storage area, and the version number in the verification partition is replaced by the new version number stored in the first public storage area; wherein the first public storage area is a partition in the memory of the terminal.

3. The terminal according to claim 1, characterized in that: The processor is further configured to: The terminal monitors whether an external memory card is inserted; If yes, the terminal detects whether the external storage card contains an identifier of a portable system; the identifier of the portable system contained in the external storage card is added after the partition table information stored in the verification partition of the external storage card is verified with each partition information of the external storage card after power-on; If the terminal has one, it is determined that an external memory card including a portable system is externally connected.

4. The terminal according to any one of claims 1 to 3, characterized in that: The processor is further configured to: The terminal compares the version number of the local system read from the second public storage area with the latest version number of the local system in the server, wherein the version number of the local system in the second public storage area is written into the second public storage area after determining that the external storage card containing the portable system is externally connected to the terminal; wherein the second public storage area is a partition in the memory of the terminal; the first public storage area and the second public storage area are not the same partition; If the terminal is currently running the portable system and determines according to the comparison result that the local system has been updated, the terminal is restarted and enters a recovery mode, in which the local system stored in the terminal memory is upgraded.

5. A method for upgrading a portable system using an external memory card, characterized in that: include: A terminal connected to an external memory card including a portable system compares a version number of the portable system obtained in a verification partition of the external memory card with a latest version number of the portable system in a server, wherein the external memory card includes a system partition for storing the portable system and a verification partition for storing a version number used in a verification process when starting the portable system; If the terminal is currently running the portable system and determines according to the comparison result that the portable system has been updated, the terminal restarts and enters a recovery mode, upgrades the portable system stored in the external memory card in the recovery mode, and replaces the version number in the verification partition with the upgraded new version number; or If the terminal currently runs a local system and determines that the portable system has been updated according to the comparison result, the portable system stored in the external storage card is directly upgraded, and the version number in the verification partition is replaced with the upgraded new version number; The version number of the portable system is obtained from the verification partition of the external storage card in the following manner: If the terminal is currently running the portable system, the version number of the portable system is read from a database corresponding to the portable system; the version number of the portable system in the database corresponding to the portable system is read from a check partition of the external storage card after determining that the terminal is externally connected to an external storage card containing the portable system, and the version number of the portable system is recorded in the database corresponding to the portable system after decryption; or If the terminal is currently running the local system, the version number of the portable system is directly read from the verification partition of the external storage card and decrypted to obtain the version number of the portable system.

6. The method for upgrading a portable system using an external memory card according to claim 5, characterized in that: After the terminal determines that the portable system has been updated according to the comparison result and before restarting, the method further includes: The terminal records the identification of upgrading the portable system in the first public storage area, and stores the latest version of the portable system downloaded from the server and the new version number; The step of upgrading the portable system stored in the external storage card in the recovery mode and replacing the version number in the verification partition with the upgraded new version number includes: If in the recovery mode, the terminal detects the identifier from the first public storage area, then the portable system on the system partition is updated according to the latest version of the portable system stored in the first public storage area, and the version number in the verification partition is replaced by the new version number stored in the first public storage area; wherein the first public storage area is a partition in the memory of the terminal.

7. The method for upgrading a portable system using an external memory card according to claim 5, characterized in that: The terminal determines the external storage card containing the portable system in the following ways: The terminal monitors whether an external memory card is inserted; If yes, the terminal detects whether the external storage card contains an identifier of a portable system; the identifier of the portable system contained in the external storage card is added after the partition table information stored in the verification partition of the external storage card is verified with each partition information of the external storage card after power-on; If the terminal has one, it is determined that an external memory card including a portable system is externally connected.

8. The method for upgrading a portable system using an external memory card according to any one of claims 5 to 7, characterized in that: The method further comprises: The terminal compares the version number of the local system read from the second public storage area with the latest version number of the local system in the server, wherein the version number of the local system in the second public storage area is written into the second public storage area after determining that the external storage card containing the portable system is externally connected to the terminal; wherein the second public storage area is a partition in the memory of the terminal; the first public storage area and the second public storage area are not the same partition; If the terminal is currently running the portable system and determines according to the comparison result that the local system has been updated, the terminal is restarted and enters a recovery mode, in which the local system stored in the terminal memory is upgraded.

Citation Information

Patent Citations

  • Mobile terminal and system upgrade method thereof

    CN105722119A