CN103514065B - Tool automatically detects and recovers electronic installation and the method for function - Google Patents
Tool automatically detects and recovers electronic installation and the method for function Download PDFInfo
- Publication number
- CN103514065B CN103514065B CN201210221161.4A CN201210221161A CN103514065B CN 103514065 B CN103514065 B CN 103514065B CN 201210221161 A CN201210221161 A CN 201210221161A CN 103514065 B CN103514065 B CN 103514065B
- Authority
- CN
- China
- Prior art keywords
- subregion
- restored
- boot
- user data
- image file
- 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
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The detection automatically of one tool and the electronic installation of recovery function, including processing unit and memory element, memory element includes multiple subregion and image file subregion.The image file that the multiple subregion of image file partitioned storage is corresponding.Processing unit includes detection module and recovers module.Detection module is during electronic installation is opened and moved, by checking the information in boot-loader control module subregion, check that in Boot loader and Boot loader backup and kernel program are the most complete, check that system file, user data and data cached success load, and determine whether those subregions increase to a partition list to be restored.Recover module to be used for determining subregion to be restored according to this partition list to be restored, then obtain the image file that subregion to be restored is corresponding, subregion corresponding for image file write is recovered subregion to be restored.The present invention also provides for one, and detection and restoration methods, the electronic installation of the present invention and method can automatically detect problem and recover automatically.
Description
Technical field
The present invention relates to a kind of electronic installation, can start unsuccessfully or start particularly to one extremely
The electronic installation of Shi Zidong recovery and method.
Background technology
It is known that use the electronics dresses such as the smart mobile phone of Android (Android) system, panel computer
Put more and more universal.Due to opening and the ease for operation of Android system platform, win vast
The accreditation of user.Due to the opening of Android system platform, user's upgrade-system version the most voluntarily
This, but, the most professional due to user, often there is the thing generation that upgrading is failed, thus lead
Cause electronic installation cannot use.Additionally, due to some reason, such as, system file is destroyed,
Or data are destroyed, some function of electronic installation is usually in nothing in start a very long time
The state that method uses, i.e. not having startup to complete, such as, a very long time opened by electronic installation
After, external storage card (such as SD card) is constantly in card reading status, and cannot read and be stored in
Multimedia file in SD card, or media background service program cannot start, causes the user cannot
Use audio frequency and video is applied.At present, electronic installation is repaired due to upgrading failure or appliance boot failure
Mode include two kinds, first kind of way be before equipment dispatches from the factory will recover image file (recovery
Image) in an electronic, when electronic installation cannot normally start, user can be by manufacturer in solidification
The AKU provided is placed in SD card, then SD card is connected to electronic installation, restarts electricity
Sub-device, enters recovery image by pressing the shortcut (Hot Key) in description,
Read AKU recovery system, but, no matter which partial function of system goes wrong this kind of mode,
Being required for the recovery system using this AKU overall, the time needed for recovery is longer and needs user
Participate in.The second way is to realize quickly in the bootload device (Bootloader) of electronic installation
Starting (fastboot) agreement, when equipment cannot start, it is quick that user can press in description
Key (Hot Key) enters fast attack mode.Connect devices to electricity by USB data line simultaneously
On brain, computer needs USB is installed and drive and Android SDK (software development
Kit, SDK), then leave the image file that manufacturer provides in computer, pass through
Quickly image file is sent and is burnt to electronic installation, then according to image file weight by startup instrument
Newly recover electronic apparatus system.But, the risk of this kind of mode is high, needs user to have certain
Technical background knowledge, is poorly suited for domestic consumer.
Summary of the invention
In view of this, the present invention provides a kind of electronic installation that can automatically detect and recover and method,
Automatically can recover when the system upgrade failure of electronic installation or a certain function on failure.
A kind of electronic installation having detection automatically and recovering function, deposits including a processing unit and one
Storage unit, the partition table of the information such as address and content that this memory element includes storing each subregion
Subregion, storage have the Boot loader subregion of Boot loader, storage to have Boot loader
Boot loader backup subregion, storage have kernel program kernel subregion, storage have guiding dress
Carry the boot-loader control module subregion of control module, storage has data cached cache partitions, deposits
Contain the system file subregion of system file and storage have user data user data subregion and
One image file subregion.This image file partitioned storage has Boot loader subregion, kernel to divide
Image file that district, cache partitions, system file subregion, user data subregion are corresponding and each
The concordance list of image file, this concordance list includes image file title, the storage that image file is corresponding
First address and byte length.This processing unit includes that a detection module and recovers module.Should
Detection module is in electronic device startup start-up course, by checking boot-loader control module subregion
In information determine whether to increase to system file subregion one partition list to be restored, by check
Boot loader and Boot loader backup the most completely determine whether to divide Boot loader
District or Boot loader backup subregion increase to partition list to be restored, by checking kernel program
The most completely determine whether kernel subregion is increased to partition list to be restored, by checking system literary composition
Part success loads and determines whether system file subregion is increased to partition list to be restored, passes through
Check that fruit user data success loads to determine whether user data subregion is increased to be restored point
District's list, and determine whether to increase cache partitions by checking that data cached success loads
To partition list to be restored, thus generate the partition list to be restored after a renewal.This recovery module
For obtaining the partition list to be restored that detection module updates, and judge that partition list to be restored is not
Time empty, determine subregion to be restored according to this partition list to be restored, then from image file subregion
Middle reading concordance list, determines the storage head ground of image file that subregion to be restored is corresponding according to concordance list
Location and byte length, thus obtain the image file that subregion to be restored is corresponding, this recovery module is also used
In the subregion by image file write correspondence corresponding for subregion to be restored, thus recover this to be restored point
District, this recovery module, also after having recovered all subregions to be restored, controls to start this electronics dress
Put.
A kind of electronic installation having detection automatically and recovering function, deposits including a processing unit and one
Storage unit, this memory element include address and the content storing each subregion partition table subregion,
Storage has the Boot loader subregion of Boot loader, storage to have the guiding of Boot loader
Load module backup subregion, storage have the kernel subregion of kernel program, storage to have boot-loader control
The boot-loader control module subregion of module, storage have data cached cache partitions, storage to have
The system file subregion of system file and storage have the user data subregion of user data, and this guiding fills
Carry the writable information of control module.This memory element also includes an image file subregion, this mirror image literary composition
Part partitioned storage has Boot loader subregion, kernel subregion, cache partitions, system file to divide
Image file that district, user data subregion are corresponding and the concordance list of each image file, this index
Table includes image file title, address that image file is corresponding and byte length.This processing unit
Module is recovered including a detection module and one.This detection module includes subregion to be restored row
Table, this partition list to be restored is initially empty, and this detection module is used for after starting up, successively
Detect multiple key service, and detect and whether have key service not start within a scheduled time,
If it is determined that there is key service not start within this scheduled time, if it is determined that in this scheduled time
Inside there is key service not start, this recovery system order is write boot-loader control module subregion
In boot-loader control module, and control restart this electronic installation;This detection module is also at electronics
Detect time boot-loader control module has recovery system order during device starting up, by system
Partitions of file increases to partition list to be restored.This recovery module is used for obtaining subregion to be restored row
Table, and judge partition list to be restored not as time empty, determine according to this partition list to be restored treat extensive
Multiple subregion, then reads concordance list from image file subregion, determines according to concordance list to be restored
The storage first address of the image file that subregion is corresponding and byte length, thus obtain subregion pair to be restored
The image file answered, this recovery module is additionally operable to right for image file write corresponding for subregion to be restored
The subregion answered, thus recover this subregion to be restored, this recovery module is also recovering all to be restored
Subregion after, control start this electronic installation.
A kind of detection and restoration methods automatically, including step: when electronic device startup starts, inspection
Survey and be stored in the boot-loader control module of boot-loader control module subregion whether have recovery system
Order;If it is, system file subregion is increased to partition list to be restored then detect guiding
Boot loader in load module subregion and the boot-loader in Boot loader backup subregion
Program backup is the most complete, otherwise, and the directly boot-loader journey in detection Boot loader subregion
Boot loader backup in sequence and Boot loader backup subregion is the most complete;If detection
Boot loader and/or Boot loader backup imperfect, then by Boot loader subregion and/
Or Boot loader backup subregion increases to partition list to be restored, then in detection kernel subregion
Kernel program whether complete, otherwise, directly detect the kernel program in kernel subregion the completeest
Whole;If the kernel program in kernel subregion is imperfect, then kernel subregion is increased to be restored point
District's list, then the system file success in detecting system partitions of file loads, otherwise, directly
Connect whether the system file in detecting system partitions of file can successfully load;If system file can not
Success loads, then detect user data after system file subregion being increased to partition list to be restored and divide
User data success in district loads, otherwise, and the directly user in detection user data subregion
Data success loads;If user data can not successfully load, then user data subregion is increased
Add to partition list to be restored, then proceed to the data cached success dress detecting in cache partitions
Carrying, otherwise, directly the data cached success in detection cache partitions loads;If caching number
According to can not successfully load, then cache partitions is increased to partition list to be restored, thus generates one more
Partition list to be restored after Xin;Obtain the subregion to be restored row that detection module updates;Judge that this is treated
Recover whether partition list is empty;If partition list to be restored is empty, then open electronic installation,
Otherwise, subregion to be restored is determined according to this partition list to be restored;From from image file subregion
Read concordance list, determine the storage first address of image file that subregion to be restored is corresponding according to concordance list
And byte length, thus obtain the image file that subregion to be restored is corresponding;Subregion to be restored is corresponding
Subregion corresponding to image file write, thus recover this subregion to be restored;Judge whether to need
Recover subregion not recover, and when judging not have subregion to be restored not recover, start this electronics dress
Put.
A kind of detection and restoration methods automatically, including step: after starting up, detection is many successively
Individual key service, and detect and whether have key service not start within a scheduled time;If sentenced
Break and have key service not start within this scheduled time, then this recovery system order write is guided
Load the boot-loader control module in control module subregion, and control to restart this electronic installation;?
Electronic device startup detects when starting when having recovery system order in boot-loader control module, will
System file subregion increases to partition list to be restored;Obtain partition list to be restored;Judgement is treated extensive
When multiple partition list is not empty, determine subregion to be restored according to this partition list to be restored;From mirror
As partitions of file reads concordance list, determine, according to concordance list, the image file that subregion to be restored is corresponding
Storage first address and byte length, thus obtain the image file that subregion to be restored is corresponding;To treat
Recover the subregion that image file write corresponding to subregion is corresponding, thus recover this subregion to be restored.
The tool of the present invention automatically detects and recovers electronic installation and the method for function, can automatically detect
Startup item/the functional software of problem also recovers voluntarily.
Accompanying drawing explanation
Fig. 1 is tool detection automatically and the electronic installation of recovery function in first embodiment of the invention
Functional block diagram.
Fig. 2 is tool detection automatically and the electronic installation of recovery function in first embodiment of the invention
The subregion schematic diagram of memory element.
Fig. 3 is the automatic detection in first embodiment of the invention in electronic device startup start-up course
The flow chart of method.
Each image file that Fig. 4 is stored by image file subregion in first embodiment of the invention
Concordance list schematic diagram.
Fig. 5 is the flow chart of the automatic recovery method of electronic installation in first embodiment of the invention.
Fig. 6 is for detection to each key service after starting up in first embodiment of the invention
The flow chart of method.
Fig. 7 is the method flow diagram of user data automated back-up in first embodiment of the invention.
Main element symbol description
Following detailed description of the invention will further illustrate the present invention in conjunction with above-mentioned accompanying drawing.
Detailed description of the invention
See also Fig. 1-3, a kind of have detection automatically and recover function electronic installation 100 (with
It is referred to as down electronic installation 100) include a processing unit 1 and memory element 2.Wherein, processing unit
1 includes detection module 10 and recovers module 11.Wherein, this electronic installation 100 is for having Android behaviour
Make the electronic installation of system.
As in figure 2 it is shown, memory element 2 has been divided into multiple subregion, including partition table subregion 20, guide
Load module (bootloader) subregion 21, Boot loader backup (bootloader
Backup) subregion 22, kernel (Kernel) subregion 23, boot-loader control module (boot
Loader control block, BCB) subregion 24, cache partitions 25, system file subregion 26, use
User data subregion 27 and image file subregion 28.Wherein, this memory element 2 is read only memory
(ROM), the subregion of this memory element 2 is divided before electronic installation 100 dispatches from the factory by manufacturer.
Wherein, partition table subregion 20 is for storing the information such as address and the content of each subregion.Draw
Leading load module subregion 21 storage and have Boot loader, the initialization for Android system starts.
Boot loader backup subregion 22 is for storing the Backup Data of Boot loader, this backup number
According to completely the same with the Boot loader that Boot loader subregion 21 stores, thus guiding dress
When load program is destroyed, can carry out initializing startup by the backup of Boot loader.Guide
Load control module subregion 24 for storage one boot-loader control module.Cache partitions 25 is used for depositing
Store up data cached.System file subregion 26 is used for storing system file, such as Android system file.
User data subregion 27 uses each application program of this electronic installation 100 to produce for storing user
Data, such as note, call record etc..
Image file subregion 28 is used for storing this Boot loader subregion 21, kernel subregion 23, delaying
Deposit subregion 25, system file subregion 26 and the image file corresponding to user data subregion 27.
Seeing also Fig. 3, Fig. 3 is the automatic testing method during electronic installation 100 starting up
Schematic diagram.First, when electronic device startup starts, detection module 10 reads boot-loader control
Information (S401) in molding block subregion 24.
Detection module 10 detection is stored in the boot-loader of boot-loader control module subregion 24 and controls mould
Whether block has recovery system order (S402).
If it is, system file subregion 26 is increased to a partition list to be restored by detection module 10
(S403), otherwise, detection module 10 continuation detection this Boot loader started non-divides
Boot loader in district 21 or the Boot loader in Boot loader backup subregion 22 are standby
Part is the most complete (S404).Wherein, this partition list to be restored is pre-stored within this detection module
In 10, and time initial, partition list to be restored is empty.Wherein, when electronic device startup starts,
One of them in this Boot loader and Boot loader backup only can be used to start, and
Another, the most non-this initializes the loading formula used by starting then for detected object.
If be detected that this Boot loader started non-or Boot loader cannot back up completely
Whole, then detection module 10 is by non-this Boot loader subregion started or Boot loader
Backup subregion increases to partition list to be restored (S405), and otherwise, detection module 10 continues detection
Kernel program in kernel subregion 23 is the most complete (S406).
If the kernel program in kernel subregion 23 is imperfect, then detection module 10 is by kernel subregion 23
Increasing to partition list to be restored (S407), otherwise, detection module 10 continues detecting system file
System file success in subregion 26 loads (S408).
If system file can not successfully load, then system file subregion 26 is increased by detection module 10
To partition list to be restored (S409), otherwise, detection module 10 continues detection user data subregion
User data success in 27 loads (S410).
If user data can not successfully load, then user data subregion 27 is increased by detection module 10
To partition list to be restored (S411), otherwise, during detection module 10 continues detection cache partitions 25
Data cached success load (S412).
If can not successfully load data cached, then cache partitions 25 is increased to treat by detection module 10
Recover partition list (S413).
Wherein, the success such as detection module 10 detecting system file, user data loads, and is logical
The mode crossing mount detects, and due to for prior art, therefore does not repeats at this.
Obviously, as it is shown on figure 3, arranging when a certain subregion is increased to subregion to be restored by detection module 10
After table, continue to detect the data of next subregion.
Thus, during electronic installation 100 starting up, detection module 10 guides dress by checking
The information carried in control module subregion 24 determines whether system file subregion 26 is increased to be restored point
District's list, by checking that Boot loader and Boot loader backup the most completely determine whether
Boot loader subregion 21 or Boot loader are backed up subregion 22 and increases to subregion to be restored row
Table, by checking that kernel program the most completely determines whether kernel subregion 23 is increased to be restored point
District's list, determines whether to increase system file subregion 26 by checking that system file success loads
Add to partition list to be restored, by check fruit user data success load determine whether by with
User data subregion 27 increases to partition list to be restored, and by checking data cached success
Loading determines whether cache partitions 25 is increased to partition list to be restored.Thus it is final to generate one
Partition list to be restored.
See also Fig. 4-5.Image file subregion 28 also stores the index of each image file
Table, Fig. 4 is the concordance list schematic diagram of each image file that image file subregion 28 is stored.Should
Concordance list includes image file title, storage first address that image file is corresponding and byte length.
In the present embodiment, the title of the image file that each subregion is corresponding and the title of subregion are consistent.
As it is shown in figure 5, be the signal of the automatic recovery method during electronic installation 100 starting up
Figure, first, recovers module 11 and obtains the partition list to be restored that detection module 10 updates
(S601)。
Then, recover module 11 and judge whether this partition list to be restored is empty (S602).
If sky, then step jumps to step S607, otherwise, recovers module 11 and treats extensive according to this
Multiple partition list determines subregion (S603) to be restored.
Recover module 11 from from image file subregion read concordance list, determine according to concordance list treat extensive
The address of the image file that subdivision district is corresponding and byte length, thus it is corresponding to obtain subregion to be restored
Image file (S604).
Recover the module 11 subregion by image file write correspondence corresponding for subregion to be restored, thus extensive
This subregion to be restored (S605) multiple.
Recover module 11 and judge whether that needing to recover subregion does not recovers (S606).
If it has, then step is back to step S604, otherwise start this electronic installation 100
(S607)。
Obviously, when this recovery module 11 is when recovering those subregions, display screen (figure can be controlled simultaneously
In do not show) show the process of this recovery.
See also Fig. 6, for detection to each key service after electronic installation 100 starting up
Method schematic diagram.Wherein, each key service is that the electronic installation 100 of system default works required
Necessary service, the management service of such as SD card, media background service etc..
After starting up, detection module 10 also depended on (in such as two minutes) within a scheduled time
Whether each key service of secondary detection successfully starts up, and generates corresponding testing result (S701).
Wherein, the detection time of all key service is less than this scheduled time, and detection module 10 detects phase
The key service answered successfully starts up, and generates the testing result successfully started up, otherwise generates and start unsuccessfully
Testing result.
It is then detected that module 10 judges according to testing result after all of key service detects
Key service whether is had to start unsuccessfully (S702).
If all key service start successfully, then flow process terminates, and loses if there being key service to start
Losing, detection module 10 continues to judge that whether detection time is less than this scheduled time (S703).
If whether detection time is less than this scheduled time, then flow process returns step S701, no
Then, detection module 10 is by drawing in this recovery system order write boot-loader control module subregion 24
Lead loading control module, and control to restart this electronic installation 100 (S704).
Obviously, after electronic installation 100 is restarted, as it was previously stated, in the startup of electronic installation 100
Cheng Zhong, owing to there being recovery system order in boot-loader control module, then detection module 10 is by system
Partitions of file 26 increases to partition list to be restored, thus passes through the automatic of aforesaid electronic installation 100
Restoration methods and repair system file subregion is recovered this at least one start the merit of time-out
Can software.
In other embodiments, this detection module 10 judges there is at least one key in the given time
When service can not start, then system file subregion is increased to partition list to be restored, and controls weight
Opening electronic installation 100, in the start-up course of electronic installation 100, this detection module is not to other points
District is detected.Thus recover module 11 and obtain partition list to be restored, according to this subregion to be restored
List determines that subregion to be restored is system file subregion 26, then obtains system file subregion 26 right
The image file answered, by image file writing system partitions of file 26 corresponding for system file subregion,
Thus recover this system file subregion 26, then control to start this electronic installation 100.Thus, complete
Can not the recovery of starting problem to some or multiple key service.
See also Fig. 7, in present embodiment, the method flow of user data automated back-up
Figure.Wherein, this processing unit 1 also includes a backup module 12, and this backup module 12 is at interval of predetermined
Time (such as half an hour) has detected whether that data transmit (S801), and wherein, this output passes
The defeated USB data transmission that includes, and entered by networks such as bluetooth, wifi and GSM, CDMA
The wireless data transmission of row.
If it is determined that there are data to transmit, then flow process terminates, and otherwise, backup module 12 continues to judge to show
Whether display screen (not shown) is in locking/sleep state (S802).
If display screen is not in lock-out state, then explanation user is using this electronic installation 100, then
Flow process terminates, and otherwise, backup module 12 continues the user data in multilevel iudge user data subregion
And the data of the image file that this user data subregion is corresponding are the most consistent in image file subregion
(S803)。
If consistent, then flow process terminates, and otherwise, backup module 12 will be somebody's turn to do in this image file subregion
The data of the image file that user data subregion is corresponding are updated to the number of users in this user data subregion
According to (S804).That is, during backup module 12 makes image file subregion, this user data subregion is corresponding
Image file data with in user data subregion user data keep consistent.
Thus, this data backup can electronic installation 100 be in free time stage (be not user-operably
The stage used) carry out, do not affect the serviceability of electronic installation 100.
Obviously, in the present invention, this memory element 2 also includes a media file subregion, this detection module
10 also can continue to detect this media file and divide when starting up after having detected cache partitions 25
District, this image file subregion 28 includes the image file of media file subregion equally, and is finding matchmaker
When body file loads unsuccessfully, media file subregion is carried out by the image file corresponding by media file
Recover.
The tool of the present invention automatically detects and recovers electronic installation and the method for function, can automatically detect
Startup item/the functional software of problem also recovers voluntarily.
Claims (13)
1. tool detection automatically and an electronic installation for recovery function, single including a processing unit and a storage
Unit, this memory element includes that the partition table subregion of the address storing each subregion and content, storage have guiding
The Boot loader subregion of load module, storage have the Boot loader backup that Boot loader backs up
Subregion, storage have the kernel subregion of kernel program, storage to have the boot-loader of boot-loader control module to control
Module subregion, storage have data cached cache partitions, storage have system file system file subregion and
Storage has the user data subregion of user data, and this writable information of boot-loader control module, its feature exists
In:
This memory element also includes an image file subregion, and this image file partitioned storage has Boot loader
Image file corresponding to subregion, kernel subregion, cache partitions, system file subregion, user data subregion with
And the concordance list of each image file, this concordance list includes image file title, the address that image file is corresponding
And byte length;
This processing unit includes:
One detection module, includes a partition list to be restored, and this partition list to be restored is initially empty, should
Detection module is in electronic device startup start-up course, by checking the guiding of boot-loader control module subregion
The information loaded in control module determines whether to increase to system file subregion one partition list to be restored, logical
Cross and check that the Boot loader of non-start up or Boot loader backup the most completely determine whether to open non-
The Boot loader subregion employed or Boot loader backup subregion increase to partition list to be restored, logical
Cross inspection kernel program the most completely to determine whether kernel subregion is increased to partition list to be restored, by inspection
Look into system file success loading to determine whether system file subregion is increased to partition list to be restored, logical
Cross inspection user data success loading to determine whether user data subregion increases to subregion to be restored row
Table, and determine whether to increase to cache partitions to be restored point by checking that data cached success loads
District's list, thus generate the partition list to be restored after a renewal;
One recovers module, for obtaining the partition list to be restored that detection module updates, and judges to be restored point
When district's list is not empty, determine subregion to be restored, then from image file according to this partition list to be restored
Subregion reads concordance list, determines address and the byte of image file that subregion to be restored is corresponding according to concordance list
Length, thus obtain the image file that subregion to be restored is corresponding, this recovery module is additionally operable to subregion to be restored
The subregion that corresponding image file write is corresponding, thus recover this subregion to be restored, this recovery module is also extensive
After having answered all subregions to be restored, control to start this electronic installation.
2. tool as claimed in claim 1 detection automatically and the electronic installation of recovery function, it is characterised in that institute
State detection module and be additionally operable to after starting up, detect multiple key service successively, and detect in a pre-timing
In whether have key service not start, if it is determined that there is key service not start within this scheduled time,
Then the boot-loader in recovery system order write boot-loader control module subregion is controlled mould by detection module
Block, and control to restart this electronic installation.
3. tool as claimed in claim 1 detection automatically and the electronic installation of recovery function, it is characterised in that institute
Stating detection module to be additionally operable to, when electronic device startup starts, detection is stored in boot-loader control module and divides
Whether the boot-loader control module in district there is recovery system order;
If it is, system file subregion is increased to partition list to be restored then detect Boot loader
Boot loader in subregion or the Boot loader backup in Boot loader backup subregion are the completeest
Whole, otherwise, the directly Boot loader in detection Boot loader subregion or Boot loader backup
Boot loader backup in subregion is the most complete;
If detection Boot loader or Boot loader backup are imperfect, the most correspondingly by boot-loader
Program sectioning or Boot loader backup subregion increase to partition list to be restored, then detection kernel subregion
In kernel program whether complete, otherwise, directly detect the kernel program in kernel subregion the most complete;
If the kernel program in kernel subregion is imperfect, then kernel subregion is increased to partition list to be restored,
Then the system file success in detecting system partitions of file loads, otherwise, and direct detecting system file
System file success in subregion loads;
If system file can not successfully load, then after system file subregion being increased to partition list to be restored
User data success in detection user data subregion loads, otherwise, and directly detection user data subregion
In user data success load;
If user data can not successfully load, then user data subregion is increased to partition list to be restored,
The data cached success then proceeding to detect in cache partitions loads, and otherwise, directly detects cache partitions
In data cached success load;
Can not successfully load if data cached, then cache partitions is increased to partition list to be restored, thus
Generate the partition list to be restored after a renewal.
4. tool as claimed in claim 1 detection automatically and the electronic installation of recovery function, it is characterised in that should
Processing unit also includes a backup module, and this backup module is after opening at electronic installation, at interval of predetermined
Whether time detecting has data to transmit, if it is determined that no data transmission, then backup module continues to judge display screen
Whether being in locking/sleep state, if display screen is in the lock state, then backup module continues multilevel iudge
The mirror image literary composition that in user data in user data subregion and image file subregion, this user data subregion is corresponding
Whether the data of part are consistent, backup module when comparative result is inconsistent, by this image file subregion
The data of the image file that this user data subregion is corresponding are updated to the user data in this user data subregion.
5. tool as claimed in claim 4 detection automatically and the electronic installation of recovery function, it is characterised in that should
Data transmission includes USB data transmission, and is carried out by bluetooth, wifi, GSM or cdma network
Wireless data transmission.
6. tool detection automatically and an electronic installation for recovery function, single including a processing unit and a storage
Unit, this memory element includes that the partition table subregion of the address storing each subregion and content, storage have guiding
The Boot loader subregion of load module, storage have the Boot loader backup that Boot loader backs up
Subregion, storage have the kernel subregion of kernel program, storage to have the boot-loader of boot-loader control module to control
Module subregion, storage have data cached cache partitions, storage have system file system file subregion and
Storage has the user data subregion of user data, and this writable information of boot-loader control module, its feature exists
In:
This memory element also includes an image file subregion, and this image file partitioned storage has Boot loader
Image file corresponding to subregion, kernel subregion, cache partitions, system file subregion, user data subregion with
And the concordance list of each image file, this concordance list includes image file title, the address that image file is corresponding
And byte length;
This processing unit includes:
One detection module, includes a partition list to be restored, and this partition list to be restored is initially empty, should
Detection module, for after starting up, detects multiple key service successively, and detects within a scheduled time
Have key service not start, then recovery system order is write boot-loader control module subregion by detection module
In boot-loader control module, and control restart this electronic installation, wherein, this detection module is also at electronics
Detect time boot-loader control module has recovery system order during device starting up, system file is divided
District increases to partition list to be restored;
One recovers module, is used for obtaining partition list to be restored, and when judging partition list to be restored not as sky,
Determine subregion to be restored according to this partition list to be restored, from image file subregion, then read concordance list,
Determine address and the byte length of image file that subregion to be restored is corresponding according to concordance list, thus obtain treat extensive
The image file that subdivision district is corresponding, this recovery module is additionally operable to image file write corresponding for subregion to be restored
Corresponding subregion, thus recover this subregion to be restored, this recovery module is also recovering all to be restored dividing
Qu Hou, controls to start this electronic installation.
7. tool as claimed in claim 6 detection automatically and the electronic installation of recovery function, it is characterised in that should
Processing unit also includes a backup module, and this backup module is after opening at electronic installation, at interval of predetermined
Whether time detecting has data to transmit, if it is determined that no data transmission, then backup module continues to judge display screen
Whether being in locking/sleep state, if display screen is in the lock state, then backup module continues multilevel iudge
The mirror image literary composition that in user data in user data subregion and image file subregion, this user data subregion is corresponding
Whether the data of part are consistent, backup module when comparative result is inconsistent, by this image file subregion
The data of the image file that this user data subregion is corresponding are updated to the user data in this user data subregion.
8. tool as claimed in claim 7 detection automatically and the electronic installation of recovery function, it is characterised in that should
Data transmission includes USB data transmission, and is carried out by bluetooth, wifi, GSM or cdma network
Wireless data transmission.
9. automatic detection and a restoration methods, in electronic installation as claimed in claim 1, its feature
Being, the method comprising the steps of:
When electronic device startup starts, detection is stored in the boot-loader control of boot-loader control module subregion
Whether molding block has recovery system order;
If it is, system file subregion is increased to partition list to be restored then detect Boot loader
Boot loader in subregion or the Boot loader backup in Boot loader backup subregion are the completeest
Whole, otherwise, the directly Boot loader in detection Boot loader subregion or Boot loader backup
Boot loader backup in subregion is the most complete;
If detection Boot loader or Boot loader backup are imperfect, the most correspondingly by boot-loader
Program sectioning or Boot loader backup subregion increase to partition list to be restored, then detection kernel subregion
In kernel program whether complete, otherwise, directly detect the kernel program in kernel subregion the most complete;
If the kernel program in kernel subregion is imperfect, then kernel subregion is increased to partition list to be restored,
Then the system file success in detecting system partitions of file loads, otherwise, and direct detecting system file
System file success in subregion loads;
If system file can not successfully load, then after system file subregion being increased to partition list to be restored
User data success in detection user data subregion loads, otherwise, and directly detection user data subregion
In user data success load;
If user data can not successfully load, then user data subregion is increased to partition list to be restored,
The data cached success then proceeding to detect in cache partitions loads, and otherwise, directly detects cache partitions
In data cached success load;
Can not successfully load if data cached, then cache partitions is increased to partition list to be restored, thus
Generate the partition list to be restored after a renewal;
Obtain the subregion to be restored row that detection module updates;
Judge whether this partition list to be restored is empty;
If partition list to be restored is empty, then opens electronic installation, otherwise, arrange according to this subregion to be restored
Table determines subregion to be restored;
From reading concordance list from image file subregion, determine, according to concordance list, the mirror image that subregion to be restored is corresponding
The storage first address of file and byte length, thus obtain the image file that subregion to be restored is corresponding;
By subregion corresponding for image file write corresponding for subregion to be restored, thus recover this subregion to be restored;
Judge whether that needing to recover subregion does not recovers, and when judging not have subregion to be restored not recover, open
This electronic installation dynamic.
10. detection and restoration methods automatically as claimed in claim 9, it is characterised in that described method is also wrapped
Include step:
Detect multiple key service successively, and detect and whether have key service not start within a scheduled time;
If it is determined that there is key service not start within this scheduled time, then detection module is by this recovery system
Boot-loader control module in order write boot-loader control module subregion;And
Control to restart this electronic installation.
11. detection and restoration methods automatically as claimed in claim 9, it is characterised in that the method also includes
Step:
After electronic installation is opened, detect whether that data are transmitted at interval of the scheduled time;
If it is determined that no data transmission, then continue to judge whether display screen is in locking/sleep state;
Use if display screen is in the lock state, then during backup module continues multilevel iudge user data subregion
In user data and image file subregion, the data of the image file that this user data subregion is corresponding are the most consistent;
When comparative result is inconsistent, by mirror image corresponding for this user data subregion in this image file subregion
The data of file are updated to the user data in this user data subregion.
12. 1 kinds of automatic detections and restoration methods, in electronic installation as claimed in claim 6, the party
Method includes step:
After starting up, detect multiple key service successively, and detect within a scheduled time the most relevant
Key service can not start;
If it is determined that there is key service not start within this scheduled time, this recovery system order write is drawn
Lead the boot-loader control module loaded in control module subregion, and control to restart this electronic installation;
Detect time boot-loader control module has recovery system order when electronic device startup starts, will
System file subregion increases to partition list to be restored;
Obtain partition list to be restored;
Judge that partition list to be restored is not as, time empty, determining subregion to be restored according to this partition list to be restored;
From image file subregion, read concordance list, determine, according to concordance list, the mirror image literary composition that subregion to be restored is corresponding
The storage first address of part and byte length, thus obtain the image file that subregion to be restored is corresponding;
By subregion corresponding for image file write corresponding for subregion to be restored, thus recover this subregion to be restored.
13. detection and restoration methods automatically as claimed in claim 12, it is characterised in that the method also includes
Step:
After electronic installation is opened, detect whether that data are transmitted at interval of the scheduled time;
If it is determined that no data transmission, then continue to judge whether display screen is in locking/sleep state;
Use if display screen is in the lock state, then during backup module continues multilevel iudge user data subregion
In user data and image file subregion, the data of the image file that this user data subregion is corresponding are the most consistent;
When comparative result is inconsistent, by mirror image corresponding for this user data subregion in this image file subregion
The data of file are updated to the user data in this user data subregion.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210221161.4A CN103514065B (en) | 2012-06-29 | 2012-06-29 | Tool automatically detects and recovers electronic installation and the method for function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210221161.4A CN103514065B (en) | 2012-06-29 | 2012-06-29 | Tool automatically detects and recovers electronic installation and the method for function |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103514065A CN103514065A (en) | 2014-01-15 |
CN103514065B true CN103514065B (en) | 2016-08-10 |
Family
ID=49896830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210221161.4A Active CN103514065B (en) | 2012-06-29 | 2012-06-29 | Tool automatically detects and recovers electronic installation and the method for function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103514065B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104932908B (en) * | 2014-03-18 | 2018-08-28 | 珠海全志科技股份有限公司 | Brush machine method and system |
CN104216800A (en) * | 2014-08-27 | 2014-12-17 | 福建星网视易信息系统有限公司 | Automatic system fault recovering method and device based on data redundancy |
CN104298618B (en) * | 2014-09-10 | 2018-03-13 | 青岛海信移动通信技术股份有限公司 | The command handling method and device of a kind of intelligent terminal |
CN105590065B (en) * | 2014-10-21 | 2020-07-31 | 南京中兴新软件有限责任公司 | Method and device for protecting preset file |
CN104679554B (en) * | 2014-12-26 | 2018-04-17 | 苏州佳世达电通有限公司 | Operating system update method |
CN104850472B (en) * | 2015-05-18 | 2018-07-20 | 西安诺瓦电子科技有限公司 | System software backup and reduction method and apparatus |
CN107357682A (en) * | 2017-06-27 | 2017-11-17 | 苏州蜗牛数字科技股份有限公司 | A kind of method and device for recovering to go back original system |
CN109408282B (en) * | 2018-08-31 | 2022-05-27 | 深圳市有方科技股份有限公司 | Application program backup recovery method and device and computer readable storage medium |
CN109358864A (en) * | 2018-12-13 | 2019-02-19 | 晶晨半导体(上海)股份有限公司 | Method for upgrading system and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1818869A (en) * | 2006-03-15 | 2006-08-16 | 浙江大学 | Mirror starting optimization of built-in operation system |
CN1825283A (en) * | 2006-03-31 | 2006-08-30 | 浙江大学 | Method for implementing hardware image starting optimizing of embedded operating system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7865775B2 (en) * | 2008-03-27 | 2011-01-04 | Intel Corporation | Remote firmware recovery |
US8381021B2 (en) * | 2010-08-25 | 2013-02-19 | Itron, Inc. | System and method for automated unattended recovery for remotely deployed intelligent communication devices |
-
2012
- 2012-06-29 CN CN201210221161.4A patent/CN103514065B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1818869A (en) * | 2006-03-15 | 2006-08-16 | 浙江大学 | Mirror starting optimization of built-in operation system |
CN1825283A (en) * | 2006-03-31 | 2006-08-30 | 浙江大学 | Method for implementing hardware image starting optimizing of embedded operating system |
Also Published As
Publication number | Publication date |
---|---|
CN103514065A (en) | 2014-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103514065B (en) | Tool automatically detects and recovers electronic installation and the method for function | |
CN101436138B (en) | Control device and control method for software upgrade and dynamic rolling back | |
CN105144074B (en) | It is stored using the block of hybrid memory device | |
CN105094927B (en) | A kind of device firmware upgrade method and apparatus | |
CN105975864A (en) | Operation system starting method and device, and terminal | |
CN105607972B (en) | A kind of method and device repaired extremely | |
CN105183517A (en) | Method and device for mounting external storage equipment in recovery mode and electronic device | |
KR20110022146A (en) | Apparatus and method for booting hibernation in portable terminal | |
CN106649098A (en) | Method and device for achieving version-release-software debugging on terminal device | |
CN102609290B (en) | The method for upgrading software of electronic product | |
CN110119623A (en) | A kind of credible main board implementation method for realizing that firmware is actively measured using TPCM | |
CN108282697A (en) | A kind of smart television starts method, apparatus, electronic equipment and storage medium | |
CN103309751A (en) | Apparatus and method of terminal for providing file system function | |
CN107656750A (en) | Update of plug-in method and device | |
CN109783390A (en) | PSU firmware promotion and demotion stability test method, apparatus, terminal and storage medium | |
CN109344104A (en) | Electronic equipment and method for transmitting signals | |
CN104199726A (en) | Device function extension method and device | |
CN102314355A (en) | E-book reader and upgrade method thereof | |
CN103365684B (en) | Updating method and multi-domain embedded system | |
CN111381892A (en) | Data processing method, device, equipment and machine readable medium | |
CN112084064B (en) | Master-slave BIOS switching method, board card and equipment | |
CN117608619A (en) | Updating method, updating system, electronic device and storage medium of UEFI BIOS firmware | |
CN106844261A (en) | The method and apparatus of hot plug is realized in recovery mode | |
EP4220406A1 (en) | Action undo service based on cloud platform | |
CN101727333A (en) | Method for updating firmware in microprocessor and firmware updating system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20180226 Address after: Shanghai City, Songjiang Export Processing Zone South Road No. 1925 Patentee after: Ambit Microsystems (Shanghai) Co., Ltd. Address before: 201613 Shanghai City, Songjiang District Songjiang Export Processing Zone South Road No. 1925 Co-patentee before: Hon Hai Precision Industry Co., Ltd. Patentee before: Ambit Microsystems (Shanghai) Co., Ltd. |