CN106201584B - Version upgrading method and terminal device - Google Patents
Version upgrading method and terminal device Download PDFInfo
- Publication number
- CN106201584B CN106201584B CN201610494968.3A CN201610494968A CN106201584B CN 106201584 B CN106201584 B CN 106201584B CN 201610494968 A CN201610494968 A CN 201610494968A CN 106201584 B CN106201584 B CN 106201584B
- Authority
- CN
- China
- Prior art keywords
- storage
- target
- terminal device
- path
- equipment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the present invention provides a kind of version upgrading method and terminal device, this method comprises: the currently stored scheme for obtaining terminal device corresponds to storage configuration table, it include respectively storing equipment in application layer and the routing information under recovery mode in terminal device in storage configuration table;According to storage configuration table and upgrade package in the former store path of application layer, identifiable target store path under recovery mode is obtained;Under recovery mode, upgrade package is obtained according to target store path, and upgrade according to version of the upgrade package to terminal device.For improving the reliability for carrying out edition upgrading to terminal device.
Description
Technical field
The present embodiments relate to field of computer technology more particularly to a kind of version upgrading methods and terminal device.
Background technique
Currently, most terminal devices (such as mobile phone, tablet computer) all have software systems (version), in terminal device
In use process, in order to optimize the performance of terminal device, the software systems in terminal device can be upgraded, i.e., to terminal
The version of equipment is upgraded.
During upgrading to version, terminal device first downloads from a server upgrade package in application layer, then
Into recovery mode, upgrade package is obtained under recovery mode in the store path of application layer, and according to recovery
The root path that equipment (such as T card etc.) is respectively stored under mode, identifies the root path of the store path of application layer, with determination
Storage equipment corresponding with the store path of the application layer, then, terminal device carry under recovery mode are deposited accordingly
Equipment is stored up, and upgrade package is obtained from the storage equipment of carry according to the store path of application layer, according to the upgrade package to terminal
The version of equipment is upgraded.
However, since root path of the storage equipment under recovery mode is different from the root path in application layer, so that
Terminal device can not usually identify that upgrade package in the store path of application layer, and can not determine the application under recovery mode
The corresponding storage equipment of store path of layer, so that terminal device can not acquire upgrade package, and then leads to not complete version
This upgrading.
Summary of the invention
The embodiment of the present invention provides a kind of version upgrading method and terminal device, carries out version to terminal device for improving
The reliability of upgrading.
In a first aspect, the embodiment of the present invention provides a kind of version upgrading method, it is applied to terminal device, the method packet
It includes:
The currently stored scheme for obtaining terminal device corresponds to storage configuration table, includes the terminal in the storage configuration table
Equipment is respectively stored in equipment in application layer and the routing information under recovery mode;
According to the storage configuration table and upgrade package in the former store path of application layer, obtain under recovery mode
Identifiable target store path;
Under recovery mode, the upgrade package is obtained according to the target store path, and according to the upgrade package
The version of the terminal device is upgraded.
In a kind of possible embodiment, stored according to the storage configuration table and upgrade package in the original of application layer
Path obtains identifiable target store path under recovery mode, comprising:
Identify the primitive root path in the former store path;
In the storage configuration table, the target root path under the corresponding recovery mode in the primitive root path is obtained;
It is target root path by the primitive root path replacement in the former store path, obtaining can under the recovery mode
The target store path of identification.
In alternatively possible embodiment, under recovery mode, institute is obtained according to the target store path
State upgrade package, comprising:
Determine the corresponding target storage device of the target store path;
Carry operation is executed to the target storage device;
According to the target store path, the upgrade package is obtained in the target storage device.
In alternatively possible embodiment, the corresponding target storage device of the determination target store path,
Include:
Obtain the target root path in the target store path;
The recovery partition table of the terminal device is obtained, includes the terminal device in the recovery partition table
In respectively store the root path of the mark and each storage equipment of equipment under recovery mode;
If the corresponding target storage device of the target root path is not present in the recovery partition table, according to institute
It states storage configuration table and determines the corresponding target storage device of the target store path.
In alternatively possible embodiment, before the storage configuration table for obtaining the terminal device, further includes:
After getting preset instructions, routing information, Yi Ji of each storage equipment in application layer are obtained
Routing information under recovery mode;
According to each storage routing information of the equipment in application layer and the routing information under recovery mode,
Generate the storage configuration table.
In alternatively possible embodiment, it is described according to it is each it is described storage equipment application layer routing information, with
And the root path information under recovery mode, after generating the storage configuration table, further includes:
Storage scheme more new command is obtained, includes updated storage scheme in the storage scheme more new command;
According to the storage scheme more new command, obtain that the updated storage scheme is corresponding, each storage is set
The standby routing information under application layer and recovery mode;
According to the updated storage scheme, corresponding, each storage equipment is under application layer and recovery mode
Routing information, update the storage configuration table.
In alternatively possible embodiment, the storage scheme more new command is any one in such as giving an order:
Main storage device replaces instruction, the extraction of the inserting instruction of external storage, external storage instruction and external storage
The subregion of equipment replaces instruction.
Second aspect, the embodiment of the present invention provide a kind of terminal device, comprising:
First obtains module, and the currently stored scheme for obtaining terminal device corresponds to storage configuration table, and the storage is matched
Set in table includes respectively storing equipment in application layer and the routing information under recovery mode in the terminal device;
Second obtains module, for, in the former store path of application layer, being obtained according to the storage configuration table and upgrade package
Take identifiable target store path under recovery mode;
Third obtains module, for obtaining the upgrade package according to the target store path under recovery mode;
Upgraded module, for being upgraded according to version of the upgrade package to the terminal device.
In alternatively possible embodiment, the second acquisition module is specifically used for:
Identify the primitive root path in the former store path;
In the storage configuration table, the target root path under the corresponding recovery mode in the primitive root path is obtained;
It is target root path by the primitive root path replacement in the former store path, obtaining can under the recovery mode
The target store path of identification.
In alternatively possible embodiment, the third obtains module and includes determination unit, carry unit and obtain
Take unit, wherein
The determination unit is used for, and determines the corresponding target storage device of the target store path;
The carry unit is used for, and executes carry operation to the target storage device;
The acquiring unit is used for, and according to the target store path, the liter is obtained in the target storage device
Grade packet.
In alternatively possible embodiment, the determination unit is specifically used for:
Obtain the target root path in the target store path;
The recovery partition table of the terminal device is obtained, includes the terminal device in the recovery partition table
In respectively store the root path of the mark and each storage equipment of equipment under recovery mode;
If the corresponding target storage device of the target root path is not present in the recovery partition table, according to institute
It states storage configuration table and determines the corresponding target storage device of the target store path.
In alternatively possible embodiment, the terminal device further includes the 4th acquisition module and generation module,
In,
It is described 4th acquisition module is used for, it is described first acquisition module obtain the terminal device storage configuration table it
Before, obtain each storage routing information of the equipment in application layer and the routing information under recovery mode;
The generation module is used for, according to each storage equipment in the routing information of application layer and in recovery
Routing information under mode generates the storage configuration table.
In alternatively possible embodiment, the terminal device further includes the 5th acquisition module and update module,
In,
The 5th acquisition module is used for, and is believed according to each storage equipment in the path of application layer in the generation module
Breath and the routing information under recovery mode after generating the storage configuration table, obtain storage scheme update and refer to
It enables, includes updated storage scheme in the storage scheme more new command;
The 5th acquisition module is also used to, and according to the storage scheme more new command, obtains the updated storage
Scheme is corresponding, routing information of each storage equipment under application layer and recovery mode;
The update module is used for, and according to the updated storage scheme, corresponding, each storage equipment is being applied
Routing information under layer and recovery mode, updates the storage configuration table.
In alternatively possible embodiment, the storage scheme more new command is any one in such as giving an order:
Main storage device replaces instruction, the extraction of the inserting instruction of external storage, external storage instruction and external storage
The subregion of equipment replaces instruction.
Version upgrading method and terminal device shown in the embodiment of the present invention, when needing the version to terminal device to rise
When grade, terminal device obtains the corresponding storage configuration table of currently stored scheme, and is being answered according to the storage configuration table and upgrade package
With the former store path of layer, terminal device identifiable target store path under recovery mode is obtained, in recovery
Under mode, upgrade package is obtained according to target store path, and upgrade according to version of the upgrade package to terminal device.In the mistake
Cheng Zhong, terminal device carry out former store path according to storage configuration table to be converted to target store path, since the storage is matched
It is corresponding with the currently stored scheme of terminal device to set table, so that terminal device one surely enough identifies the mesh under recovery mode
Store path is marked, so that terminal device can centainly acquire upgrading according to target store path under recovery mode
Packet, and upgraded according to version of the upgrade package to terminal device, improve the reliability that terminal device upgrades version.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair
Bright some embodiments for those of ordinary skill in the art without any creative labor, can be with
It obtains other drawings based on these drawings.
Fig. 1 is the flow diagram of version upgrading method provided by the invention;
Fig. 2 is the flow diagram provided by the invention that upgrade package method is obtained according to target store path;
Fig. 3 is the flow diagram provided by the invention for generating storage configuration table method;
Fig. 4 is the structural schematic diagram one of terminal device provided by the invention;
Fig. 5 is the structural schematic diagram two of terminal device provided by the invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
It include software systems (version) in terminal device shown in the embodiment of the present invention, and terminal device can set terminal
Standby current version is upgraded, and terminal device may include but be not limited only to the equipment such as mobile phone, tablet computer.In the following, passing through
Version upgrading method of the present invention and terminal device is described in detail in specific embodiment.
It should be noted that these specific embodiments can be combined with each other below, for the same or similar concept
Or process may repeat no more in certain embodiments.
Fig. 1 is the flow diagram of version upgrading method provided by the invention, and the executing subject of this method is terminal device,
Referring to Figure 1, this method may include:
S101, the currently stored scheme for obtaining terminal device correspond to storage configuration table, set in storage configuration table including terminal
Equipment is respectively stored in application layer and the routing information under recovery mode in standby;
S102, according to storage configuration table and upgrade package in the former store path of application layer, obtain under recovery mode
Identifiable target store path;
S103, under recovery mode, upgrade package is obtained according to target store path, and terminal is set according to upgrade package
Standby version is upgraded.
It in embodiments of the present invention, may include multiple storage equipment in terminal device, wherein upgrade package can store
In the external storage and internal storage device of terminal device, which can be for T card, SD card etc., inside this
Store the storage equipment that equipment can carry for terminal device;In actual application, before being downloaded to upgrade package,
User can choose the storage equipment for storing upgrade package, and terminal device can also be automatically chosen for depositing for storage upgrade package
Equipment is stored up, specifically, internal storage device can be determined as the default storage equipment of upgrade package by terminal device, then terminal device
Before downloading upgrade package, first judge whether the residual memory space of internal storage device is greater than the size (upgrade package of upgrade package
The size of shared memory space), if so, upgrade package is stored in internal storage device by terminal device, if it is not, will then rise
Grade packet is stored in External memory equipment.
In embodiments of the present invention, upgrade package is upgrade package in the system of terminal device in the former store path of application layer
Store path, for example, it is assumed that terminal device is the mobile phone of android system, then former store path of the upgrade package in application layer
The store path for being upgrade package in android system.
In order to enable terminal device under recovery mode, can operate the data in each storage equipment, it can
It may include storage respectively to store the facility information of equipment in storage terminal device under recovery mode, in the facility information
The title of equipment and the root path etc. for storing equipment, in actual application, the root path for storing equipment are usually to fix
, for example, the root path of external storage of most terminal devices under recovery mode is all /sdcard, inside is deposited
The root path for storing up equipment is all /data.
In the following, version upgrading method shown in Fig. 1 embodiment is described in detail.
In actual application, when user needs to upgrade terminal device, user can be in terminal device
Upgrade command is inputted, so that terminal downloads from a server upgrade package in application layer, and the upgrade package of downloading is stored in end
In the storage equipment of end equipment.
After terminal device is downloaded and completes upgrade package, terminal device obtains the corresponding storage configuration of its currently stored scheme
Table, what which can generate after getting preset instructions for terminal device, which can refer to for booting
Enable, instruction of restarting, edition upgrading instruction etc., include the storage equipment in terminal device in the storage configuration table in application layer
Routing information and the routing information under recovery mode.Optionally, which optionally can be for root path
It improves the generating rate of storage configuration table and saves memory space shared by storage configuration table, depositing in storage configuration table
Storing up equipment can be the storage equipment for storing upgrade package.In actual application, user can be to external storage
Subregion is carried out, whether subregion can also be carried out to external storage according to user, eventually to or not subregion is not carried out external storage
The storage configuration table that end equipment generates is not also identical, specifically, including the feasible implementation of following two:
A kind of feasible implementation: user does not carry out subregion to external storage:
It include routing information of the external storage in application layer in this kind of feasible implementation, in storage configuration table
With under recovery mode routing information and built in memory device in the routing information of application layer and in recovery mould
Routing information under formula, when routing information can be root path, storage configuration table can be as shown in table 1:
Table 1
Store the title of equipment | The root path of application layer | Root path under recovery mode |
External storage | /storage/sdcard0 | /sdcard |
Internal storage device | /storage/emulated | /internal |
Another feasible implementation: user carries out subregion to external storage:
In this kind of feasible implementation, multiple partitioned storages are obtained after user carries out subregion to external storage
Equipment, each partitioned storage equipment of external storage can be used as independent storage equipment, and each partitioned storage
Equipment has its corresponding title, and each partitioned storage equipment can be different in the root path of application layer, each partitioned storage
Root path of the equipment under recovery mode is identical, it is assumed that external storage is divided into three subregions by user, when path is believed
When breath is root path, storage configuration table can be as shown in table 2:
Table 2
Store the title of equipment | The root path of application layer | Root path under recovery mode |
Partitioned storage equipment 1 | /storage/T1P1 | /sdcard |
Partitioned storage equipment 2 | /storage/T1P2 | /sdcard |
Partitioned storage equipment 3 | /storage/T1P3 | /sdcard |
Internal storage device | /storage/emulated | /internal |
It should be noted that in the storage configuration table shown in Tables 1 and 2, when internal storage device and user data point
When area's shared data subregion, then internal storage device may not no itself storage implementor name, correspondingly, in storage configuration table
It can not include the corresponding title of the internal storage device.
After terminal device gets storage configuration table, terminal device is being answered according to storage configuration table and upgrade package
With the former store path of layer, terminal device identifiable target store path under recovery mode is obtained.Optionally, terminal
Equipment can first identify the primitive root path of former store path, in storage configuration table, obtain the corresponding recovery in primitive root path
Target root path under mode, and be target root path by the primitive root path replacement in former store path, it obtains terminal device and exists
Identifiable target store path under recovery mode.
It is acquired under recovery mode after identifiable target store path in terminal device, terminal device exists
Under recovery mode, upgrade package is obtained according to target store path, and rise according to version of the upgrade package to terminal device
Grade.
In the following, method shown in Fig. 1 embodiment is described in detail by specific example.
Illustratively, it is assumed that terminal device is the mobile phone of android system, detects new version in mobile phone, and user needs
When upgrading to the version of mobile phone, user inputs edition upgrading order in mobile phone, so that mobile phone is downloaded from server
Upgrade package.Assuming that setting of the mobile phone according to user, under the download catalogue for needing for upgrade package to be stored in T card, it is assumed that T is stuck in
Root path in the android system (application layer) of terminal device is /storage/sdcard0, and the file of upgrade package is entitled
OTA.zip, then former store path of the upgrade package in android system is /storage/sdcard0/download/
OTA.zip。
After mobile phone-downloaded completes upgrade package, mobile phone obtains that terminal device pre-generates, current with terminal device
The corresponding storage configuration table of storage scheme, it is assumed that the storage configuration table is as shown in table 1, then terminal device first obtains former store path
(/storage/sdcard0/download/OTA.zip) primitive root path (/storage/sdcard0), then shown in the table 1
Storage configuration table in, obtain that primitive root path (/storage/sdcard0) corresponding, target root under recovery mode
Path (/sdcard), and by the primitive root path (/storage/sdcard0) in former store path replace with target root path (/
Sdcard), target store path is obtained are as follows:/sdcard/download/OTA.zip.
After mobile phone acquires target store path/sdcard/download/OTA.zip, mobile phone is in recovery mould
Under formula, upgrade package is obtained according to the target store path, and upgrade according to version of the upgrade package to terminal device.
Version upgrading method shown in the embodiment of the present invention, when needing the version to terminal device to upgrade, terminal
Equipment obtains the corresponding storage configuration table of currently stored scheme, and is deposited according to the storage configuration table and upgrade package in the original of application layer
Path is stored up, terminal device identifiable target store path under recovery mode is obtained, under recovery mode, according to
Target store path obtains upgrade package, and is upgraded according to version of the upgrade package to terminal device.In this process, terminal is set
It is standby that former store path is carried out according to storage configuration table to be converted to target store path, since the storage configuration table is set with terminal
Standby currently stored scheme is corresponding, so that terminal device one surely enough identifies the target store path under recovery mode,
So that terminal device can centainly acquire upgrade package according to target store path under recovery mode, and according to upgrading
Packet upgrades the version of terminal device, improves the reliability that terminal device upgrades version.
On the basis of embodiment shown in Fig. 1, optionally, terminal device can exist according to following feasible implementation
Under recovery mode, upgrade package (S103 in embodiment illustrated in fig. 1) is obtained according to target store path, specifically, please join
Embodiment as shown in Figure 2.
Fig. 2 is the flow diagram provided by the invention that upgrade package method is obtained according to target store path, refers to figure
2, this method may include:
S201, the corresponding target storage device of target store path is determined;
S202, carry operation is executed to target storage device;
S203, according to target store path, upgrade package is obtained in target storage device.
In the embodiment shown in Figure 2, under recovery mode, terminal can be stored by recovery partition table and set
The facility information of equipment is respectively stored in standby, it is outer in recovery partition table in order to guarantee the versatility of recovery partition table
The facility information of storage equipment is set as the facility information of the storage equipment of non-subregion, that is, do not include in recovery partition table
To the facility information of partitioned storage equipment after external storage progress subregion, each, wherein setting in recovery partition table
Standby information may include the title for storing equipment, the root path for storing equipment, the type for storing equipment and carry parameter etc.,
Optionally, which can be as shown in table 3:
Table 3
Store the title of equipment | Root path | Store the type of equipment | Carry parameter |
External storage | /sdcard | Vfat | Carry parameter 1 |
Internal storage device | /data | Ext4 | Carry parameter 2 |
…… | …… | …… | …… |
It should be noted that table 3 only illustrates recovery partition table in exemplary fashion, not to recovery subregion
The restriction for the content for including in table can be set according to actual needs and wrap in recovery partition table in actual application
The particular content included.
In actual application, after terminal device target store path, when terminal device is needed according to the target
When store path obtains upgrade package, terminal device can first obtain the target root path in target store path, and obtain the mesh
The corresponding target storage device of root path is marked, due to not including the equipment letter of external partitioned storage equipment in recovery partition table
Breath, therefore, when target storage device is not external partitioned storage equipment, terminal device can exist according to target root path
Target storage device is determined in recovery partition table, when target storage device is external partitioned storage equipment, then terminal is set
It is standby that the corresponding target storage device of target root path can be determined in storage configuration table, it optionally, can be by following feasible
Implementation obtain the corresponding target storage device of target root path:
When terminal device needs to obtain target storage device according to target store path, terminal device first obtains target and deposits
Store up the recovery partition table of the target root path and terminal device in path, and judge in recovery partition table whether
There are the corresponding target storage devices of target root path, and if it exists, then according to recovery partition table, obtains target root path pair
The target storage device answered then according to storage configuration table, obtains the corresponding target storage device of target root path if it does not exist;
Wherein, during specific implementation, under recovery mode, terminal device can add the content in recovery partition table
It is loaded onto memory, and judges to whether there is the corresponding target storage device of target root path in recovery partition table in memory,
If it exists, then the corresponding target storage device of target root path is obtained according to recovery partition table, it if it does not exist, then will storage
Content in allocation list is loaded onto memory, and according to storage configuration table, obtains the corresponding target storage device of target root path;When
So, in actual application, after the content in recovery partition table is loaded onto memory by terminal device, terminal device
The content in storage configuration table also directly can also be loaded onto memory, and will existed in storage configuration table and recovery point
The data being not present in area's table are added to the recovery partition table in memory, so that terminal device can be directly according to memory
In recovery partition table determine the corresponding target storage device of target root path.
It should be noted that in actual application, when terminal device it needs to be determined that the corresponding mesh of target store path
When mark storage equipment, terminal device directly can also determine that the corresponding target storage of target store path is set according to storage configuration table
It is standby.
After terminal device acquires target storage device, terminal device carries out carry behaviour to target storage device
Make, optionally, terminal device can store equipment according to the type and carry parameters on target of target storage device and carry out carry
Operation, after carrying out carry operation to target storage device, terminal device can be stored target under recovery mode
Data in equipment are operated, that is, terminal device can be deposited according to target store path in target under recovery mode
Upgrade package is obtained in storage equipment.
It should be noted that conventionally, as not including setting for partitioned storage equipment in recovery partition table
Standby information, therefore, when upgrade package is stored in partitioned storage equipment, terminal device can not determine mesh according to recovery partition table
The corresponding target storage device of store path is marked, causes terminal device that can not acquire upgrade package, it is even more impossible to carry out correctly
Edition upgrading, and in this application, when upgrade package is stored in partitioned storage equipment, terminal device according to storage configuration table still
The corresponding target storage device of target store path can be determined, so that terminal device is still available to arrive upgrade package, and root
Correct edition upgrading is carried out according to upgrade package, further improves the reliability that terminal carries out edition upgrading.
Before executing any one above-mentioned embodiment, terminal device needs first to generate storage configuration table, in the following, combining figure
The process that embodiment shown in 3 generates storage configuration table to terminal device is described in detail.
Fig. 3 is the flow diagram provided by the invention for generating storage configuration table method, refers to Fig. 3, and this method can be with
Include:
S301, after getting preset instructions, obtain each routing information, Yi Ji of the storage equipment in application layer
Routing information under recovery mode;
S302, according to each storage routing information of the equipment in application layer and the routing information under recovery mode,
Generate storage configuration table.
In the embodiment shown in fig. 3, after terminal device gets preset instructions, terminal device starts to generate storage
Allocation list, the preset instructions can be power-on instruction, instruction of restarting, edition upgrading instruction etc., which is to generate storage
The trigger condition of allocation list can be set according to actual needs the preset instructions in actual application.
In actual application, after terminal device gets the preset instructions, terminal is obtained in terminal device extremely
The mark of few storage equipment, it is preferred that at least one the storage equipment can be the storage equipment for storing upgrade package,
And obtain each storage routing information of the equipment in application layer and the routing information under recovery mode.Optionally, should
Routing information can be root path, during upper, when routing information is root path, obtained external storage in terminal device and set
It whether is partitioned storage equipment according to the external storage during standby root path, it can be feasible by the following two kinds
Implementation determine the root path of external storage:
A kind of feasible implementation: external storage is not partitioned storage equipment;
It, can be according to the title and the external storage of the external storage in this kind of feasible implementation
Carry path determines the external storage in the root path of application layer.
Illustratively, it is assumed that the entitled T1 of external storage, the carry path of the external storage is/
Storage, then the root path of the external storage is /storage/T1.
Another feasible implementation: external storage is partitioned storage equipment;
It, can carry path according to each partitioned storage equipment, partitioned storage equipment in this kind of feasible implementation
The partition name of affiliated storage device name and the partitioned storage equipment determines each partitioned storage equipment.
Illustratively, it is assumed that equipment T1 (device name of storage equipment) will be stored and be divided into 3 partitioned storage equipment, point
It is not denoted as partitioned storage equipment 1- partitioned storage equipment 3, the partition name of 3 partitioned storage equipment is respectively P1-P3, this 3
The carry path of a partitioned storage equipment is /storage, then 3 partitioned storage equipment root path difference are as shown in table 4:
Table 4
Store the title of equipment | Root path |
Partitioned storage equipment 1 | /storage/T1P1 |
Partitioned storage equipment 1 | /storage/T1P2 |
Partitioned storage equipment 1 | /storage/T1P3 |
Each storage equipment is acquired in the root path of application layer and under recovery mode in terminal device
After root path, terminal device is according to each storage equipment got in the root path of application layer and in recovery mould
Root path under formula generates storage configuration table.
It should be noted that terminal device can first judge terminal before terminal device generates a storage configuration table
It currently whether there is storage configuration table in equipment, if it does not exist, then the terminal device directly method according to shown in Fig. 3 embodiment,
Generate storage configuration table;If it exists, then terminal device first obtains the generation moment of already present storage configuration table, and judges terminal
In period between the generation moment and current time, whether storage scheme is changed equipment, if not changing,
Terminal device does not regenerate new storage configuration table, if being changed, deletes already present storage configuration table, and generate new
Storage configuration table.
In actual application, user can be changed (example to the storage scheme of terminal device according to actual needs
Such as, the main storage device of replacement terminal equipment, replacement are to the subregion of external storage), storage of the user to terminal device
When scheme is changed, terminal device is then updated storage configuration table, specific:
After storage scheme of the user to terminal device is changed, then available storage scheme updates terminal device
Instruction, optionally, the storage scheme more new command can refer to for primary storage equipment replacement instruction, the insertion of external storage
It enables, the extraction instruction of external storage and the subregion replacement of external storage instruct, wherein the storage scheme updates
It include updated storage scheme in instruction.
After terminal device gets storage scheme more new command, it is corresponding that terminal device obtains updated storage scheme
, the routing information that each storage equipment is under application layer and recovery mode, and it is corresponding according to updated storage scheme,
Each storage equipment updates storage allocation list in the routing information of application layer.
In above process, equipment is respectively stored in terminal device in the routing information of application layer and in recovery mould
Routing information under formula embodies the currently stored scheme of terminal device, so that needing to generate storage configuration table in terminal device
When, terminal device is according to the currently stored schemes generation storage configuration table of terminal device, so that terminal device is matched according to the storage
Former store path can correctly be converted by setting table, so that terminal device stores road according to target under recovery mode
Diameter can centainly acquire upgrade package, and then improve the reliability that terminal device upgrades version.
Fig. 4 is the structural schematic diagram one of terminal device provided by the invention, refers to Fig. 4, which may include:
First obtains module 401, and the currently stored scheme for obtaining terminal device corresponds to storage configuration table, the storage
It include respectively storing equipment in application layer and the routing information under recovery mode in the terminal device in allocation list;
Second obtains module 402, for storing road in the former of application layer according to the storage configuration table and upgrade package
Diameter obtains identifiable target store path under recovery mode;
Third obtains module 403, for obtaining the upgrading according to the target store path under recovery mode
Packet;
Upgraded module 404, for being upgraded according to version of the upgrade package to the terminal device.
Terminal device shown in the embodiment of the present invention can execute technical solution shown in above method embodiment, realize
Principle and beneficial effect are similar, are no longer repeated herein.
In actual application, optionally, the second acquisition module 402 is specifically used for:
Identify the primitive root path in the former store path;
In the storage configuration table, the target root path under the corresponding recovery mode in the primitive root path is obtained;
It is target root path by the primitive root path replacement in the former store path, obtaining can under the recovery mode
The target store path of identification.
Fig. 5 is that the structural schematic diagram two of terminal device provided by the invention please join on the basis of the embodiment shown in fig. 4
See Fig. 5, it includes determination unit 4031, carry unit 4032 and acquiring unit 4033 that the third, which obtains module 403, wherein
The determination unit 4031 is used for, and determines the corresponding target storage device of the target store path;
The carry unit 4032 is used for, and executes carry operation to the target storage device;
The acquiring unit 4033 is used for, and according to the target store path, institute is obtained in the target storage device
State upgrade package.
Optionally, the determination unit 4033 specifically can be used for:
Obtain the target root path in the target store path;
The recovery partition table of the terminal device is obtained, includes the terminal device in the recovery partition table
In respectively store the root path of the mark and each storage equipment of equipment under recovery mode;
If the corresponding target storage device of the target root path is not present in the recovery partition table, according to institute
It states storage configuration table and determines the corresponding target storage device of the target store path.
Further, the terminal device can also include the 4th acquisition module 405 and generation module 406, wherein
The 4th acquisition module 405 is used for, and obtains the storage configuration of the terminal device in the first acquisition module
Before table, each storage routing information of the equipment in application layer and the routing information under recovery mode are obtained;
The generation module 406 is used for, routing information, the Yi Ji according to each storage equipment in application layer
Routing information under recovery mode generates the storage configuration table.
Further, the terminal device further includes the 5th acquisition module 407 and update module 408, wherein
The 5th acquisition module 407 is used for, in the generation module according to each storage equipment on the road of application layer
Diameter information and the routing information under recovery mode after generating the storage configuration table, obtain storage scheme and update
It instructs, includes updated storage scheme in the storage scheme more new command;
The 5th acquisition module 407 is also used to, and according to the storage scheme more new command, obtains described updated deposit
Storage scheme is corresponding, routing information of each storage equipment under application layer and recovery mode;
The update module 408 is used for, and according to the updated storage scheme, corresponding, each storage equipment is being answered
With the routing information under layer and recovery mode, the storage configuration table is updated.
Optionally, the storage scheme more new command is any one in such as giving an order: main storage device replacement instruction,
The extraction instruction of inserting instruction, external storage of external storage and the subregion of external storage replace instruction.
Terminal device shown in the embodiment of the present invention can execute technical solution shown in above method embodiment, realize
Principle and beneficial effect are similar, are no longer repeated herein.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to
The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey
When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk or
The various media that can store program code such as person's CD.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to
So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into
Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme.
Claims (8)
1. a kind of version upgrading method, which is characterized in that be applied to terminal device, which comprises
The currently stored scheme for obtaining terminal device corresponds to storage configuration table, includes the terminal device in the storage configuration table
In respectively store equipment in application layer and the routing information under recovery mode, the routing information is root path;
According to the storage configuration table and upgrade package in the former store path of application layer, obtaining can know under recovery mode
Other target store path;
Under recovery mode, the upgrade package is obtained according to the target store path, and according to the upgrade package to institute
The version for stating terminal device is upgraded;
According to the storage configuration table and upgrade package in the former store path of application layer, obtaining can know under recovery mode
Other target store path, comprising:
Identify the primitive root path in the former store path;
In the storage configuration table, the target root path under the corresponding recovery mode in the primitive root path is obtained;
It is target root path by the primitive root path replacement in the former store path, obtains can recognize under the recovery mode
Target store path.
2. the method according to claim 1, wherein storing road according to the target under recovery mode
Diameter obtains the upgrade package, comprising:
Determine the corresponding target storage device of the target store path;
Carry operation is executed to the target storage device;
According to the target store path, the upgrade package is obtained in the target storage device.
3. according to the method described in claim 2, it is characterized in that, the corresponding target of the determination target store path is deposited
Store up equipment, comprising:
Obtain the target root path in the target store path;
The recovery partition table of the terminal device is obtained, includes each in the terminal device in the recovery partition table
Store the root path of the mark and each storage equipment of equipment under recovery mode;
If the corresponding target storage device of the target root path is not present in the recovery partition table, deposited according to
Storage allocation list determines the corresponding target storage device of the target store path.
4. method according to claim 1-3, which is characterized in that the storage for obtaining the terminal device is matched
Before setting table, further includes:
After getting preset instructions, each storage equipment is obtained in the routing information of application layer and in recovery
Routing information under mode;
According to each storage routing information of the equipment in application layer and the routing information under recovery mode, generate
The storage configuration table.
5. a kind of terminal device characterized by comprising
First obtains module, and the currently stored scheme for obtaining terminal device corresponds to storage configuration table, the storage configuration table
In include that equipment is respectively stored in the terminal device in application layer and the routing information under recovery mode, the path letter
Breath is root path;
Second obtains module, for, in the former store path of application layer, being obtained according to the storage configuration table and upgrade package
Identifiable target store path under recovery mode;
Third obtains module, for obtaining the upgrade package according to the target store path under recovery mode;
Upgraded module, for being upgraded according to version of the upgrade package to the terminal device;
The second acquisition module is specifically used for:
Identify the primitive root path in the former store path;
In the storage configuration table, the target root path under the corresponding recovery mode in the primitive root path is obtained;
It is target root path by the primitive root path replacement in the former store path, obtains can recognize under the recovery mode
Target store path.
6. terminal device according to claim 5, which is characterized in that the third obtains module and includes determination unit, hangs
Carrier unit and acquiring unit, wherein
The determination unit is used for, and determines the corresponding target storage device of the target store path;
The carry unit is used for, and executes carry operation to the target storage device;
The acquiring unit is used for, and according to the target store path, the upgrade package is obtained in the target storage device.
7. terminal device according to claim 6, which is characterized in that the determination unit is specifically used for:
Obtain the target root path in the target store path;
The recovery partition table of the terminal device is obtained, includes each in the terminal device in the recovery partition table
Store the root path of the mark and each storage equipment of equipment under recovery mode;
If the corresponding target storage device of the target root path is not present in the recovery partition table, deposited according to
Storage allocation list determines the corresponding target storage device of the target store path.
8. according to the described in any item terminal devices of claim 5-7, which is characterized in that the terminal device further includes the 4th obtaining
Modulus block and generation module, wherein
The 4th acquisition module is used for, before the first acquisition module obtains the storage configuration table of the terminal device,
Obtain each storage routing information of the equipment in application layer and the routing information under recovery mode;
The generation module is used for, according to each storage equipment in the routing information of application layer and in recovery mode
Under routing information, generate the storage configuration table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610494968.3A CN106201584B (en) | 2016-06-28 | 2016-06-28 | Version upgrading method and terminal device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610494968.3A CN106201584B (en) | 2016-06-28 | 2016-06-28 | Version upgrading method and terminal device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106201584A CN106201584A (en) | 2016-12-07 |
CN106201584B true CN106201584B (en) | 2019-09-17 |
Family
ID=57462385
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610494968.3A Active CN106201584B (en) | 2016-06-28 | 2016-06-28 | Version upgrading method and terminal device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106201584B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107193580A (en) * | 2017-03-31 | 2017-09-22 | 北京元心科技有限公司 | Method for updating system and non-of short duration computer-readable medium |
CN107145282A (en) * | 2017-05-04 | 2017-09-08 | 北京奇虎科技有限公司 | The brush machine method and apparatus of smart machine based on Android operation system |
CN112947980A (en) * | 2019-12-11 | 2021-06-11 | 观致汽车有限公司 | Server, vehicle, remote upgrading method and remote upgrading system thereof |
CN111064723B (en) * | 2019-12-12 | 2022-08-30 | 杭州涂鸦信息技术有限公司 | Over-the-air upgrading method and system based on backup system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102938817A (en) * | 2012-11-14 | 2013-02-20 | 广东欧珀移动通信有限公司 | Storage mount achieving method and device under recovery mode of mobile phone |
CN104049914A (en) * | 2014-05-30 | 2014-09-17 | 青岛海信移动通信技术股份有限公司 | Method and device for executing write operation on protected partition |
CN105183517A (en) * | 2015-09-14 | 2015-12-23 | 广东欧珀移动通信有限公司 | Method and device for mounting external storage equipment in recovery mode and electronic device |
CN105282613A (en) * | 2014-06-24 | 2016-01-27 | 日照海帝电器有限公司 | Smart television software upgrading method and system |
CN105700927A (en) * | 2016-01-15 | 2016-06-22 | 青岛海信移动通信技术股份有限公司 | Version upgrade method, terminal equipment and version server |
-
2016
- 2016-06-28 CN CN201610494968.3A patent/CN106201584B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102938817A (en) * | 2012-11-14 | 2013-02-20 | 广东欧珀移动通信有限公司 | Storage mount achieving method and device under recovery mode of mobile phone |
CN104049914A (en) * | 2014-05-30 | 2014-09-17 | 青岛海信移动通信技术股份有限公司 | Method and device for executing write operation on protected partition |
CN105282613A (en) * | 2014-06-24 | 2016-01-27 | 日照海帝电器有限公司 | Smart television software upgrading method and system |
CN105183517A (en) * | 2015-09-14 | 2015-12-23 | 广东欧珀移动通信有限公司 | Method and device for mounting external storage equipment in recovery mode and electronic device |
CN105700927A (en) * | 2016-01-15 | 2016-06-22 | 青岛海信移动通信技术股份有限公司 | Version upgrade method, terminal equipment and version server |
Also Published As
Publication number | Publication date |
---|---|
CN106201584A (en) | 2016-12-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106201584B (en) | Version upgrading method and terminal device | |
CN105867947B (en) | Data processing method and device after preset application program updating | |
CN106708543B (en) | OTA (over the air) upgrading method and device of operating system | |
CN104918114B (en) | A kind of operating system update method and device | |
CN105786549B (en) | Smart machine and its upgrade method | |
CN110096424B (en) | Test processing method and device, electronic equipment and storage medium | |
CN110463162B (en) | Application deployment method, device and system | |
CN109558160A (en) | Upgrade method, embedded system | |
CN104750528B (en) | A kind of assembly management method and apparatus in Android program | |
CN106572372A (en) | Set-top box upgrading method and set-top box | |
CN104182255A (en) | Method and terminal for upgrading library files of system application | |
CN109800005B (en) | Client hot update method and device | |
CN110515641A (en) | The update method of server firmware, apparatus and system | |
CN109002330A (en) | A kind of method, device and equipment identifying UEFI OS startup item | |
CN107329792B (en) | Docker container starting method and device | |
CN110209420A (en) | A kind of method and device updating bootstrap loader | |
CN108196870A (en) | Upgrade method and device | |
CN108984198A (en) | A kind of upgrade method and device of android system | |
CN110083379A (en) | A kind of server component upgrade method and relevant apparatus | |
CN103019764A (en) | Method and system for detecting installability of Andriod resource packages | |
CN104461621A (en) | Attribute information updating method and device | |
CN106502750B (en) | OTA upgrade method and Bluetooth chip | |
CN112995806A (en) | Method, device, system and storage medium for upgrading optical network unit | |
CN103559063A (en) | Update method and update system of application, application system and parameter configuration system | |
CN110580167A (en) | system upgrading method, intelligent device and server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |