Summary of the invention
It is an object of the invention to provide a kind of Android system backup method during upgrading, device and be correlated withEquipment, supports that Android system OTA upgrade unsuccessfully rollback function, raising user satisfaction.
For achieving the above object, the present invention proposes the backup method that a kind of Android system is during upgrading, bagInclude:
Specify one piece of region as virtual flash disk in the internal memory of mobile device of Android system is installedRAM DISK, and the over the air OTA upgrade-system kernel of Android system is set operationallySupport described virtual flash disk RAM DISK;
Add the capacity of described virtual flash disk RAM DISK to described OTA upgrade-system kernelStart-up parameter in;
Described virtual flash disk RAM DISK is formatted as and the file system of described mobile deviceThe form that form is identical, and will format after virtual flash disk RAM DISK be mounted to described shiftingIn the backup directory of dynamic equipment;
Before the Android system of described mobile device of upgrading, by original Android system of described mobile deviceFile backup is in the backup directory of described mobile device.
Further, said method also can have the characteristics that, also includes:
In the case of the OTA of the Android system of described mobile device upgrades unsuccessfully, use described movementThe Android system of mobile device described in original Android system file access pattern of backup in the backup directory of equipmentSystem.
Further, said method also can have the characteristics that, described in the movement installing Android systemThe internal memory of equipment is specified one piece of region include as virtual flash disk RAM DISK:
Original Android system file according to described mobile device take capacity and described mobile deviceThe currently used situation of internal memory determine the capacity of described virtual flash disk RAM DISK.
Further, said method also can have the characteristics that, the file system lattice of described mobile deviceFormula is that second filial generation extension file system ext2 form, New Technology File System NTFS format, file divideJoin table FAT form or 32 file allocation table FAT32 forms.
The backup method that the Android system of the embodiment of the present invention is during upgrading, solves Android system and upgradedThe problem needing Large Copacity backup space in journey, thus upgrade unsuccessfully return for realizing Android system OTARolling function provides support, improves user satisfaction, also reduces the one-tenth of mobile phone post-sale support simultaneouslyThis.
For achieving the above object, the invention allows for the back-up device that a kind of Android system is during upgrading,Module be set including be sequentially connected, add module, carry module and backup module, wherein:
Described module is set, for specifying one piece of district in installing the internal memory of mobile device of Android systemTerritory is as virtual flash disk RAM DISK, and arranges the over the air OTA liter of Android systemLevel system kernel operationally supports described virtual flash disk RAM DISK;
Described interpolation module, for adding the capacity of described virtual flash disk RAM DISK to instituteState in the start-up parameter of OTA upgrade-system kernel;
Described carry module, for being formatted as described virtual flash disk RAM DISK with describedThe form that the file system format of mobile device is identical, and the virtual flash disk RAM after formattingDISK is mounted in the backup directory p of described mobile device;
Described backup module, for before the Android system of described mobile device of upgrading, by described movementOriginal Android system file backup of equipment is in the backup directory of described mobile device.
Further, said apparatus also can have the characteristics that, also includes:
Recover module, be connected with described backup module, for the Android system in described mobile deviceIn the case of OTA upgrades unsuccessfully, with original Android system of backup in the backup directory of described mobile deviceThe Android system of mobile device described in system file access pattern.
Further, said apparatus also can have the characteristics that, the described module that arranges includes:
Capacity determines unit, and be used for the original Android system file according to described mobile device takies appearanceThe currently used situation of the internal memory of amount and described mobile device determines described virtual flash disk RAMThe capacity of DISK.
Further, said apparatus also can have the characteristics that, the file system lattice of described mobile deviceFormula is that second filial generation extension file system ext2 form, New Technology File System NTFS format, file divideJoin table FAT form or 32 file allocation table FAT32 forms.
The back-up device that the Android system of the embodiment of the present invention is during upgrading, solves Android system and upgradedThe problem needing Large Copacity backup space in journey, thus upgrade unsuccessfully return for realizing Android system OTARolling function provides support, improves user satisfaction, also reduces the one-tenth of mobile phone post-sale support simultaneouslyThis.
For achieving the above object, the invention allows for a kind of mobile device, including aforementioned any one instituteThe back-up device that the Android system stated is during upgrading.
Further, above-mentioned mobile device also can have the characteristics that, described mobile device be mobile phone,Panel computer, TV, digital camera, game machine.
The mobile device of the embodiment of the present invention includes the back-up device that Android system is during upgrading, solvesThe problem needing Large Copacity backup space in Android system escalation process, thus for realizing Android systemOTA unsuccessfully rollback function of upgrading provides support, improves user satisfaction, also reduces hands simultaneouslyThe cost of machine post-sale support.
Detailed description of the invention
Being described principle and the feature of the present invention below in conjunction with accompanying drawing, illustrated embodiment is served only for solvingRelease the present invention, be not intended to limit the scope of the present invention.For those of ordinary skill in the art,On the premise of not paying creative work, all embodiments obtained according to present invention spirit, allBelong to protection scope of the present invention.
At present, the internal memory of mobile device is the biggest, institute in the Android system escalation process of mobile deviceThe software run is not required to the biggest internal memory, therefore, when Android system is upgraded, and can be by movementA part for the internal memory of equipment is made RAM Disk (virtual flash disk), backs up Android system upgradingFront original Android system software.The most both backup space in Android system escalation process had been solvedProblem, need not again modify the hardware configuration of mobile device.After system software upgrading completes,If upgraded successfully, just release RAM Disk, returned internal memory and used, if upgrading unsuccessfully,Original software of backup in RAM Disk is just utilized to realize rollback function, after rollback is successfully completed, thenRelease RAM Disk.Visible, in the present invention a bit of time during system upgrade " borrowing "With the internal memory of mobile device, after having upgraded, the space used by RAM Disk still returns internal memory to use,The most do not affect the normal use of mobile device internal memory.
As a example by mobile phone.The internal memory of android system mobile phone is typically more than 3G bit, and system literThe software run during Ji is not required to the biggest internal memory, and upgrade-system has only to less than 1GThe internal memory of bit.Will not use completely during there is system upgrade in remaining 2G bit, weThe mobile phone EMS memory not used during utilizing system upgrade is made RAM Disk, carrys out standby system upgradingFront original software.This not only solves the problem of backup space during system upgrade, and due toThis is one and builds in RAM (Ramdom Access Memory, random access memory)File system, read or write speed is the fastest.
Fig. 1 is the flow chart of the backup method that Android system is during upgrading in the embodiment of the present invention one.Such as figureShown in 1, in the present embodiment, Android system backup method during upgrading may include steps of:
Step S101, specifies one piece of region as void in installing the internal memory of mobile device of Android systemIntend ram disk RAM DISK, and the OTA upgrade-system kernel arranging Android system operationally props upHold this virtual flash disk RAM DISK;
Specifically, can open when compiling the kernel kernel of OTACONFIG_BLK_DEV_RAM so that support RAM when the kernel kernel of OTA runsDISK。
Wherein, specify one piece of region as in virtual in the internal memory of mobile device of Android system is installedWhat deposit RAM DISK may include that the original Android system file according to mobile device takies appearanceThe currently used situation of the internal memory of amount and mobile device determines the capacity of virtual flash disk RAM DISK.The capacity of RAM DISK should more than mobile device original Android system file take capacity, withJust can accommodate original Android system file, but make the internal memory of mobile device remove RAM simultaneously againResidual capacity after DISK disclosure satisfy that the normal need of other application of mobile device, in order to not shadowRing the normal use of mobile device.
Wherein, mobile device can be mobile phone, panel computer, TV, digital camera, game machine etc..
Step S102, adds the capacity of this virtual flash disk RAM DISK to OTA upgrade-systemIn the start-up parameter of kernel;
It is previously mentioned, capacity and movement can be taken according to original Android system file of mobile deviceThe currently used situation of the internal memory of equipment determines the capacity of virtual flash disk RAM DISK.
In the application, for Android smartphone, the capacity of virtual flash disk RAM DISK is permissibleIt is greater than 1G bit and the arbitrary capability value less than 2G bit.Preferably, Android smartphoneThe capacity of virtual flash disk RAM DISK can be 1.5G bit.
Step S102 can be realized by the start-up parameter of the kernel kernel of amendment OTA.Such as,The capacity of RAM DISK is 1.5G bit, then can be in the start-up parameter of the kernel kernel of OTAMiddle interpolation ramdisk_size=150000, thus by the ramdisk of kernel (i.e. RAM DISK,The most together) size is set to 1.5G bit.
Step S103, is formatted as the file with mobile device by this virtual flash disk RAM DISKThe form that system format is identical, and will format after virtual flash disk RAM DISK be mounted to moveIn the backup directory of dynamic equipment;
Wherein, the file system format of mobile device can be ext2 (second extendedFilesystem, the second filial generation extension file system) form, NTFS (New Technology FileSystem, New Technology File System) form, FAT (File Allocation Table, file allocation table)Form or FAT32 (32 file allocation table) form etc..Virtual flash disk RAM DISK formCannot use before change, could be used for after formatting backing up file.By virtual flash disk RAMDISK is mounted to the backup directory of mobile device and is able to virtual flash disk RAM DISK'sData are read out, in order to realize the write of the original Android system file to mobile device and read behaviourMake.
In embodiments of the present invention, when RAM DISK is formatted as ext2 form by needs, canTo be accomplished in that in the startup script init.rc of OTA system interpolation is as ordered:
mke2fs/dev/ram0
mount–t ext2/dev/ram0/backup
Mentioned order can realize being formatted as ramdisk ext2 form, and by ramdisk carryTo backup directory/backup.
Step S104, before the Android system of upgrading mobile device, by original Android system of mobile deviceSystem file backup is in the backup directory of mobile device.
The backup method that the Android system of the embodiment of the present invention is during upgrading, at Android system escalation processIn, utilize the partial memory of mobile device to be made RAM Disk (virtual flash disk), carry out standby systemOriginal software (the most original Android system file) before upgrading, solves in Android system escalation processThe problem needing Large Copacity backup space, thus upgrade unsuccessfully rollback merit for realizing Android system OTAIt is provided that support so that the Android system of mobile device is after OTA upgrades unsuccessfully, it is possible to utilizeThe systems soft ware of backup recovers original system, without again to removing after sale updating system software again,Save time and efforts for user, improve user satisfaction, also reduce mobile device simultaneously and sellThe cost of rear support.
Fig. 2 is the flow chart of the backup method that Android system is during upgrading in the embodiment of the present invention two.Such as figureShown in 2, in the present embodiment, Android system backup method during upgrading may include steps of:
Step S201, specifies one piece of region as void in installing the internal memory of mobile device of Android systemIntend ram disk RAM DISK, and the OTA upgrade-system kernel arranging Android system operationally props upHold this virtual flash disk RAM DISK;
Step S202, adds the capacity of this virtual flash disk RAM DISK to OTA upgrade-systemIn the start-up parameter of kernel;
Step S203, is formatted as the file with mobile device by this virtual flash disk RAM DISKThe form that system format is identical, and will format after virtual flash disk RAM DISK be mounted to moveIn the backup directory of dynamic equipment;
Step S204, before the Android system of upgrading mobile device, by original Android system of mobile deviceSystem file backup is in the backup directory of mobile device;
Step S205, in the case of the OTA of the Android system of mobile device upgrades unsuccessfully, uses instituteState the peace of original Android system this mobile device of file access pattern of backup in the backup directory of mobile deviceTall and erect system.
The backup method that the Android system of the embodiment of the present invention is during upgrading, at Android system escalation processIn, utilize the partial memory of mobile device to be made virtual flash disk, come standby system upgrading before originalSoftware, solves the problem needing Large Copacity backup space in Android system escalation process.In Android systemIn the case of the OTA of system upgrades unsuccessfully, it is possible to utilize the systems soft ware of backup to recover original system,To realize rollback function, without again to removing after sale updating system software again, save for userTime and efforts, improves user satisfaction, also reduces the cost of mobile device post-sale support simultaneously.
Fig. 3 is the structured flowchart of the back-up device that Android system is during upgrading in the embodiment of the present invention three.FigureAndroid system shown in 3 back-up device during upgrading may be used for implementing shown in earlier figures 1 of the present invention realExecute the backup method that the Android system of example is during upgrading.
As it is shown on figure 3, in the present embodiment, Android system back-up device 300 during upgrading includes sequentiallyBe connected arranges module 310, interpolation module 320, carry module 330 and backup module 340.Wherein,Module 310 is set for specifying one piece of region conduct in installing the internal memory of mobile device of Android systemVirtual flash disk RAM DISK, and the over the air OTA upgrade-system of Android system is setKernel operationally supports this virtual flash disk RAM DISK.Add module 320 for this is virtualThe capacity of ram disk RAM DISK adds in the start-up parameter of OTA upgrade-system kernel.CarryModule 330 is for being formatted as the file system with mobile device by virtual flash disk RAM DISKThe form that form is identical, and the virtual flash disk RAM DISK after formatting is mounted to this and movesIn the backup directory of equipment.Backup module 340 is used for before the Android system of upgrading mobile device,By in original Android system file backup of this mobile device to the backup directory of this mobile device.
Wherein, the capacity of virtual flash disk RAM DISK can be according to original Android of mobile deviceThe currently used situation of the internal memory taking capacity and mobile device of system file determines..Therefore, existIn the embodiment of the present invention, module 310 is set and can include that capacity determines unit.Capacity determines that unit is usedIn the original Android system file according to mobile device the internal memory taking capacity and mobile device work asFront service condition determines the capacity of virtual flash disk RAM DISK.
Wherein, mobile device can be mobile phone, panel computer, TV, digital camera, game machine etc..
Wherein, the file system format of mobile device can be ext2 form, NTFS format, FATForm or FAT32 form etc..
The back-up device that the Android system of the embodiment of the present invention is during upgrading, at Android system escalation processIn, utilize the partial memory of mobile device to be made RAM Disk (virtual flash disk), carry out standby systemOriginal software before upgrading, solves and needs asking of Large Copacity backup space in Android system escalation processTopic, thus provide support for realizing Android system OTA unsuccessfully rollback function of upgrading so that movementThe Android system of equipment is after OTA upgrades unsuccessfully, it is possible to utilize the systems soft ware of backup to recover originalSystem, without again to removing after sale updating system software again, saves time and efforts for user,Improve user satisfaction, also reduce the cost of mobile device post-sale support simultaneously.
Fig. 4 is the structured flowchart of the back-up device that Android system is during upgrading in the embodiment of the present invention four.FigureAndroid system shown in 4 back-up device during upgrading may be used for implementing shown in earlier figures 2 of the present invention realExecute the backup method that the Android system of example is during upgrading.
As shown in Figure 4, in the present embodiment, Android system back-up device 300 during upgrading includes sequentiallyBe connected arranges module 310, interpolation module 320, carry module 330, backup module 340 and recoversModule 350.Wherein, module 310 is set in installing the internal memory of mobile device of Android systemSpecify one piece of region as virtual flash disk RAM DISK, and Android system is set download skill in the airArt OTA upgrade-system kernel operationally supports this virtual flash disk RAM DISK.Add module320 for adding the capacity of this virtual flash disk RAM DISK to OTA upgrade-system kernelIn start-up parameter.Carry module 330 is for being formatted as virtual flash disk RAM DISK and moveThe form that the file system format of dynamic equipment is identical, and the virtual flash disk RAM after formattingDISK is mounted in the backup directory of this mobile device.Backup module 340 sets for moving in upgradingBefore standby Android system, by original Android system file backup of this mobile device to this mobile deviceIn backup directory.Recover module 350 to be connected with backup module 340, for the Android in mobile deviceIn the case of the OTA of system upgrades unsuccessfully, by original peace of backup in the backup directory of mobile deviceTall and erect system file recovers the Android system of this mobile device.
Wherein, mobile device can be mobile phone, panel computer, TV, digital camera, game machine etc..
Wherein, the file system format of mobile device can be ext2 form, NTFS format, FATForm or FAT32 form etc..
Wherein, module 310 is set and can include that aforesaid capacity determines unit.
The back-up device that the Android system of the embodiment of the present invention is during upgrading, at Android system escalation processIn, utilize the partial memory of mobile device to be made virtual flash disk, come standby system upgrading before originalSoftware, solves the problem needing Large Copacity backup space in Android system escalation process.The present invention is realExecute the back-up device that the Android system of example is during upgrading, in the situation that the OTA upgrading of Android system is failedUnder, it is possible to utilize the systems soft ware of backup to recover original system, to realize rollback function, withoutAgain to removing after sale updating system software again, save time and efforts for user, improve user fullMeaning degree, also reduces the cost of mobile device post-sale support simultaneously.
Fig. 5 is the structured flowchart of mobile device in the embodiment of the present invention five.As it is shown in figure 5, this enforcementIn example, mobile device 500 includes the back-up device 300 that Android system is during upgrading.Wherein, Android systemBack-up device 300 during upgrading of uniting can be the Android system upgrading in the aforementioned any embodiment of the present inventionIn back-up device.
Android system back-up device 300 during upgrading may be used in the mobile device installing Android systemInternal memory in specify one piece of region as virtual flash disk RAM DISK, and the sky of Android system is setMiddle download technology OTA upgrade-system kernel operationally supports this virtual flash disk RAM DISK;The capacity of this virtual flash disk RAM DISK is added to the start-up parameter of OTA upgrade-system kernelIn;Virtual flash disk RAM DISK is formatted as identical with the file system format of mobile deviceForm, and will format after virtual flash disk RAM DISK be mounted to the standby of this mobile deviceIn part catalogue;Before the Android system of upgrading mobile device, by original Android system of this mobile deviceFile backup is in the backup directory of this mobile device.
Android system back-up device 300 during upgrading can be also used for the Android system in mobile deviceIn the case of OTA upgrades unsuccessfully, with original Android system literary composition of backup in the backup directory of mobile devicePart recovers the Android system of this mobile device.
Wherein, mobile device can be mobile phone, panel computer, TV, digital camera, game machine etc..
Wherein, the file system format of mobile device can be ext2 form, NTFS format, FATForm or FAT32 form etc..
The mobile device of the embodiment of the present invention includes the back-up device that Android system is during upgrading, it is possible toIn Android system escalation process, utilize the partial memory of mobile device to be made virtual flash disk, back upOriginal software before system upgrade, solves and needs Large Copacity backup space in Android system escalation processProblem.The mobile device of the embodiment of the present invention, in the situation that the OTA upgrading of Android system is failedUnder, it is possible to utilize the systems soft ware of backup to recover original system, to realize rollback function, withoutAgain to removing after sale updating system software again, save time and efforts for user, improve user fullMeaning degree, also reduces the cost of mobile device post-sale support simultaneously.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all at thisWithin bright spirit and principle, any modification, equivalent substitution and improvement etc. made, should be included inWithin protection scope of the present invention.