CN105630548B - Method for updating system and device - Google Patents
Method for updating system and device Download PDFInfo
- Publication number
- CN105630548B CN105630548B CN201510971643.5A CN201510971643A CN105630548B CN 105630548 B CN105630548 B CN 105630548B CN 201510971643 A CN201510971643 A CN 201510971643A CN 105630548 B CN105630548 B CN 105630548B
- Authority
- CN
- China
- Prior art keywords
- bootstrap
- subregion
- modification
- modified
- upgrade procedure
- 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
Abstract
The disclosure belongs to field of computer technology about a kind of method for updating system and device.The described method includes: obtaining the first OTA packet, upgrade procedure is updated according to the first OTA packet, the upgrade procedure is for being updated system;The 2nd OTA packet is obtained, the 2nd OTA packet includes the modification file for modifying the subregion of the system;System is restarted, by the updated upgrade procedure, according to the modification file modification bootstrap;System is restarted again, and the subregion is modified by the modified bootstrap;Enter reforestation practices under the guidance of the bootstrap after the modification, each partitioned file in the 2nd OTA packet is written in the modified subregion.The disclosure can solve to need to first pass through line dataller tool and redistribute subregion, then carry out OTA upgrading, the problem for causing the process of system update cumbersome, achieve the effect that the efficiency for improving system update.
Description
Technical field
This disclosure relates to field of computer technology, in particular to a kind of method for updating system and device.
Background technique
The upgrading of currently used OTA (Over-the-Air Technology, over the air) can be used to pair
Android system is updated.Wherein, OTA upgrading does not include the distribution to subregion, if user needs carrying out OTA upgrading
Shi Xiugai subregion needs to first pass through line dataller tool and redistributes subregion, then carries out OTA upgrading.
Wherein, the subregion of system may include system subregion, data subregion etc., carries out subregion to system and divides again
Size with each subregion.For example, system subregion is revised as 700M by original 500M.
Summary of the invention
To solve the problems in the relevant technologies, present disclose provides a kind of method for updating system and devices.
According to the first aspect of the embodiments of the present disclosure, a kind of method for updating system is provided, which comprises
The first over the air OTA packet is obtained, upgrade procedure, the upgrade procedure are updated according to the first OTA packet
For being updated to system;
The 2nd OTA packet is obtained, the 2nd OTA packet includes the modification file for modifying the subregion of the system;
The system is restarted, by the updated upgrade procedure, according to the modification file modification bootstrap;
The system is restarted again, and the subregion is modified by the modified bootstrap;
Enter reforestation practices under the guidance of the bootstrap after the modification, by each point in the 2nd OTA packet
Area file is written in the modified subregion.
It is optionally, described that upgrade procedure is updated according to the first OTA packet, comprising:
It is the permission of bootstrap described in the upgrade procedure configuration modification according to the first OTA packet;
The upgrade procedure is indicated after restarting the system, according to bootstrap described in the modification file modification.
Optionally, described by the updated upgrade procedure, according to the modification file modification bootstrap, packet
It includes:
It is decompressed by the modification file of the updated upgrade procedure to binary format;
It is written in bootstrap subregion, is repaired by the boot code that the updated upgrade procedure obtains decompression
Change the bootstrap.
It is optionally, described that the subregion is modified by the modified bootstrap, comprising:
Subregion list file to be updated, the subregion in the subregion list file are generated by the modified bootstrap
Table content is used to indicate the address of each subregion;
The subregion list file is converted into the array of predetermined format by the modified bootstrap;
After the completion of memory initialization in the bootstrap after the modification, pass through the modified bootstrap
Subregion list file indicated by the array of the predetermined format is written in the partition table of the memory.
According to the second aspect of an embodiment of the present disclosure, a kind of system updating device is provided, described device includes:
Program update module is configured as obtaining the first over the air OTA packet, be updated according to the first OTA packet
Upgrade procedure, the upgrade procedure is for being updated system;
OTA packet obtains module, is configured as obtaining the 2nd OTA packet, the 2nd OTA packet includes for modifying the system
Subregion modification file;
Modification of program module is configured as restarting the system, is obtained by described program update module updated
The upgrade procedure obtains the modification file modification bootstrap in module according to the OTA packet;
Subregion modified module is configured as restarting the system again, the modification obtained by described program modified module
The bootstrap afterwards modifies the subregion;
File writing module is configured as entering reforestation practices under the guidance of the bootstrap after the modification, by institute
Each partitioned file in the 2nd OTA packet is stated to be written in the modified subregion that the subregion modified module obtains.
Optionally, described program update module, comprising:
Submodule is configured, is configured as according to the first OTA packet to guide journey described in the upgrade procedure configuration modification
The permission of sequence;
It indicates submodule, is configured as indicating the upgrade procedure after restarting the system, according to the modification file
Modify the bootstrap.
Optionally, described program modified module, comprising:
Submodule is decompressed, the modification file by the updated upgrade procedure to binary format is configured as
It is decompressed;
Submodule is modified, is configured as decompressing what submodule decompressed for described by the updated upgrade procedure
Boot code is written in bootstrap subregion, modifies the bootstrap.
Optionally, the subregion modified module, comprising:
Submodule is generated, is configured as generating subregion list file to be updated, institute by the modified bootstrap
State the address that the partition table content in subregion list file is used to indicate each subregion;
Transform subblock, being configured as will be described in generation submodule generation by the modified bootstrap
Subregion list file is converted into the array of predetermined format;
Submodule is written, is configured as after the completion of the memory initialization in the bootstrap after the modification, passes through
The subregion indicated by the array for the predetermined format that the modified bootstrap obtains the transform subblock
List file is written in the partition table of the memory.
According to the third aspect of an embodiment of the present disclosure, a kind of system updating device is provided, described device includes:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
The first over the air OTA packet is obtained, upgrade procedure, the upgrade procedure are updated according to the first OTA packet
For being updated to system;
The 2nd OTA packet is obtained, the 2nd OTA packet includes the modification file for modifying the subregion of the system;
The system is restarted, by the updated upgrade procedure, according to the modification file modification bootstrap;
The system is restarted again, and the subregion is modified by the modified bootstrap;
Enter reforestation practices under the guidance of the bootstrap after the modification, by each point in the 2nd OTA packet
Area file is written in the modified subregion.
The technical scheme provided by this disclosed embodiment can include the following benefits:
By updating upgrade procedure, bootstrap is modified by updated upgrade procedure, passes through modified guidance journey
Sequence modification subregion enters back into reforestation practices and carries out OTA upgrading, can directly be guaranteed the repair free of charge by OTA and change subregion, solved and need first to lead to
It crosses line dataller tool and redistributes subregion, then carry out OTA upgrading, the problem for causing the process of system update cumbersome has reached raising
The effect of the efficiency of system update.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited
It is open.
Detailed description of the invention
The drawings herein are incorporated into the specification and constitutes a part of present disclosure specification, shows and meets the disclosure
Embodiment, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart of method for updating system shown according to an exemplary embodiment.
Fig. 2 is a kind of flow chart of the method for updating system shown according to another exemplary embodiment.
Fig. 3 is a kind of block diagram of system updating device shown according to an exemplary embodiment.
Fig. 4 is a kind of block diagram of system updating device shown according to an exemplary embodiment.
Fig. 5 is a kind of block diagram of device for system update shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of flow chart of method for updating system shown according to an exemplary embodiment, the method for updating system
Applied in terminal, as shown in Figure 1, the method for updating system includes the following steps.
In a step 101, obtain the first OTA packet, according to the first OTA packet update upgrade procedure, the upgrade procedure be used for pair
System is updated.
In a step 102, the 2nd OTA packet is obtained, the 2nd OTA packet includes the modification text for modifying the subregion of system
Part.
In step 103, system is restarted, by updated upgrade procedure, according to modification file modification bootstrap.
At step 104, system is restarted again, and subregion is modified by modified bootstrap.
In step 105, enter reforestation practices under the guidance of bootstrap after the modification, it will be each in the 2nd OTA packet
A partitioned file is written in modified subregion.
In conclusion the method for updating system that the disclosure provides passes through updated upgrading journey by updating upgrade procedure
Sequence modification bootstrap modifies subregion by modified bootstrap, enters back into reforestation practices and carries out OTA upgrading, Ke Yizhi
Connected OTA and guaranteed the repair free of charge and change subregion, and solved and need to first pass through line dataller tool and redistribute subregion, then carry out OTA upgrading, cause be
The cumbersome problem of the process updated of uniting, has achieved the effect that the efficiency for improving system update.
Fig. 2 is a kind of flow chart of the method for updating system shown according to another exemplary embodiment, the system update side
Method is applied in terminal, as shown in Fig. 2, the method for updating system includes the following steps.
In step 201, the first OTA packet is obtained, is the power of upgrade procedure configuration modification bootstrap according to the first OTA packet
Limit.
OTA packet refers to that terminal is downloaded from network by air interface and obtains, data packet for more new system.OTA
Packet, which can be after developer makes, uploads onto the server, and terminal is downloaded from server;It is also possible to other terminals
Equipment is sent to the terminal, and the present embodiment does not limit the acquisition modes of OTA packet.
In the present embodiment, the OTA packet for being used to update upgrade procedure is known as the first OTA packet.Wherein, upgrade procedure for pair
System is updated.For example, upgrade procedure can be the Updater program in system.
In the related technology, upgrade procedure calls directly the more new interface of system, and control system is restarted and Bootloader,
Control system enters reforestation practices under the guidance of bootstrap, so that system is in recovery mode, each partitioned file is write
Enter in the subregion of system, original partitioned file is replaced by the partitioned file of write-in, completes system update.Wherein, journey is guided
Sequence can be bootloader, and reforestation practices can be recovery mode.
If desired the subregion that system is modified before more new system, since system partitioning needs to be modified by bootstrap,
Therefore, upgrade procedure needs first to modify bootstrap, then modifies subregion by modified bootstrap.
Before upgrade procedure modifies bootstrap, need for the permission of upgrade procedure configuration modification bootstrap, at this point,
Terminal needs the permission according to the first OTA packet for upgrade procedure configuration modification bootstrap.
In actual implementation, upgrade procedure code can be set in the first OTA packet, be added in the upgrade procedure code
For the code of the permission of upgrade procedure configuration modification bootstrap, pass through upgrading original in the upgrade procedure code replacement system
Program code, so that system, when executing the upgrade procedure code to run upgrade procedure, which has modification guidance
The permission of program.
In step 202, instruction upgrade procedure is after restarting system, according to modification file modification bootstrap.
The upgrade procedure code being arranged in first OTA packet, it is also necessary to instruction upgrade procedure is added after restarting system, according to
Modify file modification bootstrap code so that system execute the upgrade procedure code to run upgrade procedure when, the liter
Grade program can be after restarting system, according to modification file modification bootstrap.Wherein, modification file is for modifying system
The file of subregion.
In step 203, the 2nd OTA packet is obtained, the 2nd OTA packet includes the modification text for modifying the subregion of system
Part.
In the present embodiment, the OTA packet that will be used to modify the subregion of system is known as the 2nd OTA packet.Wherein, the 2nd OTA packet
Acquisition modes can be identical as the acquisition modes of the first OTA packet, can also be different, this embodiment is not limited.
Modification file in 2nd OTA packet can be boot code is compiled after obtained binary format
File is modified, boot code is the code for the bootstrap for modifying the subregion of system.
In step 204, restart system, solved by modification file of the updated upgrade procedure to binary format
Pressure.
After restarting system, updated upgrade procedure is needed according to modification file modification bootstrap.That is, updated
Upgrade procedure needs the modification file of the reading binary format from the 2nd OTA packet, then to the modification file of binary format into
Row decompression, obtains boot code.
In step 205, bootstrap is written by the boot code that updated upgrade procedure obtains decompression
In subregion, bootstrap is modified.
Boot code is written in bootstrap subregion updated upgrade procedure, replaces bootstrap subregion Central Plains
The boot code come, so that system executes the boot code to run modified bootstrap.
In step 206, system is restarted again, and subregion list file to be updated is generated by modified bootstrap,
Partition table content in the subregion list file is used to indicate the address of each subregion.
When restarting system again, the more new interface of upgrade procedure calling system starts modified bootstrap, modification
Bootstrap afterwards can modify to the subregion of system.
When realizing, subregion list file is can be generated in modified bootstrap.For example, subregion list file can be gpt_
both0.bin。
Wherein, the technology of bootstrap generation subregion list file is highly developed, and the present embodiment does not repeat.
In step 207, subregion list file is converted into the array of predetermined format by modified bootstrap.
Modified bootstrap also needs subregion list file being converted into C language array, which is stored in
In C language file.
In a step 208, after the completion of the memory initialization in bootstrap after the modification, pass through modified guidance
Subregion list file indicated by array of the program by predetermined format is written in the partition table of memory.
In bootstrap after the modification after the completion of memory emmc initialization, modified bootstrap is literary from C language
C language array is read in part, by the partition table of the partition table content write-in emmc of subregion list file represented by C language array
In, subregion again is carried out to emmc, realizes the subregion again to system.
When realizing, emmc can redistribute the size of subregion according to the address of subregion each in partition table content.
In step 209, enter reforestation practices under the guidance of bootstrap after the modification, it will be each in the 2nd OTA packet
A partitioned file is written in modified subregion.
Since the partitioned file after re-starting subregion to system, stored originally in memory is all deleted, therefore,
System needs to enter reforestation practices, in recovery mode, modified subregion is written in each partitioned file in the 2nd OTA packet
In, the update of complete paired systems.
In conclusion the method for updating system that the disclosure provides passes through updated upgrading journey by updating upgrade procedure
Sequence modification bootstrap modifies subregion by modified bootstrap, enters back into reforestation practices and carries out OTA upgrading, Ke Yizhi
Connected OTA and guaranteed the repair free of charge and change subregion, and solved and need to first pass through line dataller tool and redistribute subregion, then carry out OTA upgrading, cause be
The cumbersome problem of the process updated of uniting, has achieved the effect that the efficiency for improving system update.
Fig. 3 is a kind of block diagram of system updating device shown according to an exemplary embodiment, which answers
For in terminal, as shown in figure 3, the system updating device includes: that program update module 310, OTA packet obtain module 320, program
Modified module 330, subregion modified module 340 and file writing module 350.
The program update module 310, is configured as obtaining the first OTA packet, updates upgrade procedure according to the first OTA packet, rises
Grade program is for being updated system;
The OTA packet obtains module 320, is configured as obtaining the 2nd OTA packet, the 2nd OTA packet includes for modifying system
The modification file of subregion;
The modification of program module 330, is configured as restarting system, is obtained by program update module 310 updated
Upgrade procedure obtains the modification file modification bootstrap in module 320 according to OTA packet;
The subregion modified module 340, is configured as restarting system again, the modification obtained by modification of program module 330
Bootstrap afterwards modifies subregion;
This document writing module 350 is configured as entering reforestation practices under the guidance of bootstrap after the modification, by
In the modified subregion that each partitioned file write-in subregion modified module 340 in two OTA packets obtains.
In conclusion the system updating device that the disclosure provides passes through updated upgrading journey by updating upgrade procedure
Sequence modification bootstrap modifies subregion by modified bootstrap, enters back into reforestation practices and carries out OTA upgrading, Ke Yizhi
Connected OTA and guaranteed the repair free of charge and change subregion, and solved and need to first pass through line dataller tool and redistribute subregion, then carry out OTA upgrading, cause be
The cumbersome problem of the process updated of uniting, has achieved the effect that the efficiency for improving system update.
Fig. 4 is a kind of block diagram of system updating device shown according to an exemplary embodiment, which answers
For in terminal, as shown in figure 4, the system updating device includes: that program update module 410, OTA packet obtain module 420, program
Modified module 430, subregion modified module 440 and file writing module 450.
The program update module 410, is configured as obtaining the first OTA packet, updates upgrade procedure according to the first OTA packet, rises
Grade program is for being updated system;
The OTA packet obtains module 420, is configured as obtaining the 2nd OTA packet, the 2nd OTA packet includes for modifying system
The modification file of subregion;
The modification of program module 430, is configured as restarting system, is obtained by program update module 410 updated
Upgrade procedure obtains the modification file modification bootstrap in module 420 according to OTA packet;
The subregion modified module 440, is configured as restarting system again, the modification obtained by modification of program module 430
Bootstrap afterwards modifies subregion;
This document writing module 450 is configured as entering reforestation practices under the guidance of bootstrap after the modification, by
In the modified subregion that each partitioned file write-in subregion modified module 440 in two OTA packets obtains.
Optionally, program update module 410, comprising: configuration submodule 411 and instruction submodule 412;
The configuration submodule 411 is configured as the power according to the first OTA packet for upgrade procedure configuration modification bootstrap
Limit;
The instruction submodule 412 is configured as instruction upgrade procedure after restarting system, according to modification file modification guidance
Program.
Optionally, modification of program module 430, comprising: decompression submodule 431 and modification submodule 432;
The decompression submodule 431, be configured as by updated upgrade procedure to the modification file of binary format into
Row decompression;
The modification submodule 432 is configured as to decompress what the decompression of submodule 431 obtained by updated upgrade procedure
Boot code is written in bootstrap subregion, modifies bootstrap.
Optionally, subregion modified module 440, comprising: generate submodule 441, transform subblock 442 and write-in submodule
443;
The generation submodule 441 is configured as generating subregion list file to be updated by modified bootstrap, should
Partition table content in subregion list file is used to indicate the address of each subregion;
The transform subblock 442 is configured as the subregion for generating generation submodule 441 by modified bootstrap
List file is converted into the array of predetermined format;
The write-in submodule 443 is configured as after the completion of the memory initialization in bootstrap after the modification, passes through
The write-in storage of subregion list file indicated by the array for the predetermined format that modified bootstrap obtains transform subblock 442
In the partition table of device.
In conclusion the system updating device that the disclosure provides passes through updated upgrading journey by updating upgrade procedure
Sequence modification bootstrap modifies subregion by modified bootstrap, enters back into reforestation practices and carries out OTA upgrading, Ke Yizhi
Connected OTA and guaranteed the repair free of charge and change subregion, and solved and need to first pass through line dataller tool and redistribute subregion, then carry out OTA upgrading, cause be
The cumbersome problem of the process updated of uniting, has achieved the effect that the efficiency for improving system update.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
An exemplary embodiment of the present disclosure provides a kind of system updating devices, can be realized the system of disclosure offer more
New method, the system updating device include: processor, for the memory of storage processor executable instruction;
Wherein, processor is configured as:
The first OTA packet is obtained, upgrade procedure is updated according to the first OTA packet, the upgrade procedure is for being updated system;
The 2nd OTA packet is obtained, the 2nd OTA packet includes the modification file for modifying the subregion of system;
System is restarted, by updated upgrade procedure, according to modification file modification bootstrap;
System is restarted again, and subregion is modified by modified bootstrap;
Enter reforestation practices under the guidance of bootstrap after the modification, each partitioned file in the 2nd OTA packet is write
Enter in modified subregion.
Fig. 5 is a kind of block diagram of device 500 for system update shown according to an exemplary embodiment.For example, dress
Setting 500 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical treatment
Equipment, body-building equipment, personal digital assistant etc..
Referring to Fig. 5, device 500 may include following one or more components: processing component 502, memory 504, power supply
Component 506, multimedia component 508, audio component 510, the interface 512 of input/output (I/O), sensor module 514, and
Communication component 516.
The integrated operation of the usual control device 500 of processing component 502, such as with display, telephone call, data communication, phase
Machine operation and record operate associated operation.Processing component 502 may include that one or more processors 518 refer to execute
It enables, to perform all or part of the steps of the methods described above.In addition, processing component 502 may include one or more modules, just
Interaction between processing component 502 and other assemblies.For example, processing component 502 may include multi-media module, it is more to facilitate
Interaction between media component 508 and processing component 502.
Memory 504 is configured as storing various types of data to support the operation in device 500.These data are shown
Example includes the instruction of any application or method for operating on device 500, contact data, and telephone book data disappears
Breath, picture, video etc..Memory 504 can be by any kind of volatibility or non-volatile memory device or their group
It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile
Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash
Device, disk or CD.
Power supply module 506 provides electric power for the various assemblies of device 500.Power supply module 506 may include power management system
System, one or more power supplys and other with for device 500 generate, manage, and distribute the associated component of electric power.
Multimedia component 508 includes the screen of one output interface of offer between described device 500 and user.One
In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen
Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings
Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action
Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers
Body component 508 includes a front camera and/or rear camera.When device 500 is in operation mode, such as screening-mode or
When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and
Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 510 is configured as output and/or input audio signal.For example, audio component 510 includes a Mike
Wind (MIC), when device 500 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched
It is set to reception external audio signal.The received audio signal can be further stored in memory 504 or via communication set
Part 516 is sent.In some embodiments, audio component 510 further includes a loudspeaker, is used for output audio signal.
I/O interface 512 provides interface between processing component 502 and peripheral interface module, and above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock
Determine button.
Sensor module 514 includes one or more sensors, and the state for providing various aspects for device 500 is commented
Estimate.For example, sensor module 514 can detecte the state that opens/closes of device 500, and the relative positioning of component, for example, it is described
Component is the display and keypad of device 500, and sensor module 514 can be with 500 1 components of detection device 500 or device
Position change, the existence or non-existence that user contacts with device 500,500 orientation of device or acceleration/deceleration and device 500
Temperature change.Sensor module 514 may include proximity sensor, be configured to detect without any physical contact
Presence of nearby objects.Sensor module 514 can also include optical sensor, such as CMOS or ccd image sensor, at
As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors
Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 516 is configured to facilitate the communication of wired or wireless way between device 500 and other equipment.Device
500 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation
In example, communication component 516 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel.
In one exemplary embodiment, the communication component 516 further includes near-field communication (NFC) module, to promote short range communication.Example
Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology,
Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 500 can be believed by one or more application specific integrated circuit (ASIC), number
Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
It such as include the memory 504 of instruction, above-metioned instruction can be executed by the processor 518 of device 500 to complete the above method.For example,
The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk
With optical data storage devices etc..
Those skilled in the art will readily occur to other realities of the disclosure after considering specification and practicing disclosure herein
Apply scheme.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or suitable
The variation of answering property follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure or used
Use technological means.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following right
It is required that pointing out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
Claims (7)
1. a kind of method for updating system, which is characterized in that the described method includes:
The first over the air OTA packet is obtained, upgrade procedure is updated according to the first OTA packet, the upgrade procedure is used for
System is updated;
The 2nd OTA packet is obtained, the 2nd OTA packet includes the modification file for modifying the subregion of the system;
The system is restarted, by the updated upgrade procedure, according to the modification file modification bootstrap;
The system is restarted again, and the subregion is modified by the modified bootstrap;
Enter reforestation practices under the guidance of the bootstrap after the modification, by each subregion text in the 2nd OTA packet
Part is written in the modified subregion;
It is wherein, described that upgrade procedure is updated according to the first OTA packet, comprising:
It is the permission of bootstrap described in the upgrade procedure configuration modification according to the first OTA packet;
The upgrade procedure is indicated after restarting the system, according to bootstrap described in the modification file modification.
2. the method according to claim 1, wherein described by the updated upgrade procedure, according to institute
State modification file modification bootstrap, comprising:
It is decompressed by the modification file of the updated upgrade procedure to binary format;
It is written in bootstrap subregion by the boot code that the updated upgrade procedure obtains decompression, modifies institute
State bootstrap.
3. according to the method described in claim 2, it is characterized in that, described by described in the modified bootstrap modification
Subregion, comprising:
Subregion list file to be updated is generated by the modified bootstrap, in the partition table in the subregion list file
Hold the address for being used to indicate each subregion;
The subregion list file is converted into the array of predetermined format by the modified bootstrap;
After the completion of memory initialization in the bootstrap after the modification, by the modified bootstrap by institute
The subregion list file indicated by the array of predetermined format is stated to be written in the partition table of the memory.
4. a kind of system updating device, which is characterized in that described device includes:
Program update module is configured as obtaining the first over the air OTA packet, is updated and upgraded according to the first OTA packet
Program, the upgrade procedure is for being updated system;
OTA packet obtains module, is configured as obtaining the 2nd OTA packet, the 2nd OTA packet includes point for modifying the system
The modification file in area;
Modification of program module is configured as restarting the system, is obtained by described program update module updated described
Upgrade procedure obtains the modification file modification bootstrap in module according to the OTA packet;
Subregion modified module is configured as restarting the system again, is obtained by described program modified module modified
The bootstrap modifies the subregion;
File writing module is configured as entering reforestation practices under the guidance of the bootstrap after the modification, by described
Each partitioned file in two OTA packets is written in the modified subregion that the subregion modified module obtains;
Wherein, described program update module, comprising:
Submodule is configured, is configured as according to the first OTA packet being bootstrap described in the upgrade procedure configuration modification
Permission;
It indicates submodule, is configured as indicating the upgrade procedure after restarting the system, according to the modification file modification
The bootstrap.
5. device according to claim 4, which is characterized in that described program modified module, comprising:
Submodule is decompressed, is configured as carrying out by the modification file of the updated upgrade procedure to binary format
Decompression;
Submodule is modified, the guidance for decompressing the decompression submodule by the updated upgrade procedure is configured as
Program code is written in bootstrap subregion, modifies the bootstrap.
6. device according to claim 5, which is characterized in that the subregion modified module, comprising:
Submodule is generated, is configured as generating subregion list file to be updated by the modified bootstrap, described point
Partition table content in area's list file is used to indicate the address of each subregion;
Transform subblock is configured as the subregion for generating the generation submodule by the modified bootstrap
List file is converted into the array of predetermined format;
Submodule is written, is configured as after the completion of the memory initialization in the bootstrap after the modification, passes through modification
The partition table text indicated by the array for the predetermined format that the bootstrap afterwards obtains the transform subblock
Part is written in the partition table of the memory.
7. a kind of system updating device, which is characterized in that described device includes:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
The first over the air OTA packet is obtained, upgrade procedure is updated according to the first OTA packet, the upgrade procedure is used for
System is updated;
The 2nd OTA packet is obtained, the 2nd OTA packet includes the modification file for modifying the subregion of the system;
The system is restarted, by the updated upgrade procedure, according to the modification file modification bootstrap;
The system is restarted again, and the subregion is modified by the modified bootstrap;
Enter reforestation practices under the guidance of the bootstrap after the modification, by each subregion text in the 2nd OTA packet
Part is written in the modified subregion;
It is wherein, described that upgrade procedure is updated according to the first OTA packet, comprising:
It is the permission of bootstrap described in the upgrade procedure configuration modification according to the first OTA packet;
The upgrade procedure is indicated after restarting the system, according to bootstrap described in the modification file modification.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510971643.5A CN105630548B (en) | 2015-12-22 | 2015-12-22 | Method for updating system and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510971643.5A CN105630548B (en) | 2015-12-22 | 2015-12-22 | Method for updating system and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105630548A CN105630548A (en) | 2016-06-01 |
CN105630548B true CN105630548B (en) | 2019-06-21 |
Family
ID=56045529
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510971643.5A Active CN105630548B (en) | 2015-12-22 | 2015-12-22 | Method for updating system and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105630548B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107608721A (en) * | 2017-09-13 | 2018-01-19 | 北京小鸟看看科技有限公司 | Wear the upgrade method of virtual reality device and its bootstrap loader |
CN108052342A (en) * | 2017-12-12 | 2018-05-18 | 杭州华为数字技术有限公司 | Partition table restorative procedure, device and electronic equipment |
CN117873511A (en) * | 2021-07-30 | 2024-04-12 | 荣耀终端有限公司 | Operating system upgrading method, device, storage medium and computer program product |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102419713A (en) * | 2011-12-31 | 2012-04-18 | 四川长虹电器股份有限公司 | Method for upgrading software of nandflash-based set-top box |
CN103455348A (en) * | 2013-08-27 | 2013-12-18 | 小米科技有限责任公司 | Subarea adjustment method, device, terminal, server and system |
CN104375844A (en) * | 2013-08-12 | 2015-02-25 | 中兴通讯股份有限公司 | Firmware upgrading method and device |
CN104951321A (en) * | 2014-03-27 | 2015-09-30 | 宇龙计算机通信科技(深圳)有限公司 | Method and device for modifying of system configuration |
-
2015
- 2015-12-22 CN CN201510971643.5A patent/CN105630548B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102419713A (en) * | 2011-12-31 | 2012-04-18 | 四川长虹电器股份有限公司 | Method for upgrading software of nandflash-based set-top box |
CN104375844A (en) * | 2013-08-12 | 2015-02-25 | 中兴通讯股份有限公司 | Firmware upgrading method and device |
CN103455348A (en) * | 2013-08-27 | 2013-12-18 | 小米科技有限责任公司 | Subarea adjustment method, device, terminal, server and system |
CN104951321A (en) * | 2014-03-27 | 2015-09-30 | 宇龙计算机通信科技(深圳)有限公司 | Method and device for modifying of system configuration |
Non-Patent Citations (1)
Title |
---|
君正JZ4770 bootloader中对nand 进行分区;井朝天;《https://blog.csdn. net/laojing123/article/details/8465503》;20130104;第1-3页 |
Also Published As
Publication number | Publication date |
---|---|
CN105630548A (en) | 2016-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104484200B (en) | The method and device upgraded to firmware | |
CN105630546B (en) | Method for updating system and device | |
CN104951335B (en) | The processing method and processing device of application program installation kit | |
CN107967141A (en) | Operating system update method, apparatus and terminal | |
CN113110852A (en) | Firmware upgrading method and device and storage medium | |
CN105094931A (en) | Software upgrading method and device | |
CN105468410A (en) | System upgrading method and device | |
CN106528255B (en) | Kind loading method and device | |
CN104536783A (en) | Method and device for setting reserved space | |
CN106775903B (en) | Security policy file updating method and device | |
CN105306752A (en) | Method and device for generating event prompt | |
CN109558042A (en) | Show topics the method, apparatus and computer readable storage medium of skin | |
CN105630548B (en) | Method for updating system and device | |
CN105094830A (en) | Method and device for executing target functions | |
CN106547597A (en) | The control method and device of application program update | |
CN109388423A (en) | Method for upgrading software and device | |
CN105487903A (en) | System upgrading method and device | |
CN107463372A (en) | The method for updating pages and device of a kind of data-driven | |
CN110457052A (en) | Application upgrade method and device | |
CN109446796A (en) | Application control method and device, mobile terminal and storage medium | |
CN105335200A (en) | System upgrading method and device | |
CN104866340A (en) | Method and apparatus for updating terminal device software | |
CN114416127A (en) | Terminal software upgrading method, terminal software upgrading device and storage medium | |
CN104951337B (en) | File increment update method and device | |
CN107220082B (en) | Application program installation method, device and equipment |
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 |