Content of the invention
Embodiments of the invention provide a kind of method for upgrading software and device, are capable of terminal unitThe dynamic update of partition table, thus ensure that the system of terminal unit can successfully be upgraded.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that:
In a first aspect, providing a kind of method for upgrading software, including:
Obtain OTA AKU from server, described OTA AKU is included for by terminal unitThe local software of middle storage upgrades to the AKU of latest edition, is used for software of upgrading from current versionTarget partition table and for the partition table liter of the currently used partition table of described terminal unit of upgradingLevel program;
Parse from described OTA AKU described system upgrade bag, described target partition table withAnd described partition table ROMPaq, run described partition table ROMPaq, described terminal unit is worked asThe partition table of front use upgrades to described target partition table;
Subregion is again carried out to the memorizer of described terminal unit according to described target partition table, and rootAccording to described system upgrade bag, the system file in each subregion after subregion is upgraded.
Second aspect, provides a kind of aerial downloaded software update device, including:
Acquisition module, for obtaining OTA AKU from server, described OTA AKU includesFor the local software storing in terminal unit being upgraded to the system of latest edition from current versionAKU, the target partition table and being used for for software of upgrading described terminal unit of upgrading currently makesPartition table ROMPaq with partition table;
Parsing module, parses in the described OTA AKU that obtains from described acquisition moduleDescribed system upgrade bag, described target partition table and described partition table ROMPaq;
First upgraded module, for running the described partition table upgrading journey that described parsing module parsesSequence, partition table currently used for described terminal unit is upgraded to described target partition table;
Second upgraded module, for again depositing to described terminal unit according to described target partition tableReservoir carries out subregion, and the described system upgrade bag being obtained according to described parsing module is by after subregionSystem file upgrading in each subregion.
Method for upgrading software and device that embodiments of the invention provide, this software updating apparatus is from clothesBusiness device obtains OTA AKU, and this OTA AKU is included for by the basis storing in terminal unitGround software upgrades to the system upgrade bag of latest edition, the target for software of upgrading from current versionPartition table and the partition table ROMPaq for the currently used partition table of upgrading terminals equipment, connect, this device parses this system upgrade bag, target partition table from OTA AKU and dividesArea's table ROMPaq, runs this partition table ROMPaq, by partition table currently used for terminal unitUpgrade to target partition table, finally, according to this target partition table again memorizer to terminal unitCarry out subregion, and according to this system upgrade bag, the system file in each subregion after subregion is upgraded.So corresponding with terminal unit local software current version in the corresponding partition table of OTA AKUWhen partition table is different, terminal unit passes through the partition table ROMPaq carrying in OTA AKU,Partition table currently used for terminal unit is upgraded to target partition table so that target partition table makesCan, so that partition table and AKU are mutually matched used in terminal unit, thus ensure thatTerminal unit is capable of the upgrading of terminal unit system.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, to the technical scheme in the embodiment of the present inventionIt is clearly and completely described it is clear that described embodiment is only present invention part realityApply example, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skillThe every other embodiment that personnel are obtained under the premise of not making creative work, broadly falls into thisThe scope of invention protection.
Embodiments of the invention provide a kind of aerial downloaded software upgrade method, as shown in figure 1, shouldMethod specifically includes following steps:
101st, software updating apparatus obtain OTA AKU from server.
In the present embodiment, software updating apparatus are applied to terminal unit.
Exemplary, the OTA AKU in the present embodiment is included for storing in terminal unitLocal software upgrade to the system upgrade bag of latest edition from current version, for upgrading softwareTarget partition table and the partition table ROMPaq for the currently used partition table of upgrading terminals equipment.Wherein, in the present embodiment, partition table ROMPaq can be the new recovery journey that server makesSequence, carrys out operational objective partition table.
Exemplary, terminal unit initiates a redaction detection, deposits when this terminal unit is detectedWhen the local software current version of storage is different from redaction, terminal unit can send version to serverUpgrade request, and server, after receiving this edition upgrading request, can directly set to this terminalFor one OTA AKU of return it is also possible to return a download path to this terminal unit, withJust this terminal unit obtains server according to this download path from webserver side and is distributed in advanceThe OTA AKU of the webserver.
It should be noted that above-mentioned edition upgrading request bag contains working as of the local software of terminal unitThe version number of front version, if this local software current version is not latest edition, and this local softwareWhen the corresponding partition table of current version is different from the corresponding partition table of latest edition, server can makeFor driving the partition table liter of the partition table (i.e. target partition table in the present embodiment) of latest editionLevel program, then makes the partition table based on the partition table ROMPaq made and latest editionOTA AKU, then, to terminal unit send comprise latest edition partition table OTAAKU.
Specifically, the acquisition modes that terminal unit obtains OTA AKU from server can be passed throughFollowing two modes are obtaining:
First kind of way:The OTA that software updating apparatus the reception server is sent by OTA technologyAKU.
The second way:Software updating apparatus receive the OTA AKU ground that described server sendsLocation, downloads OTA AKU from OTA upgrading packet address.
Exemplary, the software updating apparatus in terminal unit obtain from server and comprise target partitionThe mode of the OTA AKU of table and partition table ROMPaq can be divided into two kinds, and one kind is clothesBusiness device, after the upgrade request receiving terminal unit transmission, can obtain target according to upgrade request and divideArea's table, and make OTA AKU, then will make ready-made OTA AKU and send to terminalEquipment;Another kind is that server sends corresponding for various versions OTA AKU in advance to network,After server receives the upgrade request of terminal unit transmission, server can feed back to terminal unitOne OTA upgrading packet address, so that terminal unit is corresponding from this OTA upgrading packet address downloadOTA AKU, it should be noted that the OTA comprising partition table AKU is being sent out by serverBefore delivering to the network equipment, (for example, the OTA AKU comprising partition table can be markedAdd the version number of this partition table in the OTA AKU comprising partition table), thus will compriseThe OTA AKU of partition table and existing common OTA AKU (do not comprise partition tableOTA AKU) make a distinction.
102nd, software updating apparatus parse system upgrade bag, target partition from OTA AKUTable and partition table ROMPaq, run this partition table ROMPaq, and terminal unit is currently usedPartition table upgrade to target partition table.
103rd, software updating apparatus are carried out to the memorizer of terminal unit again according to target partition tableSubregion, and according to system upgrade bag, the system file in each subregion after subregion is upgraded.
Exemplary, software updating apparatus are according to the target partition table again memorizer to terminal unitAfter carrying out subregion, can be according to partitioned parameters (partition address, the subregion of subregion each in target partition tableSize), obtain the upgrade file of the corresponding system file of each subregion from system upgrade bag, andThe upgrade file of corresponding for each subregion system file is loaded onto each subregion, wherein, above-mentionedUpgrade file is used for for the system file in corresponding subregion upgrading to latest edition.
The method for upgrading software that embodiments of the invention provide, this software updating apparatus obtains from serverTake OTA AKU, this OTA AKU is included for by the local software storing in terminal unitUpgrade to the system upgrade bag of latest edition, be used for the target partition table of software of upgrading from current versionAnd the partition table ROMPaq for the currently used partition table of upgrading terminals equipment, then, this dressPut and parse system upgrade bag, target partition table and partition table upgrading journey from OTA AKUSequence, runs this partition table ROMPaq, partition table currently used for terminal unit is upgraded to targetPartition table, finally, carries out subregion to the memorizer of terminal unit again according to this target partition table,And according to system upgrade bag, the system file in each subregion after subregion is upgraded.So in OTAThe corresponding partition table of AKU is different from the corresponding partition table of terminal unit local software current versionWhen, terminal unit passes through the partition table ROMPaq carrying in OTA AKU, and terminal is setStandby currently used partition table upgrades to target partition table so that target partition table enables, so thatUsed in obtaining terminal unit, partition table is mutually matched with AKU, thus ensure that terminal unit energyEnough realize the upgrading of terminal unit system.
Embodiments of the invention provide a kind of method for upgrading software, the partition table upgrading in the present embodimentThe new recovery recovery program of program, based on this, as shown in Fig. 2 the present embodiment offer is softPart upgrade method comprises the steps:
201st, software updating apparatus obtain OTA AKU from server.
Wherein, the OTA AKU in the present embodiment is included for by the basis storing in terminal unitGround software upgrades to the AKU of latest edition, the target partition for software of upgrading from current versionTable and the new recovery program for the currently used partition table of upgrading terminals equipment.
202nd, software updating apparatus parse system upgrade bag, target partition from OTA AKUTable and partition table ROMPaq, and automatically into recovery pattern, by terminal unitRecovery program upgrades to new recovery program.
203rd, software updating apparatus restart system, run this new recovery program, enterRecovery pattern, partition table currently used for this terminal unit is upgraded to target partition table.
204th, software updating apparatus are carried out to the memorizer of terminal unit again according to target partition tableSubregion, and according to system upgrade bag, the system file in each subregion after subregion is upgraded.
It should be noted that step 201 in the present embodiment, the process described in 204 can be straightConnect with reference to the detailed description in the step 101 in a upper embodiment, 103, the present embodiment is no longer superfluousState.
The method for upgrading software that embodiments of the invention provide, this software updating apparatus obtains from serverTake OTA AKU, this OTA AKU is included for by the local software storing in terminal unitUpgrade to the system upgrade bag of latest edition, be used for the target partition table of software of upgrading from current versionAnd the new recovery program for the currently used partition table of upgrading terminals equipment, then, shouldDevice parses system upgrade bag, target partition table and partition table upgrading from OTA AKUProgram, and automatically into recovery pattern, the recovery program in terminal unit is upgraded toNew recovery program, restarts system, runs this new recovery program, by terminal unitCurrently used partition table upgrades to target partition table, finally, again right according to this target partition tableThe memorizer of terminal unit carries out subregion, and according to system upgrade bag by each subregion after subregionSystem file is upgraded.So in the corresponding partition table of OTA AKU and terminal unit local softwareWhen the corresponding partition table of current version is different, terminal unit is new by carry in OTA AKURecovery program, partition table currently used for terminal unit is upgraded to target partition table,Target partition table is enabled, so that partition table is mutual with AKU used in terminal unitCoupling, thus ensure that terminal unit is capable of the upgrading of terminal unit system.
Embodiments of the invention provide a kind of software updating apparatus, and this device is used for realizing above-mentioned enforcementThe method for upgrading software of example description, this device is applied to terminal unit, as shown in figure 3, this device3 include:Acquisition module 31, parsing module 32, the first upgraded module 33 and the second upgraded module34, wherein:
Acquisition module 31, for obtaining OTA AKU from server, this OTA AKU includesFor the local software storing in terminal unit being upgraded to the system of latest edition from current versionAKU, the target partition table and being used for for software of upgrading this terminal unit of upgrading is currently usedThe partition table ROMPaq of partition table.
Parsing module 32, for parsing system from the OTA AKU that acquisition module 31 obtainsAKU, target partition table and partition table ROMPaq.
First upgraded module 33, for running the partition table ROMPaq that parsing module 32 parses,Partition table currently used for terminal unit is upgraded to target partition table.
Second upgraded module 34, for again entering to the memorizer of terminal unit according to target partition tableRow subregion, and the system upgrade bag being obtained according to parsing module 32 is by each subregion after subregionSystem file is upgraded.
Optionally, above-mentioned acquisition module 31 specifically for:
The OTA AKU that the reception server is sent by OTA technology;
Or, the OTA upgrading packet address that the reception server sends, from OTA upgrading packet addressCarry OTA AKU.
Optionally, above-mentioned partition table ROMPaq is new recovery recovery program;As Fig. 4Shown, this device 3 also includes:3rd upgraded module 35, wherein:
3rd upgraded module 35, for entering recovery pattern, by the recovery in terminal unitProgram upgrades to new recovery program.
First upgraded module 33 specifically for:Restart system, run new recovery program,Enter recovery pattern, partition table currently used for terminal unit is upgraded to target partition table.
Optionally, the second upgraded module 34 will in the system upgrade bag being obtained according to parsing module 32In each subregion after subregion system file upgrading when specifically for:
After subregion terminates, according to the partitioned parameters of subregion each in target partition table, analytically moduleObtain the upgrade file of the corresponding system file of each subregion in 32 AKUs obtaining, and by eachThe upgrade file of the corresponding system file of subregion is loaded onto each subregion, and this upgrade file is used for dividingSystem file in area upgrades to latest edition.
The software updating apparatus that embodiments of the invention provide, this software updating apparatus obtains from serverTake OTA AKU, this OTA AKU is included for by the local software storing in terminal unitUpgrade to the system upgrade bag of latest edition, be used for the target partition table of software of upgrading from current versionAnd the partition table ROMPaq for the currently used partition table of upgrading terminals equipment, then, this dressPut and parse system upgrade bag, target partition table and partition table upgrading journey from OTA AKUSequence, runs this partition table ROMPaq, partition table currently used for terminal unit is upgraded to targetPartition table, finally, carries out subregion to the memorizer of terminal unit again according to this target partition table,And according to system upgrade bag, the system file in each subregion after subregion is upgraded.So in OTAThe corresponding partition table of AKU is different from the corresponding partition table of terminal unit local software current versionWhen, terminal unit passes through the partition table ROMPaq carrying in OTA AKU, and terminal is setStandby currently used partition table upgrades to target partition table so that target partition table enables, so thatUsed in obtaining terminal unit, partition table is mutually matched with AKU, thus ensure that terminal unit energyEnough realize the upgrading of terminal unit system.
It should be understood that disclosed terminal and side in several embodiments provided hereinMethod, can realize by another way.For example, device embodiment described above is onlySchematically, for example, the division of described unit, only a kind of division of logic function, actual realCan have now other dividing mode, for example multiple units or assembly can in conjunction with or can collectBecome to another system, or some features can be ignored, or do not execute.Another, shown orThe coupling each other discussing or direct-coupling or communication connection can be by some interfaces, fillPut or the INDIRECT COUPLING of unit or communication connection, can be electrical, mechanical or other forms.
The described unit illustrating as separating component can be or may not be physically separate, as the part that unit shows can be or may not be physical location, you can be located atOne place, or can also be distributed on multiple NEs.Can select according to the actual needsSelect the purpose to realize this embodiment scheme for some or all of unit therein.
In addition, each functional unit in each embodiment of the present invention can be integrated in one processes listIn unit or the independent physics of unit includes it is also possible to two or more unit collectionBecome in a unit.Above-mentioned integrated unit both can with the form of hardware realize it is also possible toRealized in the form of hardware plus SFU software functional unit.
The above-mentioned integrated unit realized in the form of SFU software functional unit, can be stored in a meterIn calculation machine read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, bagInclude some instructions with so that computer equipment (can be personal computer, server, orPerson's network equipment etc.) execution each embodiment methods described of the present invention part steps.And it is aforesaidStorage medium includes:USB flash disk, portable hard drive, read only memory (Read-Only Memory, letterClaim ROM), random access memory (Random Access Memory, abbreviation RAM),Magnetic disc or CD etc. are various can be with the medium of store program codes.
Finally it should be noted that:Above example only in order to technical scheme to be described, rather thanIt is limited;Although being described in detail to the present invention with reference to the foregoing embodiments, this areaThose of ordinary skill should be understood:It still can be to the technical scheme described in foregoing embodimentsModify, or equivalent is carried out to wherein some technical characteristics;And these are changed or replaceChange, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit andScope.